//只传入association.txt
//1305031102.175304 rgb/1305031102.175304.png 1305031102.160407 depth/1305031102.160407.png
//以字符串流的形式分别读取时间戳,RGB,Depth图像。
void LoadImages(const string &strAssociationFilename, vector<string> &vstrImageFilenamesRGB,
vector<string> &vstrImageFilenamesD, vector<double> &vTimestamps)
{
ifstream fAssociation;
fAssociation.open(strAssociationFilename.c_str());
while(!fAssociation.eof())
{
string s;
getline(fAssociation,s);
if(!s.empty())
{
stringstream ss;
ss << s;
double t;
string sRGB, sD;
ss >> t;
vTimestamps.push_back(t);
ss >> sRGB;
vstrImageFilenamesRGB.push_back(sRGB);
ss >> t;
ss >> sD;
vstrImageFilenamesD.push_back(sD);
}
}
}
[SLAM]ORB SLAM2系列 void LoadImages(){}
最新推荐文章于 2024-02-05 19:24:57 发布