CogBlobSegmentationParams SoftRelativeThresholdHigh Property Cognex VisionPro 9.5
This relative threshold specifies a percentage of the distance between the low and high tail grey scale pixel values. The grey scale pixel value determined by this relative percentage is then used as a soft, fixed threshold.

Namespace: Cognex.VisionPro.Blob
Assembly: Cognex.VisionPro.Blob (in Cognex.VisionPro.Blob.dll) Version: 69.0.0.0
Syntax

public int SoftRelativeThresholdHigh { get; set; }

Property Value

Type: Int32
The default is 60.
Events

Event TypeReason
[Cognex.VisionPro.ICogChangedEvent.Changed]

Fires when the value of this property changes.

The following state flag may be affected:

[Cognex.VisionPro.ICogChangedEvent.Changed]

Fires when the both the low and high threshold values are changed.

The following state flags may be affected:

Exceptions

ExceptionCondition
[System.ArgumentException] The supplied value is less than 0 or greater than 100.
Remarks

Soft relative thresholding computes a high soft threshold value by determining the pixel value which lies at the specified percentage of the distance between the low tail pixel value and the high tail pixel value.

When Polarity indicates light blobs, pixel values that are greater than the computed high threshold are assigned a blob weight equal to 1. The range of pixel values between the computed low and high threshold is divided into Softness equally sized ranges. Pixels with values in each of these ranges are assigned values between 1 and Softness. A segmentation value of Softness+1 corresponds to a blob weight of one while all other segmentation values are interpreted on a linear scale relative to Softness+1.

Pixel values that are greater than the computed high threshold are assigned a blob weight of 0 when Polarity indicates dark blobs.

The low threshold must be less than or equal to the high threshold. If a value is supplied such that this requirement is not met, both thresholds are adjusted.

See Also