Skip to content

Commit

Permalink
modify stereo_kitti
Browse files Browse the repository at this point in the history
  • Loading branch information
Horacehxw committed Apr 29, 2019
1 parent 0e5c923 commit 58cbde1
Show file tree
Hide file tree
Showing 44 changed files with 35 additions and 42 deletions.
16 changes: 12 additions & 4 deletions Examples/Stereo/stereo_kitti.cc
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ void LoadImages(const string &strPathToSequence, vector<string> &vstrImageLeft,

int main(int argc, char **argv)
{
if(argc != 4)
if(argc != 5 && argc != 6)
{
cerr << endl << "Usage: ./stereo_kitti path_to_vocabulary path_to_settings path_to_sequence" << endl;
cerr << endl << "Usage: ./stereo_kitti path_to_vocabulary path_to_settings path_to_sequence target_name path_to_cnn_model" << endl;
return 1;
}

Expand All @@ -50,13 +50,21 @@ int main(int argc, char **argv)

const int nImages = vstrImageLeft.size();

// path to load model
string model_path;
if (argc > 5) {
model_path = string(argv[5]);
}

// Create SLAM system. It initializes all system threads and gets ready to process frames.
ORB_SLAM2::System SLAM(argv[1],argv[2],ORB_SLAM2::System::STEREO,true);
ORB_SLAM2::System SLAM(argv[1],argv[2],ORB_SLAM2::System::STEREO,true, model_path);

// Vector for tracking time statistics
vector<float> vTimesTrack;
vTimesTrack.resize(nImages);



cout << endl << "-------" << endl;
cout << "Start processing sequence ..." << endl;
cout << "Images in the sequence: " << nImages << endl << endl;
Expand Down Expand Up @@ -122,7 +130,7 @@ int main(int argc, char **argv)
cout << "mean tracking time: " << totaltime/nImages << endl;

// Save camera trajectory
SLAM.SaveTrajectoryKITTI("CameraTrajectory.txt");
SLAM.SaveTrajectoryKITTI(string(argv[4]));

return 0;
}
Expand Down

Large diffs are not rendered by default.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 58cbde1

Please sign in to comment.