Control Descriptions

NI Vision Template Editor

Control Descriptions

Use the following controls to create a template using the NI Vision Template Editor.

New Template Dialog

  • Select the type of template to create.
    • Pattern Matching Template—Creates a pattern matching template.
    • Geometric Matching Template—Creates a geometric matching template.
    • Golden Template—Creates a golden template.
    Tip  You can select more than one type.
  • Select an image to extract the template from—Specifies the path to the image from which you want to create a template.

Select Template Region

  • Zoom Tool—Enlarges a region in the image.
  • Rectangle Tool—Selects a rectangular region in the image. Use this selection tool when the main axis of an object is aligned with the horizontal axis of the image.
  • Rotated Rectangle Tool—Selects a rectangular region in the image. Use this selection tool when the main axis of an object is not aligned with the horizontal axis of the image.

Define Curves

Specify Curve Parameters

  • Extraction Mode—Specifies how the algorithm identifies curves in the image.
    • Normal—Makes no assumptions about the uniformity of objects in the image or the image background.
    • Uniform Regions—Assumes that either the objects in the image or the image background consist of uniform pixel values. Use this mode to calculate the external curves of the objects with greater accuracy.
  • Edge Threshold—Specifies the minimum contrast an edge pixel must have to be considered part of a curve. This value can range from 0 to 255. The default value is 75.
  • Edge Filter Size—Specifies the kernel size to use for computing the edges in the image. The options are Normal and Fine. The default value is Normal.
  • Minimum Length—Specifies the length, in pixels, of the smallest curve you want to extract. The default value is 25.
  • Row Search Step Size—Specifies the distance, in the y direction, between the image rows that the algorithm inspects for curve seed points. Valid values range from 1 to 255. The default value is 15.
  • Column Search Step Size—Specifies the distance, in the x direction, between the image columns that the algorithm inspects for curve seed points. Valid values range from 1 to 255. The default value is 15.

Customize Curves

  • Initial Curves—Indicates the color used to highlight the curves found by the algorithm in the image using the current Specify Curve Parameters settings.
  • Draw Regions to Ignore—When enabled, you can select regions of the image that you want the algorithm to ignore during matching.
  • Draw Additional Curves—When enabled, you can add curves that may be missing in the template.
  • Erase Customization—Erases customization at specific locations of the template.
  • Pen Width—Specifies the width of the drawing tool in the Draw Regions to Ignore or Erase Customization modes.
  • Clear All Customization—Erases all curve customization.

Customize Scoring

  • Draw Regions to Ignore—When enabled, you can select regions of the image that you want the algorithm to ignore when computing the correlation score.
  • Erase Customization—Removes specific locations of the template from the computation of the correlation score.
  • Pen Width—Specifies the width of the drawing tool in the Draw Regions to Ignore mode.
  • Clear All Customization—Erases all customization of correlation scoring.

Specify Match Offset

  • Match Offset—Specifies the number of pixels from the center of the template to shift the location of the match returned by the algorithm.

Define Golden Template Mask

  • Edge Threshold—The NI Vision Template Editor uses a Sobel algorithm to find the edges of objects in the template. Edge Threshold is the threshold value applied to the grayscale Sobel image. The threshold results in a binary image containing only the object edges. This binary image is used to mask the edges you want to ignore during golden template comparison.
  • Note  If the inspection image exhibits little contrast between edges and the background, the image resulting from the Sobel algorithm can be dark. Dark Sobel images require a low value for Edge Threshold. The default value is 15.
  • Edge Thickness—Specifies the thickness of the edges to ignore.
    Note  Edge Thickness is a run-time parameter. The modification of this parameter in the training interface is for display purposes. The Golden Template is always saved with an edge thickness of 1.
  • Draw Additional Regions to Ignore—Controls that allow you to draw additional regions to ignore by the golden template comparison algorithm.
    • Pen Tool—Manually draws any shape areas using this tool. You can set the width of the pen with the Pen Width control.
    • Rectangle Tool—Draws a rectangular region to ignore.
    • Oval Tool—Draws an oval to ignore.
    • Polygon Tool—Draws a polygon to ignore.
    • Free Hand Tool—Draws a closed shape to ignore.
    • Eraser—Erases customization at specific locations of the template.
  • Pen Width—Specifies the width of the Pen or Eraser tools.
  • Clear All Additional Regions—Erases all customization.
  • Edge Regions to Ignore—Indicates the color used to highlight the edges of the objects in the image using the current Edge Threshold and Edge Thickness settings.
  • Additional Regions to Ignore—Indicates the color used to highlight additional regions to ignore by the golden template comparison algorithm.