Table of Contents

Class CudaTemplateMatching

Namespace
Emgu.CV.Cuda
Assembly
Emgu.CV.dll

Cuda template matching filter.

public class CudaTemplateMatching : SharedPtrObject, IDisposable
Inheritance
CudaTemplateMatching
Implements
Inherited Members

Constructors

CudaTemplateMatching(DepthType, int, TemplateMatchingType, Size)

Create a Cuda template matching filter

public CudaTemplateMatching(DepthType depthType, int channels, TemplateMatchingType method, Size blockSize = default)

Parameters

depthType DepthType

The depth type of the image that will be used in the template matching

channels int

The number of channels of the image that will be used in the template matching

method TemplateMatchingType

Specifies the way the template must be compared with image regions

blockSize Size

The block size

Methods

DisposeObject()

Release the buffer

protected override void DisposeObject()

Match(IInputArray, IInputArray, IOutputArray, Stream)

This function is similiar to cvCalcBackProjectPatch. It slids through image, compares overlapped patches of size wxh with templ using the specified method and stores the comparison results to result

public void Match(IInputArray image, IInputArray templ, IOutputArray result, Stream stream = null)

Parameters

image IInputArray

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

templ IInputArray

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

result IOutputArray

A map of comparison results; single-channel 32-bit floating-point. If image is WxH and templ is wxh then result must be W-w+1xH-h+1.

stream Stream

Use a Stream to call the function asynchronously (non-blocking) or null to call the function synchronously (blocking).