estimateTranslation3D function

(int, Mat, Mat) estimateTranslation3D(
  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

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