Frame 类
-
[数据成员]定义了 ID、时间戳、位姿、相机、图像
在 Frame 中,我们定义了 ID、时间戳、位姿、相机、图像这几个量;
public:// data members
typedef std::shared_ptr<Frame> Ptr;
unsigned long id_; // id of this frame
double time_stamp_; // when it is recorded
SE3 T_c_w_; // transform from world to camera
Camera::Ptr camera_; // Pinhole RGBD Camera model
Mat color_, depth_; // color and depth image
Frame( long id, double time_stamp=0, SE3 T_c_w=SE3(), Camera::Ptr camera=nullptr, Mat color=Mat(),Mat depth=Mat() );
Frame 中,我们定义了 ID、时间戳、位姿、相机、图像这几个量;
public:// data members
typedef std::shared_ptr<Frame> Ptr;
unsigned long id_; // id of this frame
double time_stamp_; // when it is recorded
SE3 T_c_w_; // transform from world to camera
Camera::Ptr camera_; // Pinhole RGBD Camera model
Mat color_, depth_; // color and depth image
Frame( long id, double time_stamp=0, SE3 T_c_w=SE3(), Camera::Ptr camera=nullptr, Mat color=Mat(),Mat depth=Mat() );
-
[方法函数]创建 Frame、定点深度、获取光心、某个点在视野内
在方法中,方法:创建 Frame、寻找给定点对应的深度、获取相机光心、判断某个点是否在视野内等等
// factory function
static Frame::Ptr createFrame();
// find the depth in depth map
double findDepth( const cv::KeyPoint& kp );
// Get Camera Center
Vector3d getCamCenter() const;
// check if a point is in this frame
bool isInFrame( const Vector3d& pt_world );
,方法:创建 Frame、寻找给定点对应的深度、获取相机光心、判断某个点是否在视野内等等
// factory function
static Frame::Ptr createFrame();
// find the depth in depth map
double findDepth( const cv::KeyPoint& kp );
// Get Camera Center
Vector3d getCamCenter() const;
// check if a point is in this frame
bool isInFrame