The function slids through image, compares overlapped patches of size wxh with templ using the specified method and return the comparison results

Namespace:  Emgu.CV
Assembly:  Emgu.CV (in Emgu.CV.dll) Version: 2.0.1.0 (2.0.1.0)

Syntax

C#
public Image<Gray, float> MatchTemplate(
	Image<TColor, TDepth> template,
	TM_TYPE method
)
Visual Basic (Declaration)
Public Function MatchTemplate ( _
	template As Image(Of TColor, TDepth), _
	method As TM_TYPE _
) As Image(Of Gray, Single)
Visual C++
public:
Image<Gray, float>^ MatchTemplate(
	Image<TColor, TDepth>^ template, 
	TM_TYPE method
)

Parameters

template
Type: Emgu.CV..::.Image<(Of <(TColor, TDepth>)>)
Searched template; must be not greater than the source image and the same data type as the image
method
Type: Emgu.CV.CvEnum..::.TM_TYPE
Specifies the way the template must be compared with image regions

Return Value

The comparison result: width = this.Width - template.Width + 1; height = this.Height - template.Height + 1

See Also