Skip to content

Commit de09268

Browse files
committed
track-video-features: adapt params for higher resolution images (more tracked points)
1 parent ce379cc commit de09268

File tree

1 file changed

+10
-28
lines changed

1 file changed

+10
-28
lines changed

apps/track-video-features/track-video-feats_main.cpp

Lines changed: 10 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,9 @@ int DoTrackingDemo(CCameraSensor::Ptr cam, bool DO_SAVE_VIDEO)
8787

8888
// track, AND ALSO, add new features
8989
tracker->extra_params["add_new_features"] = 1;
90-
tracker->extra_params["desired_num_features_adapt"] = 500;
90+
tracker->extra_params["desired_num_features_adapt"] = 1500;
9191
tracker->extra_params["add_new_feat_min_separation"] = 30;
92-
tracker->extra_params["add_new_feat_max_features"] = 350;
92+
tracker->extra_params["add_new_feat_max_features"] = 500;
9393
// FAST9,10,12:
9494
tracker->extra_params["add_new_features_FAST_version"] = 10;
9595

@@ -98,7 +98,7 @@ int DoTrackingDemo(CCameraSensor::Ptr cam, bool DO_SAVE_VIDEO)
9898
tracker->extra_params["update_patches_every"] = 0;
9999

100100
// KLT-response to ensure good features:
101-
tracker->extra_params["minimum_KLT_response_to_add"] = 70;
101+
tracker->extra_params["minimum_KLT_response_to_add"] = 30;
102102
tracker->extra_params["check_KLT_response_every"] = 1;
103103
tracker->extra_params["minimum_KLT_response"] = 30;
104104
tracker->extra_params["KLT_response_half_win"] = 8;
@@ -496,34 +496,16 @@ int main(int argc, char** argv)
496496
std::cerr << mrpt::exception_to_str(e) << std::endl
497497
<< "Program finished for an exception!!" << std::endl;
498498
mrpt::system::pause();
499-
return -1;
500-
}
501-
catch (...)
502-
{
503-
std::cerr << "Untyped exception!!" << std::endl;
504-
mrpt::system::pause();
505-
return -1;
499+
return 1;
506500
}
507501
}
508502

509503
void showUsage(char* cmd)
510504
{
511-
cout << "Usage:\n"
512-
" "
513-
<< cmd
514-
<< " [--save-video] -> Ask the user for video source.\n"
515-
" "
516-
<< cmd
517-
<< " dataset.rawlog [--save-video] -> Use a rawlog file.\n"
518-
" "
519-
<< cmd
520-
<< " video.{avi,mpg}[--save-video] -> Use a video file.\n"
521-
" "
522-
<< cmd
523-
<< " --help -> Show this information.\n"
524-
" "
525-
<< cmd
526-
<< " If added --save-video, an video file will be created with "
527-
"results.\n"
528-
"\n";
505+
cout << "Usage:\n " << cmd
506+
<< " [--save-video] -> Ask the user for video source.\n " << //
507+
cmd << " dataset.rawlog [--save-video] -> Use a rawlog file.\n " << //
508+
cmd << " video.{avi,mpg}[--save-video] -> Use a video file.\n " << //
509+
cmd << " --help -> Show this information.\n " << //
510+
cmd << " If added --save-video, an video file will be created with results.\n";
529511
}

0 commit comments

Comments
 (0)