Threshold Image Configuration

NI Vision Builder

Check for Presence

How to Threshold an Image

Main Tab

  1. In the Step Name control, enter a descriptive name for the step.
  2. Choose the type of objects you want to threshold from the Look For control.

    If the intensities of the pixels that belong to objects of interest are brighter (greater) than the surrounding—particularly if the pixels along the inside boundary of the objects are brighter than their surrounding pixels—choose Bright Objects. If the pixels that belong to the objects of interest are darker (less) than their surrounding pixels, choose Dark Objects. In all other cases, choose Gray Objects.

  3. Select the thresholding method you want to use from the Method listbox. This Histogram shows the range of pixel intensities in the region of interest.
  4. Specify the threshold range.
    • For Manual Thresholding methods, use the Lower Value and Upper Value controls to specify the threshold range.
      Tip Tip  Click the drop-down list to use the value of a previous measurement as the threshold value.
    • For Automatic Thresholding methods, the step automatically specifies a threshold range corresponding to the region of interest based on the selected thresholding Method. Use the Lower Limit and Upper Limit controls to coerce the threshold range to use a specific range of values.
    • For Local Thresholding methods, the step calculates threshold values for each pixel based on the statistics of surrounding pixels. Use the Kernel size control to specify the approximate size of the objects to threshold.
  5. Click OK to add the step to the inspection.