calibrateCameraAsync function
Future<(double, Mat, Mat, Mat, Mat)>
calibrateCameraAsync(
- 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
Future<(double rmsErr, Mat cameraMatrix, Mat distCoeffs, Mat rvecs, Mat tvecs)> calibrateCameraAsync(
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),
}) async =>
cvRunAsync3(
(callback) => cffi.calibrateCamera_Async(
objectPoints.ref,
imagePoints.ref,
imageSize.cvd.ref,
cameraMatrix.ref,
distCoeffs.ref,
flags,
criteria.cvd.ref,
callback,
),
(c, p, p1, p2) {
final rmsErr = p.cast<ffi.Double>().value;
calloc.free(p);
final rvecs = Mat.fromPointer(p1.cast());
final tvecs = Mat.fromPointer(p2.cast());
return c.complete((rmsErr, cameraMatrix, distCoeffs, rvecs, tvecs));
},
);