estimateAffine3D function

(int, Mat, Mat) estimateAffine3D(
  1. Mat src,
  2. Mat dst, {
  3. Mat? out,
  4. Mat? inliers,
  5. double ransacThreshold = 3,
  6. double confidence = 0.99,
})

Computes an optimal affine transformation between two 3D point sets.

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

Implementation

(int rval, Mat, Mat inliers) estimateAffine3D(
  Mat src,
  Mat dst, {
  Mat? out,
  Mat? inliers,
  double ransacThreshold = 3,
  double confidence = 0.99,
}) {
  out ??= Mat.empty();
  inliers ??= Mat.empty();
  final p = calloc<ffi.Int>();
  cvRun(
    () => ccalib3d.cv_estimateAffine3D_1(
      src.ref,
      dst.ref,
      out!.ref,
      inliers!.ref,
      ransacThreshold,
      confidence,
      p,
      ffi.nullptr,
    ),
  );
  final rval = p.value;
  calloc.free(p);
  return (rval, out, inliers);
}