imaqMatchPattern
Usage
PatternMatch* imaqMatchPattern(const Image* image, Image* pattern, const MatchPatternOptions* options, Rect searchRect, int* numMatches);
Purpose
Searches for areas in an image that match a given template image.
Note This function is obsolete. The replacement function is imaqMatchPattern2(). |
Image Types Supported
IMAQ_IMAGE_U8
Parameters
Name
|
Type
|
Description
|
---|---|---|
image | const Image* | The image in which the function finds matches to the template image. |
pattern | Image* | The pattern image to find in the image. NI Vision must learn this template image in imaqLearnPattern() before using it in this function. |
options | const MatchPatternOptions* | Describes how to search for the template image. |
searchRect | Rect | Specifies a rectangle in the image in which to search for the template image. Set this parameter to IMAQ_NO_RECT to search for the template image in the entire image. |
numMatches | int* | On return, the number of matches to the template image that the function found. Set this parameter to NULL if you do not need this information. |
Return Value
Type |
Description |
---|---|
PatternMatch* | On success, this function returns an array of information about each match found. On failure, this function returns NULL. To get extended error information, call imaqGetLastError(). When you are finished with the return value, dispose of the pointer by calling imaqDispose(). |
Parameter Discussion
options—,Set the options parameter to NULL to use the default options, as follows:
mode | IMAQ_MATCH_SHIFT_INVARIANT |
minContrast | 10 |
subpixelAccuracy | FALSE |
angleRanges | NULL (all angles allowed) |
numRanges | 0 |
numMatchesRequested | 1 |
matchFactor | 0 |
minMatchScore | 800 |