findHomographyUsacAsync function

Future<Mat> findHomographyUsacAsync(
  1. InputArray srcPoints,
  2. InputArray dstPoints,
  3. UsacParams params, {
  4. OutputArray? mask,
})

FindHomography finds an optimal homography matrix using 4 or more point pairs (as opposed to GetPerspectiveTransform, which uses exactly 4)

Mat cv::findHomography (InputArray srcPoints, InputArray dstPoints, OutputArray mask, const UsacParams &params)

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

Implementation

Future<Mat> findHomographyUsacAsync(
  InputArray srcPoints,
  InputArray dstPoints,
  UsacParams params, {
  OutputArray? mask,
}) async {
  mask ??= Mat.empty();
  final prval = calloc<cvg.Mat>();
  return cvRunAsync0(
    (callback) => ccalib3d.cv_findHomography_1(
      srcPoints.ref,
      dstPoints.ref,
      mask!.ref,
      params.ref,
      prval,
      callback,
    ),
    (c) => c.complete(Mat.fromPointer(prval)),
  );
}