LearnPattern2 Method

NI Vision for Visual Basic

LearnPattern2 Method

Syntax

CWIMAQVision.LearnPattern2 Pattern [, LearnPatternOptions]

Return Type

Long

On success, this method returns 0. On failure, this method returns a negative number.

Purpose

Creates a description of the template image for which you are going to look during the matching stage. This description data is appended to the input template image. During the matching step, the template descriptor is extracted from the template image and used to search for the template in the match image.

Remarks

Use this method with U8 images.

Parameters

Pattern As CWIMAQImage

The template image that you want to search for in the image.

LearnPatternOptions As Variant

[Optional] A CWIMAQLearnPatternOptions object that specifies the parameters the method uses for learning.

Example

Pattern Matching Example

See Also

MatchPattern2

CWIMAQLearnPatternOptions

MatchColorPattern

LearnColorPattern