diff --git a/samples/cpp/tutorial_code/calib3d/real_time_pose_estimation/src/main_detection.cpp b/samples/cpp/tutorial_code/calib3d/real_time_pose_estimation/src/main_detection.cpp index c51f9518b5..42e38f13fe 100644 --- a/samples/cpp/tutorial_code/calib3d/real_time_pose_estimation/src/main_detection.cpp +++ b/samples/cpp/tutorial_code/calib3d/real_time_pose_estimation/src/main_detection.cpp @@ -75,7 +75,6 @@ int main(int argc, char *argv[]) const cv::String keys = "{help h | | print this message }" - "{camera c | | use real time camera }" "{video v | | path to recorded video }" "{model | | path to yml model }" "{mesh | | path to ply mesh }" @@ -97,9 +96,9 @@ int main(int argc, char *argv[]) } else { - video_read_path = parser.has("video") ? parser.get(0) : video_read_path; - yml_read_path = parser.has("model") ? parser.get(1) : yml_read_path; - ply_read_path = parser.has("mesh") ? parser.get(2) : ply_read_path; + video_read_path = parser.get("video").size() > 0 ? parser.get("video") : video_read_path; + yml_read_path = parser.get("model").size() > 0 ? parser.get("model") : yml_read_path; + ply_read_path = parser.get("mesh").size() > 0 ? parser.get("mesh") : ply_read_path; numKeyPoints = !parser.has("keypoints") ? parser.get("keypoints") : numKeyPoints; ratio = !parser.has("ratio") ? parser.get("ratio") : ratio; fast_match = !parser.has("fast") ? parser.get("fast") : fast_match; diff --git a/samples/cpp/tutorial_code/calib3d/real_time_pose_estimation/src/main_registration.cpp b/samples/cpp/tutorial_code/calib3d/real_time_pose_estimation/src/main_registration.cpp index f53c2d5ae2..c1d3e7678d 100644 --- a/samples/cpp/tutorial_code/calib3d/real_time_pose_estimation/src/main_registration.cpp +++ b/samples/cpp/tutorial_code/calib3d/real_time_pose_estimation/src/main_registration.cpp @@ -80,7 +80,7 @@ static void onMouseModelRegistration( int event, int x, int y, int, void* ) } /** Main program **/ -int main(int argc, char *argv[]) +int main() { help();