Справочник Пользователя для National Instruments IMAQ Vision for LabWindows TM /CVI

Скачать
Страница из 119
Chapter 5
Performing Machine Vision Tasks
© National Instruments Corporation
5-15
Positional Information
A template with strong edges in both the x and y directions is easier to 
locate. Figure 5-9a shows good positional information in both the x and 
y directions, while Figure 5-9b shows insufficient positional information in 
the y direction.
Figure 5-9.  Positional Information
Background Information
Unique background information in a template improves search 
performance and accuracy. Figure 5-10a shows a pattern with insufficient 
background information. Figure 5-10b illustrates a 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 
imaqLearnPattern2()
 to learn the template. The learning 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, 
then the pattern matching algorithm has to learn only those features from 
a.
b.
a.
b.