Table of Contents

Method StereoRectifyUncalibrated

Namespace
OpenCvSharp
Assembly
OpenCvSharp.dll

StereoRectifyUncalibrated(InputArray, InputArray, InputArray, Size, OutputArray, OutputArray, double)

computes the rectification transformation for an uncalibrated stereo camera (zero distortion is assumed)

public static bool StereoRectifyUncalibrated(InputArray points1, InputArray points2, InputArray F, Size imgSize, OutputArray H1, OutputArray H2, double threshold = 5)

Parameters

points1 InputArray

Array of feature points in the first image.

points2 InputArray

The corresponding points in the second image. The same formats as in findFundamentalMat() are supported.

F InputArray

Input fundamental matrix. It can be computed from the same set of point pairs using findFundamentalMat() .

imgSize Size

Size of the image.

H1 OutputArray

Output rectification homography matrix for the first image.

H2 OutputArray

Output rectification homography matrix for the second image.

threshold double

Optional threshold used to filter out the outliers. If the parameter is greater than zero, all the point pairs that do not comply with the epipolar geometry (that is, the points for which |points2[i]^T * F * points1[i]| > threshold ) are rejected prior to computing the homographies. Otherwise, all the points are considered inliers.

Returns

bool

StereoRectifyUncalibrated(IEnumerable<Point2d>, IEnumerable<Point2d>, double[,], Size, out double[,], out double[,], double)

computes the rectification transformation for an uncalibrated stereo camera (zero distortion is assumed)

[SuppressMessage("Maintainability", "CA1508: Avoid dead conditional code")]
public static bool StereoRectifyUncalibrated(IEnumerable<Point2d> points1, IEnumerable<Point2d> points2, double[,] F, Size imgSize, out double[,] H1, out double[,] H2, double threshold = 5)

Parameters

points1 IEnumerable<Point2d>

Array of feature points in the first image.

points2 IEnumerable<Point2d>

The corresponding points in the second image. The same formats as in findFundamentalMat() are supported.

F double[,]

Input fundamental matrix. It can be computed from the same set of point pairs using findFundamentalMat() .

imgSize Size

Size of the image.

H1 double[,]

Output rectification homography matrix for the first image.

H2 double[,]

Output rectification homography matrix for the second image.

threshold double

Optional threshold used to filter out the outliers. If the parameter is greater than zero, all the point pairs that do not comply with the epipolar geometry (that is, the points for which |points2[i]^T * F * points1[i]| > threshold ) are rejected prior to computing the homographies. Otherwise, all the points are considered inliers.

Returns

bool