【学习SLAM】视觉SLAM笔记之Frame 类

Frame 类

  1. [数据成员]定义了 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() );
  1. [方法函数]创建 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
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值