最近在运行ORBLAM2开源算法,由于自己采集的数据已经做了对齐处理,就不需要用associate.py将rgb数据和深度数据做对齐处理,但是程序运行过程中需要associated.txt,因此我就按照自己的采集的数据名称手动输出了一个txt文件。
#include<iostream>
#include<fstream>
using namespace std;
int main()
{
double x, y, z;
int m;
ofstream outfile("E:/data/a.txt", ios::in);
if (!outfile)
{
cerr << "open f1.txt error!\n";
return 0;
}
int aa = 100000;
for (int i = 0; i < 108; i++)
{
outfile << aa + i << " " << "rgb/" << aa + i << ".png";
outfile << " " << aa + i << " " << "depth/" << aa + i << ".png" << endl;
}
//outfile << x << endl;
outfile.close();
return 0;
}