OrbSlam代码
导航 ------转载ncepu_Chen
ORB-SLAM2代码详解03: 地图点MapPoint
ORB-SLAM2代码详解04: 帧Frame
ORB-SLAM2代码详解05: 关键帧KeyFrame
ORB-SLAM2代码详解06: 单目初始化器Initializer
ORB-SLAM2代码详解07: 跟踪线程Tracking
ORB-SLAM2代码详解08: 局部建图线程LocalMapping
ORB-SLAM2代码详解09: 闭环线程LoopClosing
运行流程
#include<iostream>
#include<algorithm>
#include<fstream>
#include<chrono>
#include<opencv2/core/core.hpp>
#include<System.h>
#include<unistd.h>
using namespace std;
/**
* @brief 获取图像文件的信息
* @param[in] strImagePath 图像文件存放路径
* @param[in] strPathTimes 时间戳文件的存放路径
* @param[out] vstrImages 图像文件名数组
* @param[out] vTimeStamps 时间戳数组
*/
void LoadImages(const string &strImagePath, const string &strPathTimes,
vector<string> &vstrImages, vector<double> &vTimeStamps);
int main(int argc, char **argv)
{
// step 0 判断输入参数的个数是否足够
if(argc != 5)
{
cerr << endl << "Usage: ./mono_tum path_to_vocabulary path_to_settings path_to_image_folder path_to_times_file" << endl;
return 1;
}
// step 1 加载图像
// Retrieve paths to images
vector<string> vstrImageFilenames; // 图像序列的文件名字符串序列
vector<double> vTimestamps; // 时间戳
LoadImages(string(argv[3]), <