Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2225b25

Browse files
authored
Merge pull request #25488 from inkredibl:doc-fix-findEssentialMat
Fix documentation for findEssentialMat to reflect how it actually works. #25488 Documentation for findEssentialMat() incorrectly states that the method uses the same cameraMatrix for both lists of points even though there are two cameraMatrix and distCoeffs. Checked the code and it does the right thing i.e. uses cameraMatrix1, distCoeffs1 for points1 and cameraMatrix2, distCoeffs2 for points2. Updated the documentation for the method to clarify what it does. The code itself is not changed.
1 parent ebea657 commit 2225b25

File tree

1 file changed

+10
-20
lines changed

1 file changed

+10
-20
lines changed

modules/calib3d/include/opencv2/calib3d.hpp

Lines changed: 10 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2492,13 +2492,13 @@ CV_EXPORTS_W Mat findFundamentalMat( InputArray points1, InputArray points2,
24922492
24932493
@param points1 Array of N (N \>= 5) 2D points from the first image. The point coordinates should
24942494
be floating-point (single or double precision).
2495-
@param points2 Array of the second image points of the same size and format as points1 .
2495+
@param points2 Array of the second image points of the same size and format as points1.
24962496
@param cameraMatrix Camera intrinsic matrix \f$\cameramatrix{A}\f$ .
24972497
Note that this function assumes that points1 and points2 are feature points from cameras with the
2498-
same camera intrinsic matrix. If this assumption does not hold for your use case, use
2499-
#undistortPoints with `P = cv::NoArray()` for both cameras to transform image points
2500-
to normalized image coordinates, which are valid for the identity camera intrinsic matrix. When
2501-
passing these coordinates, pass the identity matrix for this parameter.
2498+
same camera intrinsic matrix. If this assumption does not hold for your use case, use another
2499+
function overload or #undistortPoints with `P = cv::NoArray()` for both cameras to transform image
2500+
points to normalized image coordinates, which are valid for the identity camera intrinsic matrix.
2501+
When passing these coordinates, pass the identity matrix for this parameter.
25022502
@param method Method for computing an essential matrix.
25032503
- @ref RANSAC for the RANSAC algorithm.
25042504
- @ref LMEDS for the LMedS algorithm.
@@ -2590,23 +2590,13 @@ Mat findEssentialMat(
25902590
25912591
@param points1 Array of N (N \>= 5) 2D points from the first image. The point coordinates should
25922592
be floating-point (single or double precision).
2593-
@param points2 Array of the second image points of the same size and format as points1 .
2594-
@param cameraMatrix1 Camera matrix \f$K = \vecthreethree{f_x}{0}{c_x}{0}{f_y}{c_y}{0}{0}{1}\f$ .
2595-
Note that this function assumes that points1 and points2 are feature points from cameras with the
2596-
same camera matrix. If this assumption does not hold for your use case, use
2597-
#undistortPoints with `P = cv::NoArray()` for both cameras to transform image points
2598-
to normalized image coordinates, which are valid for the identity camera matrix. When
2599-
passing these coordinates, pass the identity matrix for this parameter.
2600-
@param cameraMatrix2 Camera matrix \f$K = \vecthreethree{f_x}{0}{c_x}{0}{f_y}{c_y}{0}{0}{1}\f$ .
2601-
Note that this function assumes that points1 and points2 are feature points from cameras with the
2602-
same camera matrix. If this assumption does not hold for your use case, use
2603-
#undistortPoints with `P = cv::NoArray()` for both cameras to transform image points
2604-
to normalized image coordinates, which are valid for the identity camera matrix. When
2605-
passing these coordinates, pass the identity matrix for this parameter.
2606-
@param distCoeffs1 Input vector of distortion coefficients
2593+
@param points2 Array of the second image points of the same size and format as points1.
2594+
@param cameraMatrix1 Camera matrix for the first camera \f$K = \vecthreethree{f_x}{0}{c_x}{0}{f_y}{c_y}{0}{0}{1}\f$ .
2595+
@param cameraMatrix2 Camera matrix for the second camera \f$K = \vecthreethree{f_x}{0}{c_x}{0}{f_y}{c_y}{0}{0}{1}\f$ .
2596+
@param distCoeffs1 Input vector of distortion coefficients for the first camera
26072597
\f$(k_1, k_2, p_1, p_2[, k_3[, k_4, k_5, k_6[, s_1, s_2, s_3, s_4[, \tau_x, \tau_y]]]])\f$
26082598
of 4, 5, 8, 12 or 14 elements. If the vector is NULL/empty, the zero distortion coefficients are assumed.
2609-
@param distCoeffs2 Input vector of distortion coefficients
2599+
@param distCoeffs2 Input vector of distortion coefficients for the second camera
26102600
\f$(k_1, k_2, p_1, p_2[, k_3[, k_4, k_5, k_6[, s_1, s_2, s_3, s_4[, \tau_x, \tau_y]]]])\f$
26112601
of 4, 5, 8, 12 or 14 elements. If the vector is NULL/empty, the zero distortion coefficients are assumed.
26122602
@param method Method for computing an essential matrix.

0 commit comments

Comments
 (0)