findTransformECC function

(double, Mat) findTransformECC(
  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

(double ret, Mat warpMatrix) findTransformECC(
  InputArray templateImage,
  InputArray inputImage,
  InputOutputArray warpMatrix,
  int motionType,
  (int, int, double) criteria,
  InputArray inputMask,
  int gaussFiltSize,
) {
  final p = calloc<ffi.Double>();
  cvRun(
    () => cvideo.cv_findTransformECC(
      templateImage.ref,
      inputImage.ref,
      warpMatrix.ref,
      motionType,
      criteria.toTermCriteria().ref,
      inputMask.ref,
      gaussFiltSize,
      p,
      ffi.nullptr,
    ),
  );
  final rval = (p.value, warpMatrix);
  calloc.free(p);
  return rval;
}