《视觉SLAM十四讲》源码详细注解---/project/0.2/visual_odometry

本文详细解读了《视觉SLAM十四讲》中有关/project/0.2/visual_odometry的源码,涵盖了逻辑框架的要素图和流程图,包括初始化状态和正常运转状态的描述。同时,提到了头文件和源文件的位置,虽然目前是初步版本,后续计划进行优化。
摘要由CSDN通过智能技术生成

逻辑框架——要素图

逻辑框架——流程图——>初始化状态

逻辑框架——流程图——>正常运转状态

头文件——/slam14/project/0.2/include/myslam/visual_odometry.h

/*
 * <one line to give the program's name and a brief idea of what it does.>
 * Copyright (C) 2016  <copyright holder> <email>
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 */

#ifndef VISUALODOMETRY_H
#define VISUALODOMETRY_H

#include "myslam/common_include.h"
#include "myslam/map.h"

#include <opencv2/features2d/features2d.hpp>

namespace myslam 
{
class VisualOdometry
{
public:
    typedef shared_ptr<VisualOdometry> Ptr;

    //枚举表征VO状态,初始化、正常、丢失
    enum VOState {
        INITIALIZING=-1,
        OK=0,
        LOST
    };

    //VO状态、地图(关键帧和特征点)、参考帧、当前帧
    VOState     state_;     // current VO status
    Map::Ptr    map_;       // map with all frames and map points
    Frame::Ptr  ref_;       // reference frame 
    Frame::Ptr  curr_;      // current frame 
    
    //orb、当前帧特征点KeyPoint、当前帧描述子、参考帧3D坐标Point3f、参考帧描述子、匹配关系
    cv::Ptr<cv::ORB> orb_;  // orb detector and computer 
    // 当前帧的关键点,描述子存放位置
    vector<cv::KeyPoint>    keypoints_curr_;    // keypoints in current frame
    Mat                     descriptors_curr_;  // descriptor in current frame 
    // 引用帧关键点,描述子存放位置
    vector<cv::Point3f>     pts_3d_ref_;        // 3d points in reference frame 
    Mat                     descriptors_ref_;   // descriptor in reference frame 
    // 当前帧vs引用帧匹配结果存放位置
    vector<cv::DMatch>      feature_matches_;
    
    //位姿估计T、内点数(即为匹配出的关键点数量)、丢失数
    SE3 T_c
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值