calibrateCamera function
(double, Mat, Mat, Mat, Mat)
calibrateCamera(
- Contours3f objectPoints,
- Contours2f imagePoints,
- (int, int) imageSize,
- InputOutputArray cameraMatrix,
- InputOutputArray distCoeffs, {
- Mat? rvecs,
- Mat? tvecs,
- int flags = 0,
- (int, int, double) criteria = (TERM_COUNT + TERM_EPS, 30, 1e-4),
Implementation
(double rmsErr, Mat cameraMatrix, Mat distCoeffs, Mat rvecs, Mat tvecs) calibrateCamera(
Contours3f objectPoints,
Contours2f imagePoints,
(int, int) imageSize,
InputOutputArray cameraMatrix,
InputOutputArray distCoeffs, {
Mat? rvecs,
Mat? tvecs,
int flags = 0,
(int type, int count, double eps) criteria = (TERM_COUNT + TERM_EPS, 30, 1e-4),
}) {
rvecs ??= Mat.empty();
tvecs ??= Mat.empty();
final cRmsErr = calloc<ffi.Double>();
cvRun(
() => cffi.CalibrateCamera(
objectPoints.ref,
imagePoints.ref,
imageSize.cvd.ref,
cameraMatrix.ref,
distCoeffs.ref,
rvecs!.ref,
tvecs!.ref,
flags,
criteria.cvd.ref,
cRmsErr,
),
);
final rmsErr = cRmsErr.value;
calloc.free(cRmsErr);
return (rmsErr, cameraMatrix, distCoeffs, rvecs, tvecs);
}