From 69b146412a01d64f68e73686ee7bc21da55485c7 Mon Sep 17 00:00:00 2001 From: Olexa Bilaniuk Date: Tue, 3 Feb 2015 22:55:40 -0500 Subject: [PATCH] Edited Doxygen documentation in the module calib3d. Added a mention within calib3d.hpp that the flag RHO is available as an option on calls to findHomography(). --- modules/calib3d/include/opencv2/calib3d.hpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/modules/calib3d/include/opencv2/calib3d.hpp b/modules/calib3d/include/opencv2/calib3d.hpp index 3b8e3c7c1..bfc5c5f7e 100644 --- a/modules/calib3d/include/opencv2/calib3d.hpp +++ b/modules/calib3d/include/opencv2/calib3d.hpp @@ -266,8 +266,9 @@ a vector\ . - **0** - a regular method using all the points - **RANSAC** - RANSAC-based robust method - **LMEDS** - Least-Median robust method +- **RHO** - PROSAC-based robust method @param ransacReprojThreshold Maximum allowed reprojection error to treat a point pair as an inlier -(used in the RANSAC method only). That is, if +(used in the RANSAC and RHO methods only). That is, if \f[\| \texttt{dstPoints} _i - \texttt{convertPointsHomogeneous} ( \texttt{H} * \texttt{srcPoints} _i) \| > \texttt{ransacReprojThreshold}\f] then the point \f$i\f$ is considered an outlier. If srcPoints and dstPoints are measured in pixels, it usually makes sense to set this parameter somewhere in the range of 1 to 10. @@ -290,7 +291,7 @@ pairs to compute an initial homography estimate with a simple least-squares sche However, if not all of the point pairs ( \f$srcPoints_i\f$, \f$dstPoints_i\f$ ) fit the rigid perspective transformation (that is, there are some outliers), this initial estimate will be poor. In this case, -you can use one of the two robust methods. Both methods, RANSAC and LMeDS , try many different +you can use one of the three robust methods. The methods RANSAC, LMeDS and RHO try many different random subsets of the corresponding point pairs (of four pairs each), estimate the homography matrix using this subset and a simple least-square algorithm, and then compute the quality/goodness of the computed homography (which is the number of inliers for RANSAC or the median re-projection error for @@ -301,7 +302,7 @@ Regardless of the method, robust or not, the computed homography matrix is refin inliers only in case of a robust method) with the Levenberg-Marquardt method to reduce the re-projection error even more. -The method RANSAC can handle practically any ratio of outliers but it needs a threshold to +The methods RANSAC and RHO can handle practically any ratio of outliers but need a threshold to distinguish inliers from outliers. The method LMeDS does not need any threshold but it works correctly only when there are more than 50% of inliers. Finally, if there are no outliers and the noise is rather small, use the default method (method=0).