imaqMatchPattern2
Usage
PatternMatch* imaqMatchPattern2(const Image* image, const Image* pattern, const MatchPatternOptions* options, const MatchPatternOptions* advancedOptions, Rect searchRect, int* numMatches);
Purpose
Searches for areas in an image that match a given template image.
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 | const Image* | The pattern image to find in the image. Use imaqLearnPattern2() to learn the template image before using it with this function. |
options | const MatchPatternOptions* | Describes how to search for the template image. |
advancedOptions | const MatchPatternOptions* | Describes additionally 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 |