| Cv2MatchTemplate Method |
Computes the proximity map for the raster template and the image where the template is searched for
Namespace:
OpenCvSharp
Assembly:
OpenCvSharp (in OpenCvSharp.dll) Version: 1.0.0
Syntax public static void MatchTemplate(
InputArray image,
InputArray templ,
OutputArray result,
TemplateMatchModes method,
InputArray mask = null
)
Public Shared Sub MatchTemplate (
image As InputArray,
templ As InputArray,
result As OutputArray,
method As TemplateMatchModes,
Optional mask As InputArray = Nothing
)
public:
static void MatchTemplate(
InputArray^ image,
InputArray^ templ,
OutputArray^ result,
TemplateMatchModes method,
InputArray^ mask = nullptr
)
static member MatchTemplate :
image : InputArray *
templ : InputArray *
result : OutputArray *
method : TemplateMatchModes *
?mask : InputArray
(* Defaults:
let _mask = defaultArg mask null
*)
-> unit
Parameters
- image
- Type: OpenCvSharpInputArray
Image where the search is running; should be 8-bit or 32-bit floating-point - templ
- Type: OpenCvSharpInputArray
Searched template; must be not greater than the source image and have the same data type - result
- Type: OpenCvSharpOutputArray
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
- Type: OpenCvSharpTemplateMatchModes
Specifies the comparison method - mask (Optional)
- Type: OpenCvSharpInputArray
Mask of searched template. It must have the same datatype and size with templ. It is not set by default.
See Also