Search for Templates Using Pattern Matching

NI Vision Assistant

Search for Templates Using Pattern Matching

Note  The Pattern Matching function works only with 8-bit images.

Main Tab

  1. In the Step Name control, enter a descriptive name for the step.
  2. 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.

Template Tab

Choose one of the following methods to specify the template for the step:

  1. Click Create Template, select an ROI, and click OK. Enter a File name for the template and click OK.

    or

  2. Click Load from File, browse to the appropriate template file, and click OK.

    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 red pointer in the template image or adjusting the Match Offset values.

Settings Tab

  1. Modify Number of Matches to Find, Minimum Score, and Subpixel Accuracy as necessary.
  2. Select Search for Rotated Patterns to indicate that the 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 also can include the mirrored angle range by enabling Mirror Angle.
  3. Click OK to save this step to the script.