Table of Contents

Method StereoCalibrate

Namespace
OpenCvSharp
Assembly
OpenCvSharp.dll

StereoCalibrate(IReadOnlyList<Mat>, IReadOnlyList<Mat>, IReadOnlyList<Mat>, InputOutputArray, InputOutputArray, InputOutputArray, InputOutputArray, Size, OutputArray, OutputArray, OutputArray, OutputArray, CalibrationFlags, TermCriteria?)

finds intrinsic and extrinsic parameters of a stereo camera

public static double StereoCalibrate(IReadOnlyList<Mat> objectPoints, IReadOnlyList<Mat> imagePoints1, IReadOnlyList<Mat> imagePoints2, InputOutputArray cameraMatrix1, InputOutputArray distCoeffs1, InputOutputArray cameraMatrix2, InputOutputArray distCoeffs2, Size imageSize, OutputArray R, OutputArray T, OutputArray E, OutputArray F, CalibrationFlags flags = CalibrationFlags.FixIntrinsic, TermCriteria? criteria = null)

Parameters

objectPoints IReadOnlyList<Mat>

Vector of vectors of the calibration pattern points.

imagePoints1 IReadOnlyList<Mat>

Vector of vectors of the projections of the calibration pattern points, observed by the first camera.

imagePoints2 IReadOnlyList<Mat>

Vector of vectors of the projections of the calibration pattern points, observed by the second camera.

cameraMatrix1 InputOutputArray

Input/output first camera matrix

distCoeffs1 InputOutputArray

Input/output vector of distortion coefficients (k_1, k_2, p_1, p_2[, k_3[, k_4, k_5, k_6]]) of 4, 5, or 8 elements. The output vector length depends on the flags.

cameraMatrix2 InputOutputArray

Input/output second camera matrix. The parameter is similar to cameraMatrix1 .

distCoeffs2 InputOutputArray

Input/output lens distortion coefficients for the second camera. The parameter is similar to distCoeffs1 .

imageSize Size

Size of the image used only to initialize intrinsic camera matrix.

R OutputArray

Output rotation matrix between the 1st and the 2nd camera coordinate systems.

T OutputArray

Output translation vector between the coordinate systems of the cameras.

E OutputArray

Output essential matrix.

F OutputArray

Output fundamental matrix.

flags CalibrationFlags

Different flags that may be zero or a combination of the CalibrationFlag values

criteria TermCriteria?

Termination criteria for the iterative optimization algorithm.

Returns

double

StereoCalibrate(IEnumerable<IEnumerable<Point3f>>, IEnumerable<IEnumerable<Point2f>>, IEnumerable<IEnumerable<Point2f>>, double[,], double[], double[,], double[], Size, OutputArray, OutputArray, OutputArray, OutputArray, CalibrationFlags, TermCriteria?)

finds intrinsic and extrinsic parameters of a stereo camera

public static double StereoCalibrate(IEnumerable<IEnumerable<Point3f>> objectPoints, IEnumerable<IEnumerable<Point2f>> imagePoints1, IEnumerable<IEnumerable<Point2f>> imagePoints2, double[,] cameraMatrix1, double[] distCoeffs1, double[,] cameraMatrix2, double[] distCoeffs2, Size imageSize, OutputArray R, OutputArray T, OutputArray E, OutputArray F, CalibrationFlags flags = CalibrationFlags.FixIntrinsic, TermCriteria? criteria = null)

Parameters

objectPoints IEnumerable<IEnumerable<Point3f>>

Vector of vectors of the calibration pattern points.

imagePoints1 IEnumerable<IEnumerable<Point2f>>

Vector of vectors of the projections of the calibration pattern points, observed by the first camera.

imagePoints2 IEnumerable<IEnumerable<Point2f>>

Vector of vectors of the projections of the calibration pattern points, observed by the second camera.

cameraMatrix1 double[,]

Input/output first camera matrix

distCoeffs1 double[]

Input/output vector of distortion coefficients (k_1, k_2, p_1, p_2[, k_3[, k_4, k_5, k_6]]) of 4, 5, or 8 elements. The output vector length depends on the flags.

cameraMatrix2 double[,]

Input/output second camera matrix. The parameter is similar to cameraMatrix1 .

distCoeffs2 double[]

Input/output lens distortion coefficients for the second camera. The parameter is similar to distCoeffs1 .

imageSize Size

Size of the image used only to initialize intrinsic camera matrix.

R OutputArray

Output rotation matrix between the 1st and the 2nd camera coordinate systems.

T OutputArray

Output translation vector between the coordinate systems of the cameras.

E OutputArray

Output essential matrix.

F OutputArray

Output fundamental matrix.

flags CalibrationFlags

Different flags that may be zero or a combination of the CalibrationFlag values

criteria TermCriteria?

Termination criteria for the iterative optimization algorithm.

Returns

double