MatchPatternOptions

NI Vision for LabWindows/CVI Function

MatchPatternOptions

Describes how you want the function to search for the template image.

Note  imaqMatchPattern2() ignores the matchFactor element of MatchPatternOptions. Use the initialMatchListLength and matchListReductionFactor elements of MatchPatternAdvancedOptions to control the list of potential matches that imaqMatchPattern2 examines.

Elements

Name

Type

Description

mode MatchingMode Specifies the method to use when looking for the pattern in the image.
minContrast int Specifies the minimum contrast expected in the image.
subpixelAccuracy int Set this element to TRUE to return areas in the image that match the pattern area with subpixel accuracy.
angleRanges RotationAngleRange* An array of angle ranges, in degrees, where each range specifies how much you expect the pattern to be rotated in the image. To decrease the search time, limit the degrees of rotation in which you expect to find the template image. Set this element to NULL to allow all angles.
numRanges int Number of angle ranges in the angleRanges array.
numMatchesRequested int Number of valid matches expected.
matchFactor int Controls the number of potential matches that the function examines. Acceptable values range from 0 to 1,000. For most applications, set matchFactor to 0, which optimizes the speed of the algorithm. If you are not getting all of the numMatchesRequested, increasing this factor may increase the number of matches you receive but decreases the speed of the algorithm. Normally, increasing matchFactor is necessary only when looking for more than 200 matches per image.
minMatchScore float The minimum score a match can have for the function to consider the match valid.