estimateTranslation3DAsync function

Future<(int, Mat, Mat)> estimateTranslation3DAsync(
  1. InputArray src,
  2. InputArray dst, {
  3. OutputArray? out,
  4. OutputArray? inliers,
  5. double ransacThreshold = 3,
  6. double confidence = 0.99,
})

Computes an optimal translation between two 3D point sets.

int cv::estimateTranslation3D (InputArray src, InputArray dst, OutputArray out, OutputArray inliers, double ransacThreshold=3, double confidence=0.99)

https://docs.opencv.org/4.11.0/d9/d0c/group__calib3d.html#ga0ea15af08887dd5afa68d81711d395ff

Implementation

Future<(int rval, Mat out, Mat inliers)> estimateTranslation3DAsync(
  InputArray src,
  InputArray dst, {
  OutputArray? out,
  OutputArray? inliers,
  double ransacThreshold = 3,
  double confidence = 0.99,
}) async {
  out ??= Mat.empty();
  inliers ??= Mat.empty();
  final prval = calloc<ffi.Int>();
  return cvRunAsync0(
    (callback) => ccalib3d.cv_estimateTranslation3D(
      src.ref,
      dst.ref,
      out!.ref,
      inliers!.ref,
      ransacThreshold,
      confidence,
      prval,
      callback,
    ),
    (c) {
      final rval = prval.value;
      calloc.free(prval);
      return c.complete((rval, out!, inliers!));
    },
  );
}