matchTemplate function

Mat matchTemplate(
  1. Mat image,
  2. Mat templ,
  3. int method, {
  4. OutputArray? result,
  5. Mat? mask,
})

MatchTemplate compares a template against overlapped image regions.

For further details, please see: https:///docs.opencv.org/master/df/dfb/group__imgproc__object.html#ga586ebfb0a7fb604b35a23d85391329be

Implementation

Mat matchTemplate(Mat image, Mat templ, int method, {OutputArray? result, Mat? mask}) {
  mask ??= Mat.empty();
  result ??= Mat.empty();
  cvRun(() => cffi.MatchTemplate(image.ref, templ.ref, result!.ref, method, mask!.ref));
  return result;
}