From 6f4e35cc0e7b7a9f7b1eaaf5e49a5ef6dc208208 Mon Sep 17 00:00:00 2001 From: Steven Date: Thu, 15 Feb 2018 15:44:51 +0100 Subject: [PATCH] fix tutorial on real time pose estimation --- .../calib3d/real_time_pose_estimation/src/main_detection.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 90ded1a0ad..2ed4ce2d90 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 @@ -222,7 +222,7 @@ int main(int argc, char *argv[]) Mat inliers_idx; vector list_points2d_inliers; - if(good_matches.size() > 0) // None matches, then RANSAC crashes + if(good_matches.size() >= 4) // OpenCV requires solvePnPRANSAC to minimally have 4 set of points { // -- Step 3: Estimate the pose using RANSAC approach