How to Detect Objects |
Main Tab
- In the Step Name control, enter a descriptive name for the step.
- Choose one of the following methods to specify the region of interest for the step:
- Create a new region of interest.
- Select Constant from the Region of Interest listbox.
- Select a tool from the menu toolbar that matches the type of region of interest you want to specify.
- Draw a region of interest that includes all of the objects you want to detect. Minimize the number of noisy objects in the region of interest to improve the accuracy of the inspection step.
Note A noisy object is an object with characteristics similar to the objects you want to detect but is irrelevant to the current inspection step.
- Select a previously defined region of interest from the Region of Interest listbox.
When you specify a region of interest, the step automatically tries to locate objects in the region. Pixels with intensity values in the specified threshold range appear blue in the image. A red region and label mark the bounding rectangles of each individual object that the step located.
- Create a new region of interest.
- Verify that the Reposition Region of Interest checkbox is enabled if you want to link the region of interest specified in this step to a previously defined coordinate system.
Link the region of interest to a coordinate system if the position of the object under inspection changes from image to image, and you need to adjust the position of the region of interest to match the new location of the object.
Threshold Tab
- Choose the type of objects you want to detect 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.
Note You can specify a constant, a previous measurement, or a variable for the threshold range. - 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.
- Study the blue regions in the image. If all of the objects you want to detect are highlighted with a red rectangle, go to step 12. Otherwise, adjust the settings in the Settings tab.
Settings Tab
- Enable the Ignore Objects Touching Region of Interest control to remove objects that touch the border of the inspection region. Information about these objects is usually incomplete, so you may want to ignore them.
- Enable the Fill Holes Within Objects control to remove any holes within the detected objects. Enabling this control results in more accurate area measurements when you are uncertain about the optimal threshold range.
Note Do not enable this option if your object is supposed to have physical holes in it. - Enable the Minimum Object Size and Maximum Object Size controls to limit the area of the objects you want to find. Use the Object Measurement table to determine the size of your objects of interest.
- Specify the order in which the objects are returned using the Sort by control. By default, objects are listed in the order the algorithm detected them, scanning the region of interest horizontally from top left to bottom right.
Limits Tab
- Set the minimum and/or maximum number of objects that you expect to find.