Search for Templates Using Geometric Matching

NI Vision Assistant

Search for Templates Using Geometric Matching

Note  The geometric 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:

  • Click New Template to launch the NI Vision Template Editor. Refer to the NI Vision Template Editor Help for instructions on how to create a geometric template. After creating a template, click Finish in the training interface to validate the template. Enter a File name, and click OK.

    or

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

Curve Settings Tab

By default, the values of the parameters in this tab are initialized to the values you selected in the training interface. You can adjust these values to improve edge detection in the inspection image.

Modify the Extraction Mode, Edge Threshold, Edge Filter Size, Minimum Length, Row Search Step Size, and Column Search Step Size to improve edge detection, if necessary.

Settings Tab

  1. Set the Number of Matches to Find, Minimum Score, and Subpixel Accuracy.
  2. Enable Search for matches that are: Rotated, Scaled, or Occluded to indicate that a match may be a rotated, scaled, or occluded version of the template. Specify an acceptable range for each parameter to restrict the amount of rotation, scale, or occlusion allowed in a valid match.
  3. Click OK to save this step to the script.