Sets the segmentation Mode to HardFixedThreshold and sets the
HardFixedThreshold & 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
- hardFixedThreshold
- Type: System Int32
If polarity specifies light blobs, then pixel values that are greater than or equal to this hard threshold are part of the blob(s); pixel values that are less than this threshold are part of the background. If polarity specifies dark blobs, then the ranges are inverted.
- 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 | hardFixedThreshold is less than 0 or greater than 65535. |
| ArgumentException | polarity is neither DarkBlobs nor LightBlobs. |
Remarks
Sets the segmentation Mode to HardFixedThreshold and sets HardFixedThreshold 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