solvePnPAsync function
        
Future<(bool, Mat, Mat)> 
solvePnPAsync(
    
- InputArray objectPoints,
- InputArray imagePoints,
- InputArray cameraMatrix,
- InputArray distCoeffs, {
- OutputArray? rvec,
- OutputArray? tvec,
- bool useExtrinsicGuess = false,
- int flags = SOLVEPNP_ITERATIVE,
Finds an object pose from 3D-2D point correspondences.
https://docs.opencv.org/4.11.0/d9/d0c/group__calib3d.html#ga549c2075fac14829ff4a58bc931c033d
Implementation
Future<(bool rval, Mat rvec, Mat tvec)> solvePnPAsync(
  InputArray objectPoints,
  InputArray imagePoints,
  InputArray cameraMatrix,
  InputArray distCoeffs, {
  OutputArray? rvec,
  OutputArray? tvec,
  bool useExtrinsicGuess = false,
  int flags = SOLVEPNP_ITERATIVE,
}) async {
  rvec ??= Mat.empty();
  tvec ??= Mat.empty();
  final prval = calloc<ffi.Bool>();
  return cvRunAsync0(
    (callback) => ccalib3d.cv_solvePnP(
      objectPoints.ref,
      imagePoints.ref,
      cameraMatrix.ref,
      distCoeffs.ref,
      rvec!.ref,
      tvec!.ref,
      useExtrinsicGuess,
      flags,
      prval,
      callback,
    ),
    (c) {
      final rval = prval.value;
      calloc.free(prval);
      return c.complete((rval, rvec!, tvec!));
    },
  );
}