Table of Contents

Method CalibrateMultiview

Namespace
OpenCvSharp
Assembly
OpenCvSharp.dll

CalibrateMultiview(IEnumerable<Mat>, IReadOnlyList<IReadOnlyList<Mat>>, IEnumerable<Size>, InputArray, InputArray, out Mat[], out Mat[], out Mat[], out Mat[], InputArray, CalibrationFlags, TermCriteria?)

Estimates intrinsics and extrinsics (camera poses) for a multi-camera system, a.k.a. multi-view calibration (OpenCV 5).

public static double CalibrateMultiview(IEnumerable<Mat> objPoints, IReadOnlyList<IReadOnlyList<Mat>> imagePoints, IEnumerable<Size> imageSize, InputArray detectionMask, InputArray models, out Mat[] ks, out Mat[] distortions, out Mat[] rs, out Mat[] ts, InputArray flagsForIntrinsics = default, CalibrationFlags flags = CalibrationFlags.None, TermCriteria? criteria = null)

Parameters

objPoints IEnumerable<Mat>

Calibration pattern object points per frame (each NUM_POINTS x 3, CV_32FC1).

imagePoints IReadOnlyList<IReadOnlyList<Mat>>

Detected pattern points per camera then per frame (NUM_CAMERAS x NUM_FRAMES, each NUM_POINTS x 2, CV_32FC1).

imageSize IEnumerable<Size>

Image resolution for each camera.

detectionMask InputArray

Per-camera per-frame detection mask (NUM_CAMERAS x NUM_FRAMES, CV_8U).

models InputArray

Per-camera camera models (NUM_CAMERAS x 1, CV_8U; see CameraModel).

ks Mat[]

Output per-camera intrinsic matrices.

distortions Mat[]

Output per-camera distortion coefficients.

rs Mat[]

Output per-camera rotation matrices relative to camera 0.

ts Mat[]

Output per-camera translation vectors relative to camera 0.

flagsForIntrinsics InputArray

Optional per-camera intrinsics-calibration flags (NUM_CAMERAS x 1, CV_32S).

flags CalibrationFlags

Common multi-view calibration flags. Only UseIntrinsicGuess and UseExtrinsicGuess are supported.

criteria TermCriteria?

Termination criteria for the iterative optimization algorithm.

Returns

double

Overall RMS reprojection error.

Remarks

The point matrices must use single-channel CV_32F layout: each object-point matrix is NUM_POINTS x 3 (CV_32FC1) and each image-point matrix is NUM_POINTS x 2 (CV_32FC1). Partially observed patterns are supported by setting the unobserved image points to invalid values (e.g. (-1, -1)) and clearing the corresponding entry in detectionMask.