Chapter 5
Machine Vision
©
National Instruments Corporation
5-21
IMAQ Vision for LabWindows/CVI User Manual
The training or learning process is time-intensive because the algorithm
attempts to find optimal features of the template for the particular matching
process. However, you can train the pattern matching algorithm offline, and
save the template image using
imaqWriteVisionFile()
.
Defining a Search Area
Two equally important factors define the success of a color pattern
matching algorithm—accuracy and speed. You can define a search area to
reduce ambiguity in the search process. For example, if your image has
multiple instances of a pattern and only one instance is required for the
inspection task, the presence of additional instances of the pattern can
produce incorrect results. To avoid this, reduce the search area so that only
the desired pattern lies within the search area. For example, in the fuse box
inspection example use the location of the fuses to be inspected to define
the search area. Because the inspected fuse box may not be in the exact
location or have the same orientation in the image as the previous one, the
search area you define should be large enough to accommodate these
variations in the position of the box. Figure 5-12 shows how search areas
can be selected for different objects.