phaseCorrelateAsync function

Future<(Point2f, double)> phaseCorrelateAsync(
  1. InputArray src1,
  2. InputArray src2, {
  3. InputArray? window,
})

Apply phaseCorrelate.

For further details, please see: https:///docs.opencv.org/master/d7/df3/group__imgproc__motion.html#ga552420a2ace9ef3fb053cd630fdb4952

Implementation

Future<(Point2f rval, double response)> phaseCorrelateAsync(
  InputArray src1,
  InputArray src2, {
  InputArray? window,
}) async =>
    cvRunAsync2(
      (callback) =>
          cffi.PhaseCorrelate_Async(src1.ref, src2.ref, window?.ref ?? Mat.empty().ref, callback),
      (c, p, p1) {
        final response = p1.cast<ffi.Double>().value;
        calloc.free(p1);
        c.complete((Point2f.fromPointer(p.cast<cvg.Point2f>()), response));
      },
    );