Click or drag to resize

Cv2FindEssentialMat Method (InputArray, InputArray, InputArray, EssentialMatMethod, Double, Double, OutputArray)

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

Namespace:  OpenCvSharp
Assembly:  OpenCvSharp (in OpenCvSharp.dll) Version: 1.0.0
Syntax
public static Mat FindEssentialMat(
	InputArray points1,
	InputArray points2,
	InputArray cameraMatrix,
	EssentialMatMethod method = EssentialMatMethod.Ransac,
	double prob = 0.999,
	double threshold = 1,
	OutputArray mask = null
)

Parameters

points1
Type: OpenCvSharpInputArray
Array of N (N >= 5) 2D points from the first image. The point coordinates should be floating-point (single or double precision).
points2
Type: OpenCvSharpInputArray
Array of the second image points of the same size and format as points1 .
cameraMatrix
Type: OpenCvSharpInputArray
Camera matrix K=⎡⎣⎢fx000fy0cxcy1⎤⎦⎥ . Note that this function assumes that points1 and points2 are feature points from cameras with the same camera matrix.
method (Optional)
Type: OpenCvSharpEssentialMatMethod
Method for computing an essential matrix. RANSAC for the RANSAC algorithm. LMEDS for the LMedS algorithm.
prob (Optional)
Type: SystemDouble
Parameter used for the RANSAC or LMedS methods only. It specifies a desirable level of confidence (probability) that the estimated matrix is correct.
threshold (Optional)
Type: SystemDouble
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 (Optional)
Type: OpenCvSharpOutputArray
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.

Return Value

Type: Mat
essential matrix
See Also