Table of Contents

Method FindEssentialMat

Namespace
OpenCvSharp
Assembly
OpenCvSharp.dll

FindEssentialMat(InputArray, InputArray, InputArray, EssentialMatMethod, double, double, OutputArray)

Calculates an essential matrix from the corresponding points in two images.

public static Mat FindEssentialMat(InputArray points1, InputArray points2, InputArray cameraMatrix, EssentialMatMethod method = EssentialMatMethod.Ransac, double prob = 0.999, double threshold = 1, OutputArray mask = default)

Parameters

points1 InputArray

Array of N (N >= 5) 2D points from the first image. The point coordinates should be floating-point (single or double precision).

points2 InputArray

Array of the second image points of the same size and format as points1 .

cameraMatrix InputArray

Camera matrix K=⎡⎣⎢fx000fy0cxcy1⎤⎦⎥ . Note that this function assumes that points1 and points2 are feature points from cameras with the same camera matrix.

method EssentialMatMethod

Method for computing an essential matrix. RANSAC for the RANSAC algorithm. LMEDS for the LMedS algorithm.

prob double

Parameter used for the RANSAC or LMedS methods only. It specifies a desirable level of confidence (probability) that the estimated matrix is correct.

threshold double

Parameter used 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.

mask OutputArray

Output array of N elements, every element of which is set to 0 for outliers and to 1 for the other points. The array is computed only in the RANSAC and LMedS methods.

Returns

Mat

essential matrix

FindEssentialMat(InputArray, InputArray, double, Point2d, EssentialMatMethod, double, double, OutputArray)

Calculates an essential matrix from the corresponding points in two images.

public static Mat FindEssentialMat(InputArray points1, InputArray points2, double focal, Point2d pp, EssentialMatMethod method = EssentialMatMethod.Ransac, double prob = 0.999, double threshold = 1, OutputArray mask = default)

Parameters

points1 InputArray

Array of N (N >= 5) 2D points from the first image. The point coordinates should be floating-point (single or double precision).

points2 InputArray

Array of the second image por LMedS methods only. It specifies a desirable level of confidence (probability) that the estimated matrix is correct.

focal double

Focal length of the camera. Note that this function assumes that points1 and points2 are feature points from cameras with same focal length and principal point.

pp Point2d

principal point of the camera.

method EssentialMatMethod

Method for computing an essential matrix. RANSAC for the RANSAC algorithm. LMEDS for the LMedS algorithm.

prob double

Parameter used for the RANSAC othe accuracy of the point localization, image resolution, and the image noise.

threshold double

Parameter used 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 ints of the same size and format as points1 .

mask OutputArray

Output array of N elements, every element of which is set to 0 for outliers and to 1 for the other points. The array is computed only in the RANSAC and LMedS methods.

Returns

Mat

essential matrix