Shape Matching

NI Vision Assistant

Shape Matching

Finds objects in an image that are shaped like the object specified by the template. Images must be binary, and objects being searched must be white. The following controls are available.

Template Tab

  • Step Name—Name to give the step.
  • Create Template—Learns the selected ROI and saves the result as a template shape file. Specifies that file as the shape to search for.
  • Load from File—Launches a dialog box in which you can browse to a template image file and specify that file as the search template.
  • Minimum Score—Specifies the minimum score an instance of the template can have to be considered a valid match. This value can range from 0 to 1000, where a score of 1000 indicates a perfect match.
  • Scale Invariance—Searches for any objects that match the shape specified in the template, regardless of size.

Results

Displays the following information after searching the image for the shape:

  • Results—Numeric label associated with each of the matches found in the image.
  • Center X—X-coordinate of each object that matches the shape template.
  • Center Y—Y-coordinate of each object that matches the shape template.
  • Score—Score of each valid match. Score values can range from 0 to 1000, where a score of 1000 indicates a perfect match.

Related Topics

Pattern Matching (Machine Vision»Pattern Matching)

Searching a binary image for a shape

Searching for templates using pattern matching

Selecting a region of interest (ROI)