ThresholdAuto Property
Runtime only
Applies To
Vision Objects: Blob, Contour, ImageOp
Description
Automatically sets or returns values of ThresholdHigh and ThresholdLow properties for Blob and ImageOp objects.
Usage
VGet Sequence.Object.ThresholdAuto, var
VSet Sequence.Object.ThresholdAuto, value
- Sequence
- Name of a sequence or string variable containing a sequence name.
- Object
- Name of an object or string variable containing an object name. The object must exist in the specified sequence.
- var
- Boolean variable that will contain the value of the property
- value
- Boolean value or expression for the new value of the property.
Values
- 0 - False: Values of the ThresholdHigh and ThresholdLow properties are not set automatically.
- -1 - True: Values of the ThresholdHigh and ThresholdLow properties are set automatically.
Default: False
Remarks
The ThresholdAuto property automatically sets the values of the ThresholdHigh and ThresholdLow properties.
Note:
This property has been replaced by the ThresholdMethod property and can only be used at runtime for compatibility. When ThresholdAuto property is set to "True" using VSet, then ThresholdMethod property is set to GlobalAuto. When ThresholdAuto property is set to "False" using VGet, then ThresholdMethod property is set to GlobalUser. See ThresholdMethod for more details.
ThresholdMethod Property
The ThresholdHigh property works with the ThresholdLow property to define the grey level regions which represent the feature (or object), the background and the edges of the image. The ThresholdHigh property defines the upper bound for grey level values that are considered to be a blob. Any part of the image which falls within grey level region between ThresholdLow and ThresholdHigh will be assigned a pixel weight of 1. (i.e. it is a blob.)
If the Polarity property is set to 1-DarkOnLight, then grey levels between ThesholdLow and ThresholdHigh will be changed to black pixels and all other pixels will be white.
If the Polarity property is set to 2-LightOnDark, then grey levels between ThesholdLow and ThresholdHigh will be changed to white pixels and all other pixels will be black.
One of the problems regarding the ThresholdLow and ThresholdHigh Properties is finding the correct values to use for each. This is where the Histogram feature of Vision Guide comes in. You can run a Histogram on an image to see the relationship between the pixel counts at various grey levels. From the Histogram dialog, you can adjust each of the threshold values and view the results.
Note:
If ThresholdAuto is set to "True", the setting value declines to the threshold value which is capable to detect blobs (at least one blob can be detected) even when the image is homogeneous (all black or white), such as when the target workpiece is unable to be captured.
See Also
Blob Object, Contour Object, ImageOp Object, Polarity Property, ThresholdLow Property, ThresholdMethod Property