Template Matching. More...

Functions

AFAPI array matchTemplate (const array &searchImg, const array &templateImg, const matchType mType=AF_SAD)
 C++ Interface for image template matching. More...
 
AFAPI af_err af_match_template (af_array *out, const af_array search_img, const af_array template_img, const af_match_type m_type)
 C Interface for image template matching. More...
 

Detailed Description

Template Matching.

Template matching is an image processing technique to find small patches of an image which match a given template image. A more in depth discussion on the topic can be found here.


Template matching is an image processing technique to find small patches of an image which match a given template image. Currently, this function doesn't support the following three metrics yet.

A more in depth discussion about template matching can be found here.


Function Documentation

AFAPI af_err af_match_template ( af_array out,
const af_array  search_img,
const af_array  template_img,
const af_match_type  m_type 
)

C Interface for image template matching.

Parameters
[out]outwill have disparity values for the window starting at corresponding pixel position
[in]search_imgis an array with image data
[in]template_imgis the template we are looking for in the image
[in]m_typeis metric that should be used to calculate the disparity between window in the image and the template image. It can be one of the values defined by the enum af_match_type
Returns
AF_SUCCESS if disparity metric is computed successfully, otherwise an appropriate error code is returned.
Note
If search_img is 3d array, a batch operation will be performed.
AFAPI array af::matchTemplate ( const array searchImg,
const array templateImg,
const matchType  mType = AF_SAD 
)

C++ Interface for image template matching.

Parameters
[in]searchImgis an array with image data
[in]templateImgis the template we are looking for in the image
[in]mTypeis metric that should be used to calculate the disparity between window in the image and the template image. It can be one of the values defined by the enum af_match_type
Returns
array with disparity values for the window starting at corresponding pixel position
Note
If search_img is 3d array, a batch operation will be performed.
Examples:
computer_vision/matching.cpp.