本文整理汇总了C++中Drawer::DrawRoute方法的典型用法代码示例。如果您正苦于以下问题:C++ Drawer::DrawRoute方法的具体用法?C++ Drawer::DrawRoute怎么用?C++ Drawer::DrawRoute使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Drawer
的用法示例。
在下文中一共展示了Drawer::DrawRoute方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
int main(int argc ,char* argv[]){
if(argc != 2){
std::cout << "Usage:" << std::endl << "%s ./FeatureViewer input.txt"<<std::endl<<std::endl;
return 0;
}
std::string nvmpath;
std::string imgpath;
int lengh,cam,numofimg,numofLines;
if(readPath(argv[1], &imgpath, &nvmpath, &cam, &lengh, &numofimg, &numofLines) == 0){
return 0;
}
std::cout << "****************************************" << std::endl << "How to use..." << std::endl << " * [n] key : Move to Next Frame" << std::endl;
std::cout << " * [p] key : Move to previous Frame" << std::endl;
std::cout << " * [q] key : Quit thie application" << std::endl << "****************************************" << std::endl<< std::endl;
std::cout << " * imgpath:" << imgpath << std::endl;
std::cout << " * nvmpath:" << nvmpath << std::endl;
std::cout << " * pertitition_number:" << cam << std::endl;
std::cout << " * rought_lengh:" << lengh << std::endl;
std::cout << " * num_of_imgs:" << numofimg << std::endl;
std::cout << " * num_of_lines:" << numofLines << std::endl << std::endl;
int numpic=0;
ImageViewer imgv(cam,lengh, "FeatureViewer");
Reader reader(cam,imgpath,nvmpath);
Drawer drawer;
if(reader.setFeaturePoint(1,numofLines) != 0){
exit(0);
}
reader.setImg(cam, 0, numofimg-1);
reader.sortKeyFrameID();
imgv.setWindow();
for(int i=lengh+1; i<reader.ik.size();i++){
std::vector<std::vector<ImageKeeper>> drawnCam(cam);
for(int j=0; j<12; j++){
for(int k=0; k<lengh+1;k++){
drawnCam[j].push_back(reader.getIKbyID(j,reader.keyFrameID[i-k]));
}
}
std::vector< std::vector<bool> > flagCam(cam);
for(int j=0;j<cam;j++){
drawer.DrawPoints(drawnCam[j][0]);
flagCam[j].resize(drawnCam[j][0].getFeaturesSize());
}
for(int j=0;j<cam;j++){
for(int k=0;k<cam;k++){
if(j!=k){
drawnCam[k][1].getFeatureFlags(drawnCam[j][0],flagCam[j]);
}
}
}
for(int j=0;j<cam;j++){
drawer.DrawRoute(drawnCam[j],drawnCam[j][0].getIMG(),flagCam[j]);
}
std::vector<ImageKeeper> preimg;
std::vector<ImageKeeper> viewedimg;
for(int j=0;j<cam;j++){
preimg.push_back(drawnCam[j][1]);
viewedimg.push_back(drawnCam[j][0]);
}
showData(viewedimg);
imgv.showImgsTheta(viewedimg, preimg);
checkCommand(&i,cv::waitKey(0));
}
return 0;
}