ThresholdMethod Property

Applies To
Vision Objects: Blob, Contour, ImageOp

Description
Sets or returns the binarization threshold method to use when the object runs.

Usage

VGet  Sequence.Object.ThresholdMethod, var
VSet  Sequence.Object. ThresholdMethod, 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
Integer variable that will contain the value of the property.
value
Integer value or expression for the new value of the property.

Values

  • 1 - GlobalUser
    • Vision constant: VISION_THRESHMETHOD_GLOBALUSER
  • 2 - GlobalAuto
    • Vision constant: VISION_THRESHMETHOD_GLOBALAUTO
  • 3 - LocalAdaptive
    • Vision constant: VISION_THRESHMETHOD_LOCALADAPTIVE

Default: 1 - GlobalUser

Remarks
Setting ThresholdMethod determines how the region of interest is binarized.

  • GlobalUser: Uses ThresholdHigh and ThresholdLow properties’ user settings This is the default.
  • GlobalAuto: Automatically determines the values for ThresholdHigh and ThresholdLow properties for the entire region. This replaces ThresholdAuto used in previous versions.
  • LocalAdaptive: Dynamically determines the thresholds using the ThresholdBlocksize and ThresholdLevel properties. This is available for area extraction processing of the object when the brightness values of the object are not stable in the image.

For the Contour object, ThresholdMethod is used when ContourMode is set to Blob.

Note:
The ThresholdAuto property can now only be used at runtime. When VSet executes at runtime for ThresholdAuto property, ThresholdMethod property is changed as follows:

  • ThresholdAuto = True changes ThresholdMethod property to GlobalAuto.
  • ThresholdAuto = False changes ThresholdMethod property to GlobalUser.

See Also
Blob Object, Contour Object, ImageOp Object, ThresholdHigh Property, ThresholdLow Property, ThresholdBlockSize Property, ThresholdLevel Property, ThresholdAuto Property