Chapter5 MachineVision
©NationalInstruments Corporation 5-21 IMAQVision for LabWindows/CVI User Manual
The trainingo rlearning process is time-intensive because the algorithm
attemptsto find optimal features of the template for the particular matching
process.However,you can train the pattern matching algorithm offline, and
savethe template image using imaqWriteVisionFile().
Defining a Search AreaTwo equally important factors define the success of a color pattern
matchingalgor ithm—accuracy and speed. You can definea searcharea to
reduceambiguity in the search process. For example, if your image has
multiple instances of a pattern and only one instance is required for the
inspectiontask, the presence of additional instances of the pattern can
produceincorrect results. To avoid this, reduce the search area so that only
thedesired pattern lies within the search area. For example, in the fuse box
inspectionexample use the l ocation of the fuses to be inspected to define
the search area. Because the inspected fuse box may not bein the exact
locationor have the same orientation in the image as the previous one, the
search area youd efineshould b el arge enough to accommodate these
variations in the position of the box. Figure 5-12 shows how search areas
can be selectedfor different objects.