phaseCorrelate function

(Point2f, double) phaseCorrelate(
  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

(Point2f rval, double response) phaseCorrelate(InputArray src1, InputArray src2, {InputArray? window}) {
  window ??= Mat.empty();
  return cvRunArena<(Point2f, double)>((arena) {
    final p = arena<ffi.Double>();
    final pp = calloc<cimgproc.Point2f>();
    cvRun(() => cimgproc.PhaseCorrelate(src1.ref, src2.ref, window!.ref, p, pp));
    return (Point2f.fromPointer(pp), p.value);
  });
}