Sets the segmentation Mode to HardRelativeThreshold and sets the TailLow,
TailHigh, HardRelativeThreshold, & Polarity properties to
the values supplied.
Namespace: Cognex.VisionPro.BlobAssembly: Cognex.VisionPro.Blob (in Cognex.VisionPro.Blob.dll) Version: 65.1.0.0
Syntax
Parameters
- tailLow
- Type: System Int32
The percentage of low tail pixels to discard before computing the hard relative threshold.
- tailHigh
- Type: System Int32
The percentage of high tail pixels to discard before computing the hard relative threshold.
- hardRelativeThreshold
- Type: System Int32
A hard threshold is computed by determining the pixel value which lies at the supplied percentage of the distance between the low tail pixel value and the high tail pixel value. This computed threshold is then used to perform Hard-Fixed segmentation.
- polarity
- Type: Cognex.VisionPro.Blob CogBlobSegmentationPolarityConstants
Specify DarkBlobs for dark blobs on a light background or LightBlobs for light blobs on a dark background.
Exceptions
| Exception | Condition |
|---|---|
| ArgumentException | tailLow, tailHigh, or hardRelativeThreshold is less than 0 or greater than 100. |
| ArgumentException | tailLow plus tailHigh is greater than 100. |
| ArgumentException | polarity is neither DarkBlobs nor LightBlobs. |
Remarks
Sets the segmentation Mode to HardRelativeThreshold and sets TailLow, TailHigh, HardRelativeThreshold and Polarity to the values supplied.
This function suspends event delivery, then sets the public properties of CogBlobSegmentationParams with the supplied values. A single event that includes all of the affected functional area is typically generated.
See Also