fix tutorial on real time pose estimation
authorSteven <steven.puttemans@kuleuven.be>
Thu, 15 Feb 2018 14:44:51 +0000 (15:44 +0100)
committerSteven <steven.puttemans@kuleuven.be>
Thu, 15 Feb 2018 14:48:52 +0000 (15:48 +0100)
samples/cpp/tutorial_code/calib3d/real_time_pose_estimation/src/main_detection.cpp

index 90ded1a..2ed4ce2 100644 (file)
@@ -222,7 +222,7 @@ int main(int argc, char *argv[])
     Mat inliers_idx;
     vector<Point2f> 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