LearnColorPatternOptions

NI Vision for LabWindows/CVI Function

LearnColorPatternOptions

Describes the information the algorithm learns about a color pattern.

Elements

Name

Type

Description

learnMode LearningMode Specifies the invariance mode the function uses when learning the pattern.
featureMode ImageFeatureMode Specifies the features the function uses when learning the color pattern. If you set learnMode to either IMAQ_LEARN_ALL or IMAQ_LEARN_ROTATION_INFORMATION, featureMode must either be IMAQ_COLOR_AND_SHAPE_FEATURES or IMAQ_SHAPE_FEATURES.
threshold int Specifies the saturation threshold the function uses to distinguish between two colors that have the same hue values. Acceptable values range from 0 to 255.
ignoreMode ColorIgnoreMode Specifies whether the function excludes certain colors from the color features of the template image. Any color the function excludes during the learning process will also be excluded in the match phase.
colorsToIgnore ColorInformation* An array of ColorInformation structures providing a set of colors to exclude from the color features of the template image. The function ignores the dominant color from each ColorInformation structure. Any color excluded during the learning process is also ignored from the pattern in the match phase. Generate each ColorInformation structure using imaqLearnColor() with the sensitivity parameter set to IMAQ_SENSITIVITY_HIGH. Set this element to NULL if you do not need to ignore any colors.
numColorsToIgnore int The number of ColorInformation structures in the colorsToIgnore array.