mirror of
https://github.com/opencv/opencv.git
synced 2026-07-29 23:33:05 +04:00
Improve the doc for fundamental matrix.
This commit is contained in:
@@ -227,7 +227,7 @@ namespace cv
|
||||
//! @{
|
||||
|
||||
//! type of the robust estimation algorithm
|
||||
enum { LMEDS = 4, //!< least-median algorithm
|
||||
enum { LMEDS = 4, //!< least-median of squares algorithm
|
||||
RANSAC = 8, //!< RANSAC algorithm
|
||||
RHO = 16 //!< RHO algorithm
|
||||
};
|
||||
@@ -281,8 +281,8 @@ enum { CALIB_USE_INTRINSIC_GUESS = 0x00001,
|
||||
//! the algorithm for finding fundamental matrix
|
||||
enum { FM_7POINT = 1, //!< 7-point algorithm
|
||||
FM_8POINT = 2, //!< 8-point algorithm
|
||||
FM_LMEDS = 4, //!< least-median algorithm
|
||||
FM_RANSAC = 8 //!< RANSAC algorithm
|
||||
FM_LMEDS = 4, //!< least-median algorithm. 7-point algorithm is used.
|
||||
FM_RANSAC = 8 //!< RANSAC algorithm. It needs at least 15 points. 7-point algorithm is used.
|
||||
};
|
||||
|
||||
|
||||
@@ -1412,11 +1412,11 @@ floating-point (single or double precision).
|
||||
- **CV_FM_8POINT** for an 8-point algorithm. \f$N \ge 8\f$
|
||||
- **CV_FM_RANSAC** for the RANSAC algorithm. \f$N \ge 8\f$
|
||||
- **CV_FM_LMEDS** for the LMedS algorithm. \f$N \ge 8\f$
|
||||
@param param1 Parameter used for RANSAC. It is the maximum distance from a point to an epipolar
|
||||
@param ransacReprojThreshold Parameter used only for RANSAC. It is the maximum distance from a point to an epipolar
|
||||
line in pixels, beyond which the point is considered an outlier and is not used for computing the
|
||||
final fundamental matrix. It can be set to something like 1-3, depending on the accuracy of the
|
||||
point localization, image resolution, and the image noise.
|
||||
@param param2 Parameter used for the RANSAC or LMedS methods only. It specifies a desirable level
|
||||
@param confidence Parameter used for the RANSAC and LMedS methods only. It specifies a desirable level
|
||||
of confidence (probability) that the estimated matrix is correct.
|
||||
@param mask
|
||||
|
||||
@@ -1454,13 +1454,13 @@ stereoRectifyUncalibrated to compute the rectification transformation. :
|
||||
*/
|
||||
CV_EXPORTS_W Mat findFundamentalMat( InputArray points1, InputArray points2,
|
||||
int method = FM_RANSAC,
|
||||
double param1 = 3., double param2 = 0.99,
|
||||
double ransacReprojThreshold = 3., double confidence = 0.99,
|
||||
OutputArray mask = noArray() );
|
||||
|
||||
/** @overload */
|
||||
CV_EXPORTS Mat findFundamentalMat( InputArray points1, InputArray points2,
|
||||
OutputArray mask, int method = FM_RANSAC,
|
||||
double param1 = 3., double param2 = 0.99 );
|
||||
double ransacReprojThreshold = 3., double confidence = 0.99 );
|
||||
|
||||
/** @brief Calculates an essential matrix from the corresponding points in two images.
|
||||
|
||||
@@ -1770,12 +1770,20 @@ CV_EXPORTS_W void reprojectImageTo3D( InputArray disparity,
|
||||
|
||||
/** @brief Calculates the Sampson Distance between two points.
|
||||
|
||||
The function sampsonDistance calculates and returns the first order approximation of the geometric error as:
|
||||
\f[sd( \texttt{pt1} , \texttt{pt2} )= \frac{(\texttt{pt2}^t \cdot \texttt{F} \cdot \texttt{pt1})^2}{(\texttt{F} \cdot \texttt{pt1})(0) + (\texttt{F} \cdot \texttt{pt1})(1) + (\texttt{F}^t \cdot \texttt{pt2})(0) + (\texttt{F}^t \cdot \texttt{pt2})(1)}\f]
|
||||
The fundamental matrix may be calculated using the cv::findFundamentalMat function. See HZ 11.4.3 for details.
|
||||
The function cv::sampsonDistance calculates and returns the first order approximation of the geometric error as:
|
||||
\f[
|
||||
sd( \texttt{pt1} , \texttt{pt2} )=
|
||||
\frac{(\texttt{pt2}^t \cdot \texttt{F} \cdot \texttt{pt1})^2}
|
||||
{((\texttt{F} \cdot \texttt{pt1})(0))^2 +
|
||||
((\texttt{F} \cdot \texttt{pt1})(1))^2 +
|
||||
((\texttt{F}^t \cdot \texttt{pt2})(0))^2 +
|
||||
((\texttt{F}^t \cdot \texttt{pt2})(1))^2}
|
||||
\f]
|
||||
The fundamental matrix may be calculated using the cv::findFundamentalMat function. See @cite HartleyZ00 11.4.3 for details.
|
||||
@param pt1 first homogeneous 2d point
|
||||
@param pt2 second homogeneous 2d point
|
||||
@param F fundamental matrix
|
||||
@return The computed Sampson distance.
|
||||
*/
|
||||
CV_EXPORTS_W double sampsonDistance(InputArray pt1, InputArray pt2, InputArray F);
|
||||
|
||||
@@ -2402,9 +2410,9 @@ optimization. It stays at the center or at a different location specified when C
|
||||
TermCriteria criteria = TermCriteria(TermCriteria::COUNT + TermCriteria::EPS, 100, DBL_EPSILON));
|
||||
|
||||
//! @} calib3d_fisheye
|
||||
}
|
||||
} // end namespace fisheye
|
||||
|
||||
} // cv
|
||||
} //end namespace cv
|
||||
|
||||
#ifndef DISABLE_OPENCV_24_COMPATIBILITY
|
||||
#include "opencv2/calib3d/calib3d_c.h"
|
||||
|
||||
Reference in New Issue
Block a user