| Detect Objects Controls |
Main Tab
The following controls are available on the Main tab.
Control Name |
Description |
Step Name |
Name to give the step. |
Region of Interest |
The region of interest you want to use for the step. |
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. |
Threshold Tab
The following controls are available on the Threshold tab.
Control Name |
Description |
Look For |
Specifies the type of objects to search for in the image. The following options are available:
- Bright Objects—When selected, the step counts bright pixels whose intensity values range from Lower Value to 255.
- Dark Objects—When selected, the step counts dark pixels whose intensity values range from 0 to Upper Value.
- Gray Objects—When selected, the step counts gray pixels whose intensity values range from Lower Value to Upper Value.
|
Method |
Specifies the type of threshold to use. The following options are available:
- Manual Threshold—Use this method when you want to determine the upper and lower threshold values manually.
- Automatic Threshold: Clustering—Use this method as a starting point. This method is appropriate for most images, but if
the image requires more specialized thresholding, select another automatic thresholding method.
- Automatic Threshold: Entropy—Use this method when you are inspecting an image that contains very small objects of interest, such as
small cosmetic defects.
- Automatic Threshold: Metric—Use this method when the object of interest and the background contain a comparable number
of pixels.
- Automatic Threshold: Moments—Use this method for images that have poor contrast.
- Automatic Threshold: InterVariance—Use this method when the object of interest and the background contain a comparable number
of pixels.
- Local Threshold: Niblack—Use this method for images that contain non-uniform lighting conditions.
- Local Threshold: Background Correction—Use this method for images that contain non-uniform lighting conditions. Background correction also helps reduce noise in large, empty areas.
|
Note Refer to the NI Vision Concepts Manual for more information about automatic thresholding methods. |
|
Histogram |
Displays the number of pixels at each grayscale intensity in the region of interest. The x-axis represents the grayscale intensities, and the y-axis represents the number of pixels. |
Lower Value |
Range of intensity values for those pixels you want to consider as objects. When looking for bright objects, all pixels whose values range from Lower Value to 255 are considered object pixels. Lower Value can be set to a constant or to the value of a previous measurement. |
Upper Value |
Range of intensity values for those pixels you want to consider as objects. When looking for dark objects, all pixels whose values range from 0 to Upper Value are considered object pixels. Upper Value can be set to a constant or to the value of a previous measurement. |
Lower Limit |
The lower boundary of the threshold range for manual thresholding. For automatic thresholding, Lower Limit displays the threshold value computed by the selected automatic thresholding method. |
Upper Limit |
The upper boundary of the threshold range for manual thresholding. For automatic thresholding, Upper Limit displays the threshold value computed by the selected automatic thresholding method. |
Kernel Size |
The size of the area around each pixel used to compute the average intensity value for the pixel when using a locally adaptive threshold. Kernel Size is typically equal to the size of the object you want to isolate using the threshold. Kernel Size is only available for local thresholding methods.
- ROI Size—Indicates the size of the current region of interest.
|
Tip You can determine the approximate size of an object in your image by drawing a region of interest around the object. ROI Size displays the value of the last ROI drawn. Click the Apply ROI button to set Kernel Size equal to ROI Size. |
|
ROI Size |
Indicates the size of the current region of interest.
|
Tip You can determine the approximate size of an object in your image by drawing a region of interest around the object. ROI Size displays the value of the last ROI drawn. Click the Apply ROI button to set Kernel Size equal to ROI Size. |
|
Deviation Factor |
Determines the sensitivity of the Niblack thresholding algorithm. Values range for 0 to 1, with 0 being the most sensitive to noise. This control is available only for the Local Threshold: Niblack thresholding method. |
Number of Objects Found |
Number of objects the step found. |
Settings Tab
The following controls are available on the Settings tab.
Control Name |
Description |
Ignore Objects Touching Region of Interest |
When enabled, the step ignores objects that touch the inspection region border. |
Fill Holes within Objects |
When enabled, the step fills holes contained in objects. The step does not fill holes that touch the image border because it cannot determine whether the holes are part of an object. |
Minimum Object Size |
Smallest area, in pixels, an object can have for the step to detect it. |
Maximum Object Size |
Largest area, in pixels, an object can have for the step to detect it. |
Sort by |
Specifies the order in which the objects detected are returned. The following options are available:
- Scan Order (x,y)—Corresponds to the order in which the objects are detected by the algorithm. The region of interest is examined from top left to bottom right, line by line. A new object is created as soon as a pixel that does not belong to another object is found.
- X Position (Pixels)—Sorts detected objects in ascending or descending order of the horizontal position (in pixels) of their center of mass.
- Y Position (Pixels)— Sorts detected items in ascending or descending order of the vertical position (in pixels) of their center of mass.
- Size (Pixels)—Sorts detected objects in ascending or descending order depending on their size expressed in pixels.
- X Position (Calibrated)—Sorts detected objects in ascending or descending order of the horizontal position (in real world units) of their center of mass.
- Y Position (Calibrated)—Sorts detected items in ascending or descending order of the vertical position (in real world units) of their center of mass.
- Size (Calibrated)—Sorts detected objects in ascending or descending order depending on their size expressed in real world units.
- Orientation—Sorts detected objects in ascending or descending order depending on their orientation.
- Aspect Ratio—Sorts objects in ascending or descending order depending on their aspect ratio. Aspect ratio is the ratio between the width and height of the binary object.
- Number of Holes—Sorts detected objects in ascending or descending order depending on the number of holes they have.
|
Objects |
List of valid objects and their properties. The following properties are displayed:
- X—X-coordinate position of the object center of mass.
- Y—Y-coordinate position of the object center of mass.
- Size—Area of the object.
- Orient.—Orientation of the longest axis of the object with respect to the horizontal axis.
- Aspect—Aspect ratio of the object.
- Holes—Number of holes found in the object.
|
Note If you calibrate the image using the Calibrate Image step, X, Y, and Size are returned in the calibration unit you specified. |
|
Number of Objects Found |
Number of objects the step found. |
Limits Tab
The following controls are available on the Limits tab.
Control Name |
Description |
Minimum Number of Objects |
Minimum number of objects you expect the step to find. |
Maximum Number of Objects |
Maximum number of objects you expect the step to find. |
Number of Objects Found |
Number of objects the step found. |