Class CudaTemplateMatching
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
DepthTypeThe depth type of the image that will be used in the template matching
channels
intThe number of channels of the image that will be used in the template matching
method
TemplateMatchingTypeSpecifies the way the template must be compared with image regions
blockSize
SizeThe 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
IInputArrayImage where the search is running. It should be 8-bit or 32-bit floating-point
templ
IInputArraySearched template; must be not greater than the source image and the same data type as the image
result
IOutputArrayA 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
StreamUse a Stream to call the function asynchronously (non-blocking) or null to call the function synchronously (blocking).