solveP3PAsync function
Future<(int, VecMat, VecMat)>
solveP3PAsync(
- InputArray objectPoints,
- InputArray imagePoints,
- InputArray cameraMatrix,
- InputArray distCoeffs,
- int flags, {
- VecMat? rvecs,
- VecMat? tvecs,
Finds an object pose from 3 3D-2D point correspondences.
https://docs.opencv.org/4.11.0/d9/d0c/group__calib3d.html#gae5af86788e99948d40b39a03f6acf623
Implementation
Future<(int rval, VecMat rvecs, VecMat tvecs)> solveP3PAsync(
InputArray objectPoints,
InputArray imagePoints,
InputArray cameraMatrix,
InputArray distCoeffs,
int flags, {
VecMat? rvecs,
VecMat? tvecs,
}) async {
rvecs ??= VecMat();
tvecs ??= VecMat();
final prval = calloc<ffi.Int>();
return cvRunAsync0(
(callback) => ccalib3d.cv_solveP3P(
objectPoints.ref,
imagePoints.ref,
cameraMatrix.ref,
distCoeffs.ref,
rvecs!.ptr,
tvecs!.ptr,
flags,
prval,
callback,
), (c) {
final rval = prval.value;
calloc.free(prval);
return c.complete((rval, rvecs!, tvecs!));
});
}