estimateAffine2D function

(Mat, Mat) estimateAffine2D(
  1. VecPoint2f from,
  2. VecPoint2f to, {
  3. int method = RANSAC,
  4. double ransacReprojThreshold = 3,
  5. int maxIters = 2000,
  6. double confidence = 0.99,
  7. int refineIters = 10,
  8. OutputArray? inliers,
})

Implementation

(Mat, Mat inliers) estimateAffine2D(
  VecPoint2f from,
  VecPoint2f to, {
  int method = RANSAC,
  double ransacReprojThreshold = 3,
  int maxIters = 2000,
  double confidence = 0.99,
  int refineIters = 10,
  OutputArray? inliers,
}) {
  inliers ??= Mat.empty();
  final p = calloc<cvg.Mat>();
  cvRun(
    () => cffi.EstimateAffine2DWithParams(
      from.ref,
      to.ref,
      inliers!.ref,
      method,
      ransacReprojThreshold,
      maxIters,
      confidence,
      refineIters,
      p,
    ),
  );
  return (Mat.fromPointer(p), inliers);
}