Closed fnoop closed 7 years ago
vision_landing passes through -markerthreshold correctly, but track_targets sets a default:
2017-08-29 11:19:14,452 INFO Launching track_targets with arguments:/srv/maverick/software/vision_landing/track_targets -d /srv/maverick/software/vision_landing/markers/FNOOP3.dict -o appsrc ! videorate ! videoconvert ! x264enc ! matroskamux ! filesink location=/var/tmp/landing-out2.mkv -w 1920 -g 1080 -f 30 -v -z 0:0.42,1:0.42,2:0.42,3:0.42,4:0.42,5:0.42,6:0.42,7:0.42,8:0.42,9:0.42 --markerhistory 1000 --markerthreshold 0 /var/tmp/raspivid-2017-08-28-16-17-18.h264 /srv/maverick/software/vision_landing/calibration/raspicamv1-calibration-1280x720.yml 0.42
2017-08-29 11:19:15,575 INFO track_targets: debug:Marker Threshold:50
uint32_t marker_threshold;
if (args::get(markerthreshold)) {
marker_threshold = args::get(markerthreshold);
} else {
marker_threshold = 50;
}
Need to test if param is set, rather than boolean test which is returning falsey for zero.
args::ValueFlag<int> markerthreshold(parser, "markerthreshold", "Marker tracking threshold, percentage", {"markerthreshold"});
What does the arg parser return, if it's not set?
Arg parser returns 0, and if 0 it was setting to 50 default. Remove that logic and leave it at zero.
Setting markerthreshold=0 logically should match targets with no minimum threshold - ie. a single frame - but it doesn't.