CogBlobSegmentationParams SetSegmentationHardFixedThreshold Method Cognex VisionPro 9.5
Sets the segmentation Mode to HardFixedThreshold and sets the HardFixedThreshold & Polarity properties to the values supplied.

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

public void SetSegmentationHardFixedThreshold(
	int hardFixedThreshold,
	CogBlobSegmentationPolarityConstants polarity
)

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

ExceptionCondition
ArgumentExceptionhardFixedThreshold is less than 0 or greater than 65535.
ArgumentExceptionpolarity 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