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
objPointsIEnumerable<Mat>Calibration pattern object points per frame (each NUM_POINTS x 3, CV_32FC1).
imagePointsIReadOnlyList<IReadOnlyList<Mat>>Detected pattern points per camera then per frame (NUM_CAMERAS x NUM_FRAMES, each NUM_POINTS x 2, CV_32FC1).
imageSizeIEnumerable<Size>Image resolution for each camera.
detectionMaskInputArrayPer-camera per-frame detection mask (NUM_CAMERAS x NUM_FRAMES, CV_8U).
modelsInputArrayPer-camera camera models (NUM_CAMERAS x 1, CV_8U; see CameraModel).
ksMat[]Output per-camera intrinsic matrices.
distortionsMat[]Output per-camera distortion coefficients.
rsMat[]Output per-camera rotation matrices relative to camera 0.
tsMat[]Output per-camera translation vectors relative to camera 0.
flagsForIntrinsicsInputArrayOptional per-camera intrinsics-calibration flags (NUM_CAMERAS x 1, CV_32S).
flagsCalibrationFlagsCommon multi-view calibration flags. Only UseIntrinsicGuess and UseExtrinsicGuess are supported.
criteriaTermCriteria?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.