Method MatchTemplate
- Namespace
- OpenCvSharp
- Assembly
- OpenCvSharp.dll
MatchTemplate(InputArray, InputArray, OutputArray, TemplateMatchModes, InputArray)
Computes the proximity map for the raster template and the image where the template is searched for
public static void MatchTemplate(InputArray image, InputArray templ, OutputArray result, TemplateMatchModes method, InputArray mask = default)
Parameters
imageInputArrayImage where the search is running; should be 8-bit or 32-bit floating-point
templInputArraySearched template; must be not greater than the source image and have the same data type
resultOutputArrayA map of comparison results; will be single-channel 32-bit floating-point. If image is WxH and templ is wxh then result will be (W-w+1) x (H-h+1).
methodTemplateMatchModesSpecifies the comparison method
maskInputArrayMask of searched template. It must have the same datatype and size with templ. It is not set by default.