Table of Contents

Method RegisterCameras

Namespace
OpenCvSharp
Assembly
OpenCvSharp.dll

RegisterCameras(IEnumerable<Mat>, IEnumerable<Mat>, IEnumerable<Mat>, IEnumerable<Mat>, InputArray, InputArray, CameraModel, InputArray, InputArray, CameraModel, InputOutputArray, InputOutputArray, OutputArray, OutputArray, OutputArray, CalibrationFlags, TermCriteria?)

Registers a pair of cameras (OpenCV 5), estimating the relative pose (R, T) between them. The two cameras may use different camera models (pinhole / fisheye).

public static double RegisterCameras(IEnumerable<Mat> objectPoints1, IEnumerable<Mat> objectPoints2, IEnumerable<Mat> imagePoints1, IEnumerable<Mat> imagePoints2, InputArray cameraMatrix1, InputArray distCoeffs1, CameraModel cameraModel1, InputArray cameraMatrix2, InputArray distCoeffs2, CameraModel cameraModel2, InputOutputArray r, InputOutputArray t, OutputArray e, OutputArray f, OutputArray perViewErrors, CalibrationFlags flags = CalibrationFlags.None, TermCriteria? criteria = null)

Parameters

objectPoints1 IEnumerable<Mat>

Object points observed by the first camera.

objectPoints2 IEnumerable<Mat>

Object points observed by the second camera.

imagePoints1 IEnumerable<Mat>

Image points for the first camera.

imagePoints2 IEnumerable<Mat>

Image points for the second camera.

cameraMatrix1 InputArray

Intrinsic matrix of the first camera.

distCoeffs1 InputArray

Distortion coefficients of the first camera.

cameraModel1 CameraModel

Camera model of the first camera.

cameraMatrix2 InputArray

Intrinsic matrix of the second camera.

distCoeffs2 InputArray

Distortion coefficients of the second camera.

cameraModel2 CameraModel

Camera model of the second camera.

r InputOutputArray

Input/Output rotation between the first and second camera coordinate systems.

t InputOutputArray

Input/Output translation between the camera coordinate systems.

e OutputArray

Output essential matrix.

f OutputArray

Output fundamental matrix.

perViewErrors OutputArray

Output per-view RMS reprojection errors.

flags CalibrationFlags

Operation flags. Only UseExtrinsicGuess is supported.

criteria TermCriteria?

Termination criteria for the iterative optimization algorithm.

Returns

double

Overall RMS reprojection error.