findTransformECCAsync function

Future<(double, Mat)> findTransformECCAsync(
  1. InputArray templateImage,
  2. InputArray inputImage,
  3. InputOutputArray warpMatrix,
  4. int motionType,
  5. (int, int, double) criteria,
  6. InputArray inputMask,
  7. int gaussFiltSize,
)

FindTransformECC finds the geometric transform (warp) between two images in terms of the ECC criterion.

For futther details, please see: https://docs.opencv.org/4.x/dc/d6b/group__video__track.html#ga1aa357007eaec11e9ed03500ecbcbe47

Implementation

Future<(double ret, Mat warpMatrix)> findTransformECCAsync(
  InputArray templateImage,
  InputArray inputImage,
  InputOutputArray warpMatrix,
  int motionType,
  (int, int, double) criteria,
  InputArray inputMask,
  int gaussFiltSize,
) async =>
    cvRunAsync(
        (callback) => cvideo.FindTransformECC_Async(
              templateImage.ref,
              inputImage.ref,
              warpMatrix.ref,
              motionType,
              criteria.cvd.ref,
              inputMask.ref,
              gaussFiltSize,
              callback,
            ), (completer, p) {
      final rval = p.cast<ffi.Double>().value;
      calloc.free(p);
      completer.complete((rval, warpMatrix));
    });