NDEVR
API Documentation
Frame.h
1#pragma once
2#include "DLLInfo.h"
3#include "../../GraphOptimization/Headers/DLLInfo.h"
4#include "OrbSLAM/Thirdparty/DBoW2/DBoW2/BowVector.h"
5#include "OrbSLAM/Thirdparty/Sophus/sophus/se3.hpp"
6#include "OrbSLAM/Headers/ORBVocabulary.h"
7#include <NDEVR/IntegratedRotation.h>
8#include <NDEVR/RWLock.h>
9#include "Base/Headers/Buffer.hpp"
10#include <mutex>
11#include <opencv2/opencv.hpp>
12#include <functional>
13
14namespace NDEVR
15{
16 constexpr uint04 FRAME_GRID_ROWS = 48;
17 constexpr uint04 FRAME_GRID_COLS = 64;
18
19 class MapPoint;
20 class KeyFrame;
21 class InfoPipe;
23 class GeometricCamera;
24 class ORBextractor;
25 class BinaryFile;
64
69 struct FrameInfo
70 {
73 float fx;
74 float fy;
75 float cx;
76 float cy;
77 float invfx;
78 float invfy;
79 float mbf = 0.0f;
80 float mb = 0.0f;
81 const cv::Mat K;
82 const cv::Mat mDistCoef;
93 FrameInfo(const Vector<2, uint04>& size, const cv::Mat& mDistCoef, const cv::Mat& mK, GeometricCamera* camera, fltp04 thDepth, fltp04 mbf);
94
98 };
99
100 struct IMUData
101 {
102 IMU::Calib mImuCalib;
103 IMU::Bias mImuBias;
104 };
105
110 class Frame
111 {
112 public:
114 Frame() = default;
115
119 Frame(const Frame &frame);
123 Frame(Frame&& frame) noexcept;
128 Frame& operator=(const Frame& frame) noexcept;
133 Frame& operator=(Frame&& frame) noexcept;
134
145 Frame(FrameInfo* frame_info, const cv::Mat& imLeft, const cv::Mat& imRight, fltp08 timeStamp, ORBextractor* extractorLeft, ORBextractor* extractorRight, ORBVocabulary* voc, const IMU::Calib &ImuCalib = IMU::Calib());
158 Frame(FrameInfo* frame_info, const cv::Mat& imLeft, const cv::Mat& imRight, fltp08 timeStamp, ORBextractor* extractorLeft, ORBextractor* extractorRight, ORBVocabulary* voc, GeometricCamera* pCamera2, Sophus::SE3<g_type>& Tlr, const IMU::Calib& ImuCalib = IMU::Calib());
168 Frame(FrameInfo* frame_info, const cv::Mat &imGray, const cv::Mat& imDepth, fltp08 timeStamp, ORBextractor* extractor, ORBVocabulary* voc, const IMU::Calib &ImuCalib = IMU::Calib());
177 Frame(FrameInfo* frame_info, const cv::Mat &imGray, fltp08 timeStamp, ORBextractor* extractor,ORBVocabulary* voc, const IMU::Calib &ImuCalib = IMU::Calib());
180
190 void init(FrameInfo* info, const cv::Mat& imGray, const cv::Mat& imDepth, fltp08 timeStamp, ORBextractor* extractor
191 , ORBVocabulary* voc, const IMU::Calib& ImuCalib = IMU::Calib());
198 void extractORB(uint01 flag, const cv::Mat &im, uint04 x0, uint04 x1);
199
204 const cv::KeyPoint& keypoint(uint04 i) const;
210 const cv::KeyPoint& keypoint(uint04 i, bool is_right) const;
223 void clearBoW();
224
228 virtual void setPose(const Sophus::SE3<g_type>& Tcw);
229
233 virtual void setLinearVelocity(const Eigen::Vector3<g_type>& Vw);
234
240 void setImuPoseVelocity(const Eigen::Matrix3<g_type>& Rwb, const Eigen::Vector3<g_type>& twb, const Eigen::Vector3<g_type>& Vwb);
241
245 virtual Eigen::Matrix<g_type,3,1> GetImuPosition() const;
249 virtual Eigen::Matrix<g_type,3,3> GetImuRotation() const;
253 virtual Sophus::SE3<g_type> imuPose() const;
262 uint04 mapPointCount() const { return m_map_points.size(); }
267 MapPoint* mapPoint(uint04 idx) const { return m_map_points[idx]; }
271 Sophus::SE3<g_type> GetRelativePoseTrl() const;
275 Sophus::SE3<g_type> GetRelativePoseTlr() const;
279 Eigen::Matrix3<g_type> GetRelativePoseTlr_rotation() const;
283 Eigen::Vector3<g_type> GetRelativePoseTlr_translation() const;
284
288 virtual Eigen::Matrix3<g_type> GetRotation() const;
292 virtual Eigen::Vector3<g_type> GetTranslation() const;
296 virtual Eigen::Vector3<g_type> linearVelocity() const;
300 void SetNewBias(const IMU::Bias &b);
305 bool hasCamera(uint01 index) const;
309 bool isMono() const;
314 fltp04 trackDepth(const Eigen::Vector3<g_type>& global_position) const;
319 Eigen::Vector3<g_type> inRefCoordinates(Eigen::Vector3<g_type> pCw) const;
320
330 void getFeaturesInArea(Buffer<uint04>& indices, fltp04 x, fltp04 y, fltp04 r, uint04 min_level = 0U, uint04 max_level = Constant<uint04>::Max, const bool bRight = false) const;
331
340 const PrimitiveAlignedBuffer<cv::KeyPoint, 32>& undistortedPoints() const { return m_undistorted_points; }
345 const cv::KeyPoint& undistortedPoint(uint04 idx) const { return m_undistorted_points[idx]; }
353 void computeStereoFromRGBD(const cv::Mat &imDepth);
354
359 Eigen::Vector3<g_type> unproject(uint04 i);
360
361
365 bool imuIsPreintegrated() const;
371 bool isSet() const { return mbIsSet; }
372
375
379 inline const Eigen::Vector3<g_type>& cameraCenter() const {
380 return mTwc.translation();
381 }
382
385 const Eigen::Matrix<g_type, 3, 1>& tcw() const {
386 return mTcw.translation();
387 }
388
391 inline Eigen::Matrix3<g_type> cameraRotation() const
392 {
393 return mTwc.rotationMatrix();
394 }
395
398 bool isKeyFrame() { return m_is_keyframe; }
402 virtual inline Sophus::SE3<g_type> pose() const {
403 return mTcw;
404 }
405
408 virtual inline Sophus::SE3<g_type> inversePose() const {
409 return mTwc;
410 }
411
414 inline bool HasPose() const {
415 return mbHasPose;
416 }
417
421 inline bool HasVelocity() const {
422 return mbHasVelocity;
423 }
424
432 Eigen::Vector3<g_type> stereo3DPoint(uint04 idx) const;
437 fltp04 depth(uint04 idx) const { return m_depth[idx]; }
442 fltp04 right(uint04 idx) const { return m_right[idx]; }
446 LogPtr log() { return m_frame_info->log; }
447
453 const Buffer<MapPoint*>& mapPoints() const { return m_map_points; }
457 void setMapPoints(const Buffer<MapPoint*>& map_points) { m_map_points = map_points; }
461 const Buffer<bool>& outliers() const { return m_outlier; }
465 void setOutliers(const Buffer<bool>& map_points) { m_outlier = map_points; }
470 bool isOutlier(uint04 idx) const { return m_outlier[idx]; }
475 void setOutlier(uint04 idx, bool outlier);
523 fltp04 nearFarThreshold() const { return m_frame_info->thDepth; }
527 const FrameInfo& info() const { return *m_frame_info; }
531 fltp08 timestamp() const { return m_timestamp; }
535 const BowVector& bow() const { return m_bow; }
540 private:
546 void undistortKeyPoints();
551 void AssignFeaturesToGrid();
552 public:
553 Eigen::Vector3<g_type> mOwb;
555 Sophus::SE3<g_type> sensor_pose;
556 protected:
557 Sophus::SE3<g_type> mTcw;
558 Sophus::SE3<g_type> mTwc;
559 Sophus::SE3<g_type> mTlr;
560 Sophus::SE3<g_type> mTrl;
561
562 PrimitiveAlignedBuffer<cv::KeyPoint, 32> m_undistorted_points;
565
570 BowVector m_bow;
571 public:
573
577 IMU::Preintegrated* mpImuPreintegrated = nullptr;
579
580 FrameView* m_view[2] = { nullptr, nullptr };
581
582 IMU::Preintegrated* mpImuPreintegratedFrame = nullptr;
583 protected:
585 Eigen::Vector3<g_type> m_linear_velocity = Eigen::Vector3<g_type>(0,0,0);
586 public:
588 uint04 id = Constant<uint04>::Invalid;
589 public:
592 uint04 N = 0;
593 bool mbHasPose = false;
594 bool mbHasVelocity = false;
595 bool mbIsSet = false;
596 bool mbImuPreintegrated = false;
597 bool m_is_keyframe = false;
598 public:
602 ORBSLAM_API static void Set3DCallback(std::function<Vector<3, fltp04>(Frame* frame, Vector<3, fltp04>)> callback);
603 static std::function<Vector<3, fltp04>(Frame* frame, Vector<3, fltp04>)> s_point_to_3d_callback;
604 static cv::BFMatcher BFmatcher;
605 static volatile uint04 s_next_id;
606 };
607
608}
Logic for reading or writing to a binary file including logic for compressing or decompressing the fi...
Definition BinaryFile.h:136
A specification of upper and lower bounds in N-dimensions.
Definition Bounds.hpp:54
The equivelent of std::vector but with a bit more control.
Definition Buffer.hpp:58
Stores a prior constraint on an IMU pose with its information matrix.
Definition G2oTypes.h:695
A hash-based key-value store, useful for quick associative lookups.
Definition Dictionary.h:64
bool isMono() const
Checks whether this frame is monocular (single camera).
Frame()=default
Default constructor.
Sophus::SE3< g_type > sensor_pose
External sensor pose.
Definition Frame.h:555
uint04 observationCount(uint04 idx) const
Returns the observation count for a map point at the given index.
RWLock & mapPointsLockPtr() const
Returns the read-write lock for map point access.
Definition Frame.h:427
const Buffer< float > & levelSigma2() const
Returns the sigma squared values per pyramid level.
uint04 trackedMapPoints(uint04 minObs) const
Counts map points with at least the given number of observations.
uint04 undistortedPointCount() const
Returns the number of undistorted keypoints.
Definition Frame.h:349
const Eigen::Matrix< g_type, 3, 1 > & tcw() const
Returns the camera-to-world translation.
Definition Frame.h:385
void getFeaturesInArea(Buffer< uint04 > &indices, fltp04 x, fltp04 y, fltp04 r, uint04 min_level=0U, uint04 max_level=Constant< uint04 >::Max, const bool bRight=false) const
Finds features within a circular area in the image.
const Dictionary< uint04, Buffer< uint04 > > & featureIndices() const
Returns the feature index map (word ID to keypoint indices).
Definition Frame.h:539
Buffer< fltp04 > m_right
Right stereo coordinate per keypoint (negative if monocular).
Definition Frame.h:567
Eigen::Vector3< g_type > inRefCoordinates(Eigen::Vector3< g_type > pCw) const
Transforms a world-coordinate point into this frame's camera coordinates.
void computeStereoMatches()
Searches stereo matches between left and right keypoints.
Vector< 2, uint04 > discardOutliers()
Discards outlier map point associations.
Buffer< fltp04 > m_depth
Depth per keypoint.
Definition Frame.h:568
Frame(Frame &&frame) noexcept
Move constructor.
Frame(FrameInfo *frame_info, const cv::Mat &imGray, const cv::Mat &imDepth, fltp08 timeStamp, ORBextractor *extractor, ORBVocabulary *voc, const IMU::Calib &ImuCalib=IMU::Calib())
Constructor for RGB-D cameras.
fltp04 nearFarThreshold() const
Returns the near/far depth threshold.
Definition Frame.h:523
Frame(const Frame &frame)
Copy constructor.
const cv::KeyPoint & keypoint(uint04 i) const
Returns the keypoint at the given index.
virtual Sophus::SE3< g_type > imuPose() const
Returns the IMU pose as an SE3 transform.
Frame(FrameInfo *frame_info, const cv::Mat &imGray, fltp08 timeStamp, ORBextractor *extractor, ORBVocabulary *voc, const IMU::Calib &ImuCalib=IMU::Calib())
Constructor for monocular cameras.
const Buffer< float > & invLevelSigma2() const
Returns the inverse sigma squared values per pyramid level.
void init(FrameInfo *info, const cv::Mat &imGray, const cv::Mat &imDepth, fltp08 timeStamp, ORBextractor *extractor, ORBVocabulary *voc, const IMU::Calib &ImuCalib=IMU::Calib())
Initializes a frame from RGB-D data.
KeyFrame * mpReferenceKF
Reference keyframe.
Definition Frame.h:576
uint04 levelCount() const
Returns the number of pyramid levels.
void clearMapPoints()
Clears all map point associations.
void updatePoseMatrices()
Recomputes derived pose matrices from the current camera pose.
fltp08 timestamp() const
Returns the capture timestamp.
Definition Frame.h:531
Sophus::SE3< g_type > mTrl
Right-to-left camera relative pose.
Definition Frame.h:560
Eigen::Vector3< g_type > mOwb
IMU position in world coordinates.
Definition Frame.h:553
virtual Eigen::Vector3< g_type > linearVelocity() const
Returns the linear velocity of the frame.
void eraseMapPointMatch(uint04)
Removes a map point association at the given index.
bool mbHasVelocity
Whether a valid velocity has been set.
Definition Frame.h:594
PrimitiveAlignedBuffer< cv::KeyPoint, 32 > m_undistorted_points
Undistorted keypoints used by the system.
Definition Frame.h:562
bool hasCamera(uint01 index) const
Checks whether a camera at the given index is available.
const Buffer< MapPoint * > & mapPoints() const
Returns all map point associations.
Definition Frame.h:453
void setImuPoseVelocity(const Eigen::Matrix3< g_type > &Rwb, const Eigen::Vector3< g_type > &twb, const Eigen::Vector3< g_type > &Vwb)
Sets IMU pose and velocity, implicitly updating the camera pose.
void clearBoW()
Clears the Bag of Words data.
MapPoint * mapPoint(uint04 idx) const
Returns the map point at the given index.
Definition Frame.h:267
virtual void setLinearVelocity(const Eigen::Vector3< g_type > &Vw)
Sets the IMU linear velocity.
Sophus::SE3< g_type > mTcw
World-to-camera transform.
Definition Frame.h:557
const Buffer< MapPoint * > & mapPointMatches()
Returns the map point matches buffer.
Dictionary< uint04, Buffer< uint04 > > m_features_indices
Maps BoW word IDs to keypoint indices.
Definition Frame.h:572
ORBextractor * m_extractor
ORB feature extractor.
Definition Frame.h:590
fltp08 m_timestamp
Frame capture timestamp.
Definition Frame.h:587
const Buffer< float > & invScaleFactors() const
Returns the inverse ORB scale factors per pyramid level.
fltp04 right(uint04 idx) const
Returns the right stereo coordinate at the given keypoint index.
Definition Frame.h:442
void extractORB(uint01 flag, const cv::Mat &im, uint04 x0, uint04 x1)
Extracts ORB features from the image.
bool mbImuPreintegrated
Whether IMU preintegration is complete.
Definition Frame.h:596
virtual void setPose(const Sophus::SE3< g_type > &Tcw)
Sets the camera pose (does not modify IMU pose).
Sophus::SE3< g_type > mTlr
Left-to-right camera relative pose.
Definition Frame.h:559
KeyFrame * mpLastKeyFrame
Previous keyframe.
Definition Frame.h:578
bool imuIsPreintegrated() const
Checks whether the IMU preintegration is complete.
IMUData imu_data
IMU calibration and bias data.
Definition Frame.h:554
Buffer< MapPoint * > m_map_points
Map point associations for each keypoint.
Definition Frame.h:566
ConstraintPoseImu * mpcpi
IMU pose constraint.
Definition Frame.h:575
const Buffer< bool > & outliers() const
Returns the outlier flags buffer.
Definition Frame.h:461
Frame & operator=(const Frame &frame) noexcept
Copy assignment operator.
virtual Eigen::Matrix< g_type, 3, 1 > GetImuPosition() const
Returns the IMU position in world coordinates.
virtual Sophus::SE3< g_type > inversePose() const
Returns the inverse camera pose (camera-to-world transform).
Definition Frame.h:408
void setIntegrated()
Marks the IMU preintegration as complete.
bool isOutlier(uint04 idx) const
Checks whether the map point at the given index is an outlier.
Definition Frame.h:470
Sophus::SE3< g_type > GetRelativePoseTrl() const
Returns the relative pose from right to left camera.
LogPtr log()
Returns the logger for this frame.
Definition Frame.h:446
bool HasVelocity() const
Checks whether a valid velocity has been set.
Definition Frame.h:421
FrameView * m_view[2]
Left [0] and right [1] view data.
Definition Frame.h:580
virtual Eigen::Matrix3< g_type > GetRotation() const
Returns the camera rotation matrix (camera-to-world).
MapPoint * mapPoint(uint04 idx)
Returns the map point at the given index (non-const).
const PrimitiveAlignedBuffer< cv::KeyPoint, 32 > & undistortedPoints() const
Returns all undistorted keypoints.
Definition Frame.h:340
Eigen::Vector3< g_type > stereo3DPoint(uint04 idx) const
Returns the triangulated 3D stereo point at the given index.
Sophus::SE3< g_type > mTwc
Camera-to-world transform (inverse of mTcw).
Definition Frame.h:558
bool HasPose() const
Checks whether a valid pose has been set.
Definition Frame.h:414
static __attribute__((visibility("default"))) static void Set3DCallback(std std::function< Vector< 3, fltp04 >(Frame *frame, Vector< 3, fltp04 >) s_point_to_3d_callback)
Sets a callback for converting frame points to 3D.
Definition Frame.h:602
Frame(FrameInfo *frame_info, const cv::Mat &imLeft, const cv::Mat &imRight, fltp08 timeStamp, ORBextractor *extractorLeft, ORBextractor *extractorRight, ORBVocabulary *voc, const IMU::Calib &ImuCalib=IMU::Calib())
Constructor for stereo cameras.
void setOutliers(const Buffer< bool > &map_points)
Sets the outlier flags buffer.
Definition Frame.h:465
Buffer< Eigen::Vector3< g_type > > m_stereo_3D_points
Triangulated stereo 3D points from fisheye matching.
Definition Frame.h:564
void setOutlier(uint04 idx, bool outlier)
Sets the outlier flag at the given index.
void setMapPoints(const Buffer< MapPoint * > &map_points)
Sets all map point associations.
Definition Frame.h:457
Sophus::SE3< g_type > GetRelativePoseTlr() const
Returns the relative pose from left to right camera.
void computeStereoFromRGBD(const cv::Mat &imDepth)
Associates depth-derived right coordinates to keypoints from an RGB-D depthmap.
Buffer< bool > m_outlier
Outlier flag per keypoint.
Definition Frame.h:569
static cv::BFMatcher BFmatcher
Brute-force matcher for stereo fisheye matching.
Definition Frame.h:604
const Buffer< float > & scaleFactors() const
Returns the ORB scale factors per pyramid level.
const BowVector & bow() const
Returns the Bag of Words vector.
Definition Frame.h:535
virtual Sophus::SE3< g_type > pose() const
Returns the camera pose (world-to-camera transform).
Definition Frame.h:402
bool mbHasPose
Whether a valid pose has been set.
Definition Frame.h:593
FrameInfo * m_frame_info
Shared camera info (intrinsics, bounds).
Definition Frame.h:591
static volatile uint04 s_next_id
Global frame ID counter.
Definition Frame.h:605
const FrameInfo & info() const
Returns the shared frame info.
Definition Frame.h:527
Eigen::Matrix3< g_type > cameraRotation() const
Returns the world-to-camera rotation (inverse rotation).
Definition Frame.h:391
virtual Eigen::Matrix< g_type, 3, 3 > GetImuRotation() const
Returns the IMU rotation matrix.
uint04 mapPointCount() const
Returns the number of map points associated with this frame.
Definition Frame.h:262
virtual Eigen::Vector3< g_type > GetTranslation() const
Returns the camera translation vector (camera-to-world).
~Frame()
Destructor.
bool isSet() const
Checks whether this frame has been initialized.
Definition Frame.h:371
BowVector m_bow
Bag of Words vector for this frame.
Definition Frame.h:570
const Eigen::Vector3< g_type > & cameraCenter() const
Returns the camera center in world coordinates.
Definition Frame.h:379
bool isKeyFrame()
Checks whether this frame is a keyframe.
Definition Frame.h:398
Frame(FrameInfo *frame_info, const cv::Mat &imLeft, const cv::Mat &imRight, fltp08 timeStamp, ORBextractor *extractorLeft, ORBextractor *extractorRight, ORBVocabulary *voc, GeometricCamera *pCamera2, Sophus::SE3< g_type > &Tlr, const IMU::Calib &ImuCalib=IMU::Calib())
Constructor for stereo cameras with a second camera model.
fltp04 trackDepth(const Eigen::Vector3< g_type > &global_position) const
Computes the depth of a 3D point relative to this frame's camera.
Eigen::Vector3< g_type > GetRelativePoseTlr_translation() const
Returns the translation component of the left-to-right relative pose.
Eigen::Vector3< g_type > m_linear_velocity
IMU linear velocity.
Definition Frame.h:585
uint04 N
Number of keypoints.
Definition Frame.h:592
const cv::KeyPoint & keypoint(uint04 i, bool is_right) const
Returns the keypoint at the given index from left or right view.
IMU::Preintegrated * mpImuPreintegrated
IMU preintegration from last keyframe.
Definition Frame.h:577
void SetNewBias(const IMU::Bias &b)
Updates the IMU bias.
Eigen::Vector3< g_type > unproject(uint04 i)
Backprojects a keypoint into 3D world coordinates using stereo/depth info.
ORBVocabulary * mpORBvocabulary
ORB vocabulary for relocalization.
Definition Frame.h:574
void ComputeStereoFishEyeMatches()
Computes stereo matches for fisheye cameras.
void setMapPointMatch(uint04, MapPoint *pMP)
Sets a map point association at the given index.
RWLock m_feature_lock
Read-write lock for map point access.
Definition Frame.h:584
Eigen::Matrix3< g_type > GetRelativePoseTlr_rotation() const
Returns the rotation component of the left-to-right relative pose.
Frame & operator=(Frame &&frame) noexcept
Move assignment operator.
Buffer< Vector< 2, fltp04 > > m_original_points
Original (possibly distorted) keypoint positions.
Definition Frame.h:563
fltp04 scaleFactor() const
Returns the ORB scale factor.
void computeBoW()
Computes the Bag of Words representation for this frame.
const cv::KeyPoint & undistortedPoint(uint04 idx) const
Returns the undistorted keypoint at the given index.
Definition Frame.h:345
bool m_is_keyframe
Whether this frame is a keyframe.
Definition Frame.h:597
bool mbIsSet
Whether this frame has been initialized.
Definition Frame.h:595
IMU::Preintegrated * mpImuPreintegratedFrame
Frame-level IMU preintegration.
Definition Frame.h:582
fltp04 depth(uint04 idx) const
Returns the depth at the given keypoint index.
Definition Frame.h:437
Abstract interface for geometric camera models (pinhole, fisheye, etc.).
A light-weight base class for Log that allows processes to update, without the need for additional in...
A keyframe in the SLAM map, derived from Frame.
Definition KeyFrame.h:31
A light-weight wrapper that will be a no-op if there is not a valid log reference,...
A 3D point in the SLAM map observed by multiple keyframes.
Definition MapPoint.h:24
Extracts ORB features from images using an octree-based distribution.
A readers-writer lock allowing concurrent reads or exclusive writes.
Definition RWLock.h:49
A fixed-size array with N dimensions used as the basis for geometric and mathematical types.
Definition Vector.hpp:62
The primary namespace for the NDEVR SDK.
float fltp04
Defines an alias representing a 4 byte floating-point number Bit layout is as follows: -Sign: 1 bit a...
TemplatedVocabulary< FORB::TDescriptor, FORB > ORBVocabulary
ORB visual vocabulary type for Bag-of-Words place recognition.
uint32_t uint04
-Defines an alias representing a 4 byte, unsigned integer -Can represent exact integer values 0 throu...
double fltp08
Defines an alias representing an 8 byte floating-point number.
uint8_t uint01
-Defines an alias representing a 1 byte, unsigned integer -Can represent exact integer values 0 throu...
constexpr uint04 FRAME_GRID_ROWS
Number of rows in the feature grid.
Definition Frame.h:16
constexpr uint04 FRAME_GRID_COLS
Number of columns in the feature grid.
Definition Frame.h:17
Shared camera intrinsic and image metadata for frames.
Definition Frame.h:70
float invfx
Inverse of fx.
Definition Frame.h:77
float mb
Stereo baseline in meters.
Definition Frame.h:80
float fy
Focal length in y.
Definition Frame.h:74
float cy
Principal point y.
Definition Frame.h:76
float mfGridElementWidthInv
Inverse of grid cell width in pixels.
Definition Frame.h:71
FrameInfo(const Vector< 2, uint04 > &size, const cv::Mat &mDistCoef, const cv::Mat &mK, GeometricCamera *camera, fltp04 thDepth, fltp04 mbf)
Constructs FrameInfo from camera parameters.
float mbf
Stereo baseline multiplied by fx.
Definition Frame.h:79
float invfy
Inverse of fy.
Definition Frame.h:78
Bounds< 2, fltp04 > image_bounds
Undistorted image bounds.
Definition Frame.h:95
LogPtr log
Logger instance.
Definition Frame.h:97
fltp04 thDepth
Near/far depth threshold.
Definition Frame.h:83
GeometricCamera * pCamera
Associated geometric camera model.
Definition Frame.h:84
float fx
Focal length in x.
Definition Frame.h:73
float mfGridElementHeightInv
Inverse of grid cell height in pixels.
Definition Frame.h:72
const cv::Mat K
Camera intrinsic matrix.
Definition Frame.h:81
Vector< 2, uint04 > image_size
Image dimensions in pixels.
Definition Frame.h:96
const cv::Mat mDistCoef
Distortion coefficients.
Definition Frame.h:82
float cx
Principal point x.
Definition Frame.h:75
Holds per-view (left or right) keypoint data for a frame.
Definition Frame.h:32
FrameView(const FrameView &other)
Copy constructor.
ORBextractor * extractor
ORB feature extractor for this view.
Definition Frame.h:59
PrimitiveAlignedBuffer< cv::KeyPoint, 32 > keys
Extracted keypoints.
Definition Frame.h:56
cv::Mat descriptors
ORB descriptors for extracted keypoints.
Definition Frame.h:58
Dictionary< Vector< 2, uint04 >, Buffer< uint04 > > grid
Feature grid mapping cell coordinates to keypoint indices.
Definition Frame.h:55
void init(ORBextractor *extractor, GeometricCamera *camera)
Initializes the view with the given extractor and camera.
FrameView()
Default constructor.
Definition Frame.h:35
FrameView & operator=(const FrameView &other)
Copy assignment operator.
FrameView(ORBextractor *extractor, GeometricCamera *camera)
Constructs a FrameView with the given extractor and camera.
uint04 keypoint_count
Number of overlapping keypoints.
Definition Frame.h:61
GeometricCamera * camera
Camera model for this view.
Definition Frame.h:60
Buffer< uint04 > match_points
Indices of matched map points.
Definition Frame.h:57
uint04 mono_count
Number of non-lapping (monocular) keypoints.
Definition Frame.h:62
Holds IMU calibration and bias data for a frame.
Definition Frame.h:101
IMU::Bias mImuBias
Current IMU bias estimate.
Definition Frame.h:103
IMU::Calib mImuCalib
IMU calibration parameters.
Definition Frame.h:102