看了很多SLAM的源码阅读和解析了,有的人已经写了很好了,但是对于一个刚入门的菜鸟来说还是看不太懂,没办法具体到每一个函数的功能,虽然大体的框架知道是怎么回事,但是细细想又搞不明白,所以决定自己写一个博客来详细记录学习的过程,重要的是做笔记,要不然总是忘记。
首先从框架说起,下面的代码来自ORB_SLAM2中的mono_kitti.cc
#include<iostream>
#include<algorithm>
#include<fstream>
#include<chrono>
#include<iomanip>
#include<opencv2/core/core.hpp>
#include"System.h"
using namespace std;
void LoadImages(const string &strSequence, vector<string> &vstrImageFilenames,
vector<double> &vTimestamps);
int main(int argc, char **argv)
{
if(argc != 4)
{
cerr << endl << "Usage: ./mono_kitti path_to_vocabulary path_to_settings path_to_sequence" << endl;
return 1;
}
// Retrieve paths to images
//检索图片位置
vector<string> vstrImageFilenames;
vector<double> vTimest