Golden Template Comparison

NI Vision Assistant

Golden Template Comparison

Compares an inspection image to a golden template and returns the areas that do not match up as defects. Refer to the NI Vision Template Editor Help for information about the Template Editor controls.

Main Tab

The following controls are available on the Main tab.

  • Step Name—Name to give the step.
  • Template Image—The image to use as the template.
  • Template Size
    • Width—Width of the template in pixels.
    • Height—Height of the template in pixels.
  • New Template—Launches the NI Vision Template Editor wizard, in which you can learn a template and save the result as a template image file.
  • Edit Template—Launches the NI Vision Template Editor wizard, in which you can modify a template and save the result as a template image file.
  • 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.
Note  When you load a template from file, the template can be any valid NI Vision template, such as a Pattern Matching template. The Golden Template Comparison step prompts you to add golden template information to the template.
  • Template Path—Displays the location of the template image file.

Alignment Tab

The following controls are available on the Alignment tab.

  • Center X—X-coordinate of the center point in the region of interest.
  • Center Y—Y-coordinate of the center point in the region of interest.
  • Angle (deg)—Rotation angle of the region of interest, in degrees.
  • Reposition Region of Interest—When enabled, the step dynamically repositions the region of interest based on a coordinate system you built in a previous step.
  • Reference Coordinate System—Coordinate system to which you want to link the region of interest.
  • Scale (percentage)—Scale of the golden template in the inspection image expressed as a percentage.
  • Alignment Correction—Specifies the algorithm to use to correct for slight misalignments between the golden template and inspection image. The following options are available:
    • None—No alignment correction.
    • Perspective—Adjusts the inspection image to correct for minor variations in alignment or perspective.
  • Display—Specifies what is displayed in the Main window. The following options are available:
    • Defects Only—Displays only the bright and dark defects.
    • Overlay Defects—Displays the bright and dark defects as an overlay on the inspection image.

Settings Tab

The following controls are available on the Settings tab.

  • Look For—Specifies the type of defects to search for in the image.
    • All Defects—Searches for areas in the image that are brighter and/or darker than the corresponding area in golden template.
    • Bright Defects—Searches for areas in the image that are brighter than the corresponding area in the golden template.
    • Dark Defects—Searches for areas in the image that are darker than the corresponding area in the golden template.
  • Intensity—Specifies the algorithm used to resolve differences in the intensity of the inspection image compared to the intensity of the golden template.
    • No Change—Does not adjust the intensity of the golden template and the inspection image.
    • Histogram Matching Normalization—Adjusts the inspection image histogram to be similar to the histogram of the golden template.
    • Average Matching Normalization—Adjusts the inspection image so the mean pixel value of the inspection image equals the mean pixel value of the golden template.
  • Ignore Edges—Specifies whether edges are ignored during the comparison process. If enabled, you can set the thickness of the edges to ignore using the Edge Thickness control.
    • Edge Thickness—Specifies the thickness of the edges to ignore.
  • Threshold Defect Image—Specifies whether to threshold the defect image.
    • Bright Level—Threshold value for determining the minimum pixel intensity difference between the golden template and the inspection image used for determining bright defects.
    • Dark Level—Threshold value for determining the minimum pixel intensity difference between the golden template and the inspection image used for determining dark defects.
    • Bright Defects—Color used to display bright defects.
    • Dark Defects—Color used to display dark defects.
  • Display—Specifies what is displayed in the Main window. The following options are available:
    • Defects Only—Displays only the bright and dark defects.
    • Overlay Defects—Displays the bright and dark defects as an overlay on the inspection image.