MCPcopy Create free account
hub / github.com/UZ-SLAMLab/ORB_SLAM3 / Frame

Class Frame

include/Frame.h:53–370  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

51class ORBextractor;
52
53class Frame
54{
55public:
56 Frame();
57
58 // Copy constructor.
59 Frame(const Frame &frame);
60
61 // Constructor for stereo cameras.
62 Frame(const cv::Mat &imLeft, const cv::Mat &imRight, const double &timeStamp, ORBextractor* extractorLeft, ORBextractor* extractorRight, ORBVocabulary* voc, cv::Mat &K, cv::Mat &distCoef, const float &bf, const float &thDepth, GeometricCamera* pCamera,Frame* pPrevF = static_cast<Frame*>(NULL), const IMU::Calib &ImuCalib = IMU::Calib());
63
64 // Constructor for RGB-D cameras.
65 Frame(const cv::Mat &imGray, const cv::Mat &imDepth, const double &timeStamp, ORBextractor* extractor,ORBVocabulary* voc, cv::Mat &K, cv::Mat &distCoef, const float &bf, const float &thDepth, GeometricCamera* pCamera,Frame* pPrevF = static_cast<Frame*>(NULL), const IMU::Calib &ImuCalib = IMU::Calib());
66
67 // Constructor for Monocular cameras.
68 Frame(const cv::Mat &imGray, const double &timeStamp, ORBextractor* extractor,ORBVocabulary* voc, GeometricCamera* pCamera, cv::Mat &distCoef, const float &bf, const float &thDepth, Frame* pPrevF = static_cast<Frame*>(NULL), const IMU::Calib &ImuCalib = IMU::Calib());
69
70 // Destructor
71 // ~Frame();
72
73 // Extract ORB on the image. 0 for left image and 1 for right image.
74 void ExtractORB(int flag, const cv::Mat &im, const int x0, const int x1);
75
76 // Compute Bag of Words representation.
77 void ComputeBoW();
78
79 // Set the camera pose. (Imu pose is not modified!)
80 void SetPose(const Sophus::SE3<float> &Tcw);
81
82 // Set IMU velocity
83 void SetVelocity(Eigen::Vector3f Vw);
84
85 Eigen::Vector3f GetVelocity() const;
86
87 // Set IMU pose and velocity (implicitly changes camera pose)
88 void SetImuPoseVelocity(const Eigen::Matrix3f &Rwb, const Eigen::Vector3f &twb, const Eigen::Vector3f &Vwb);
89
90 Eigen::Matrix<float,3,1> GetImuPosition() const;
91 Eigen::Matrix<float,3,3> GetImuRotation();
92 Sophus::SE3<float> GetImuPose();
93
94 Sophus::SE3f GetRelativePoseTrl();
95 Sophus::SE3f GetRelativePoseTlr();
96 Eigen::Matrix3f GetRelativePoseTlr_rotation();
97 Eigen::Vector3f GetRelativePoseTlr_translation();
98
99 void SetNewBias(const IMU::Bias &b);
100
101 // Check if a MapPoint is in the frustum of the camera
102 // and fill variables of the MapPoint to be used by the tracking
103 bool isInFrustum(MapPoint* pMP, float viewingCosLimit);
104
105 bool ProjectPointDistort(MapPoint* pMP, cv::Point2f &kp, float &u, float &v);
106
107 Eigen::Vector3f inRefCoordinates(Eigen::Vector3f pCw);
108
109 // Compute the cell of a keypoint (return false if outside the grid)
110 bool PosInGrid(const cv::KeyPoint &kp, int &posX, int &posY);

Callers

nothing calls this directly

Calls 1

CalibClass · 0.85

Tested by

no test coverage detected