imaqLearnPattern3

NI Vision for LabWindows/CVI Function

imaqLearnPattern3

Usage

int imaqLearnPattern3(Image* image, LearningMode learningMode, LearnPatternAdvancedOptions* advancedOptions, const Image* mask);

Purpose

Creates a description of the template image you want to search for during the matching phase.

Image Types Supported

IMAQ_IMAGE_U8

Parameters

Name

Type

Description

image Image* The image about which the function learns pattern matching information. The function appends the pattern matching information to the image.
learningMode LearningMode The mode in which the function learns the template image.
advancedOptions LearnPatternAdvancedOptions* Advanced options to the algorithm.
mask const Image* An optional mask image. This image must be an IMAQ_IMAGE_U8 image. The function learns only those pixels in the source image whose corresponding pixels in the mask are non-zero. Set this parameter to NULL to learn the whole image.

Return Value

Type

Description

int On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().