How to Match Patterns |
Template Editor
- Draw a region of interest around an area of the image for which you want to search in your inspection images. This region becomes the pattern matching template.
- Click Next to accept the template.
- Specify any areas of the template you want to ignore during pattern matching.
- Click Finish to learn the template image.
When you specify a template, the step automatically tries to find the template in the image. Template matches appear inside red rectangles in the image. The green rectangle indicates the region of interest in which the step searches for matches.
Main Tab
- In the Step Name control, enter a descriptive name for the step.
- Choose one of the following methods to specify the region of interest for the step:
- Create a new region of interest.
- Select Constant from the Region of Interest listbox.
- Select a tool from the menu toolbar that matches the type of region of interest you want to specify.
- Draw a region of interest on the image.
- Select a previously defined region of interest from the Region of Interest listbox.
- Create a new region of interest.
- Verify that the Reposition Region of Interest option is enabled if you want to link the region of interest specified in this step to a previously defined coordinate system.
Link the region of interest to a coordinate system if the position of the object under inspection changes from image to image, and you need to adjust the position of the region of interest to match the new location of the object.
Note This step can find rotated instances of the template without the assistance of a Set Coordinate System step. |
Template Tab
By default, the center of the template is used as the focal point of the template. You can change the location of the focal point to any position in the template.
- Change the focal point of the template by dragging the green pointer in the template image or adjusting the Match Offset values.
Settings Tab
- Set up the search conditions for finding the template.
- Select the number of matches you expect in the image.
- Specify whether a match can be a rotated version of the template. You can restrict the amount of rotation you want to allow by specifying an acceptable angle range. You can also include the mirrored angle range by enabling the Mirror Angle control.
- Set the minimum score that a match must have to be valid. Refer to the Matches table in the Limits tab to determine this score. The table lists matches whose score is above the minimum score and the first match whose score is below the minimum score. You can use this table to choose a Minimum Score value that finds the number of matches you request but excludes unwanted matches.
- Adjust the Search Level control to choose the appropriate search strategy for your application. If the template is very distinctive and different from the rest of the image, choose a more coarse strategy. This is the fastest but least thorough search level. As the template information becomes less distinctive and more similar to the background, use a more thorough search level.
Limits Tab
- Set the minimum and/or maximum number of matches you expect to find.