Table of Contents

Method FindFundamentalMat

Namespace
OpenCvSharp
Assembly
OpenCvSharp.dll

FindFundamentalMat(InputArray, InputArray, FundamentalMatMethods, double, double, OutputArray)

Calculates a fundamental matrix from the corresponding points in two images.

public static Mat FindFundamentalMat(InputArray points1, InputArray points2, FundamentalMatMethods method = FundamentalMatMethods.Ransac, double param1 = 3, double param2 = 0.99, OutputArray mask = default)

Parameters

points1 InputArray

Array of N 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 .

method FundamentalMatMethods

Method for computing a fundamental matrix.

param1 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.

param2 double

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

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. For other methods, it is set to all 1’s.

Returns

Mat

fundamental matrix

FindFundamentalMat(IEnumerable<Point2f>, IEnumerable<Point2f>, FundamentalMatMethods, double, double, OutputArray)

Calculates a fundamental matrix from the corresponding points in two images.

[SuppressMessage("Maintainability", "CA1508: Avoid dead conditional code")]
public static Mat FindFundamentalMat(IEnumerable<Point2f> points1, IEnumerable<Point2f> points2, FundamentalMatMethods method = FundamentalMatMethods.Ransac, double param1 = 3, double param2 = 0.99, OutputArray mask = default)

Parameters

points1 IEnumerable<Point2f>

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

points2 IEnumerable<Point2f>

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

method FundamentalMatMethods

Method for computing a fundamental matrix.

param1 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.

param2 double

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

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. For other methods, it is set to all 1’s.

Returns

Mat

fundamental matrix

FindFundamentalMat(IEnumerable<Point2d>, IEnumerable<Point2d>, FundamentalMatMethods, double, double, OutputArray)

Calculates a fundamental matrix from the corresponding points in two images.

[SuppressMessage("Maintainability", "CA1508: Avoid dead conditional code")]
public static Mat FindFundamentalMat(IEnumerable<Point2d> points1, IEnumerable<Point2d> points2, FundamentalMatMethods method = FundamentalMatMethods.Ransac, double param1 = 3, double param2 = 0.99, OutputArray mask = default)

Parameters

points1 IEnumerable<Point2d>

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

points2 IEnumerable<Point2d>

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

method FundamentalMatMethods

Method for computing a fundamental matrix.

param1 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.

param2 double

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

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. For other methods, it is set to all 1’s.

Returns

Mat

fundamental matrix

FindFundamentalMat(InputArray, InputArray, OutputArray, UsacParams?)

Calculates a fundamental matrix from the corresponding points in two images, using the USAC robust estimation framework (OpenCV 5).

public static Mat FindFundamentalMat(InputArray points1, InputArray points2, OutputArray mask, UsacParams? @params)

Parameters

points1 InputArray

Array of N points from the first image.

points2 InputArray

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

mask OutputArray

Output array of N elements; every element marks an inlier (1) or outlier (0).

params UsacParams

USAC parameters. Null uses the defaults.

Returns

Mat

The estimated fundamental matrix.