Assembly: Cognex.VisionPro.Blob (in Cognex.VisionPro.Blob.dll) Version: 75.1.0.0
Parameters
- softFixedThresholdLow
- Type: System Int32
Pixel values that are less than the low threshold are assigned a blob weight of 0 when polarity indicates light blobs. Pixel values that are less than the low threshold are assigned a blob weight of 1 when polarity indicates dark blobs.
- softFixedThresholdHigh
- Type: System Int32
When polarity indicates light blobs, pixel values that are greater than the high threshold are assigned a blob weight equal to 1. The range of pixel values between the 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 high threshold are assigned a blob weight of 0 when polarity indicates dark blobs.
- softness
- Type: System Int32
The number of intermediate weights separating blobs(1) and background(0). Pixel values between the low and high threshold are assigned a blob weight between 0.0 and 1.0, exclusive.
- polarity
- Type: Cognex.VisionPro.Blob CogBlobSegmentationPolarityConstants
Specify DarkBlobs for dark blobs on a light background or LightBlobs for light blobs on a dark background.
| Exception | Condition |
|---|---|
| ArgumentException | softFixedThresholdLow is less than 0 or greater than 65534. |
| ArgumentException | softFixedThresholdHigh is less than 1 or greater than 65535. |
| ArgumentException | softFixedThresholdLow is greater than or equal to softFixedThresholdHigh. |
| ArgumentException | softness is less than 0 or greater than 254. |
| ArgumentException | polarity is neither DarkBlobs nor LightBlobs. |
Sets the segmentation Mode to SoftFixedThreshold and sets TailLow, TailHigh, SoftFixedThresholdLow, SoftFixedThresholdHigh, 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.