Training The Pattern Matching Algorithm - National Instruments IMAQTM User Manual

Vision for visual basic
Table of Contents

Advertisement

© National Instruments Corporation
Background Information
Unique background information in a template improves search
performance and accuracy.
a Pattern with Insufficient Background Information
b Pattern with Sufficient Background Information
Figure 5-10. Background Information

Training the Pattern Matching Algorithm

After you create a good template image, the pattern matching
algorithm has to learn the important features of the template. Use
CWIMAQVision.LearnPattern2
process depends on the type of matching that you expect to perform. If you
do not expect the instance of the template in the image to rotate or change
its size, the pattern matching algorithm has to learn only those features
from the template that are necessary for shift-invariant matching. However,
if you want to match the template at any orientation, the learning mode
must consider the possibility of arbitrary orientations. To specify
which type of learning mode to use, pass the learn mode to
the
LearnPatternOptions
CWIMAQVision.LearnPattern2
property of a CWIMAQLearnPatternOptions object and pass this object
for the
LearnPatternOptions
CWIMAQVision.LearnPattern2
The learning process is usually time intensive because the algorithm
attempts to find unique features of the template that allow for fast, accurate
matching. The learning mode you choose also affects the speed of the
learning process. Learning the template for shift-invariant matching is
faster than learning for rotation-invariant matching. You also can save time
by training the pattern matching algorithm offline, and then saving the
template image with
CWIMAQVision.WriteImageAndVisionInfo
Chapter 5
a.
to learn the template. The learning
parameter of
. You also can set the
parameter of
.
5-15
IMAQ Vision for Visual Basic User Manual
Performing Machine Vision Tasks
b.
LearnMode
.

Advertisement

Table of Contents
loading

This manual is also suitable for:

Imaq

Table of Contents