From 80b4f99b1e4f035b9be77e0ae835a2aea87a2ded Mon Sep 17 00:00:00 2001 From: edgarriba Date: Sat, 9 Aug 2014 18:16:44 +0200 Subject: [PATCH] bug fixed --- .../calib3d/real_time_pose_estimation/src/main_detection.cpp | 7 +++---- .../calib3d/real_time_pose_estimation/src/main_registration.cpp | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) 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 c51f951..42e38f1 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 f53c2d5..c1d3e76 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(); -- 2.7.4