Table of Contents

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

image InputArray

Image where the search is running; should be 8-bit or 32-bit floating-point

templ InputArray

Searched template; must be not greater than the source image and have the same data type

result OutputArray

A 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).

method TemplateMatchModes

Specifies the comparison method

mask InputArray

Mask of searched template. It must have the same datatype and size with templ. It is not set by default.