How to Threshold an Image |
Main Tab
- In the Step Name control, enter a descriptive name for the step.
- 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.
- 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.
- Specify the threshold range.
- For Manual Thresholding methods, use the Lower Value and Upper Value controls to specify the threshold range.
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.
- For Manual Thresholding methods, use the Lower Value and Upper Value controls to specify the threshold range.
- Click OK to add the step to the inspection.