CogBlobResults CreateBlobImage Method (Boolean, Boolean, Int32)Cognex VisionPro
Create an image of the blobs & holes in this collection. Blobs & holes will be painted using their segmentation values in an image pre-filled with Background. If Viewable, Background is ignored, blobs & holes are painted for maximum viewable contrast.

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

public CogImage8Grey CreateBlobImage(
	bool filtered,
	bool viewable,
	int background
)

Parameters

filtered
Type: System Boolean
If true, the blobs placed in the image are filtered according to the defined CogBlobMeasure objects. If false, blobs are not filtered.
viewable
Type: System Boolean

If False, then the image background pixels are set to background, and feature pixels are set to their segmentation values (between 1 and Softness + 1 for soft threshold grey scale connectivity, the feature label for labeled connectivity).

If True, then the image background pixels are set to 128, hole pixels are set to 0, and feature pixels are set to values from 192 through 255. If hard thresholding is used, then feature pixels are set to 255. If soft thresholding is used, the segmentation values are mapped to a range of values from 255 through 192, with a maximum step of 10 pixel values between segmentation values. For example, if Softness is set to 3, then object pixels will be displayed using pixel values of 255, 245, 235, and 225.

If labeled blob analysis is being used, blobs have their label values mapped to a range of values between 96 and 255. The values are evenly distributed across the range. For example, if the minimum label value is 1 and the maximum label value is 3, then the blobs would be displayed using pixel values of 96, 175, and 255.

background
Type: System Int32
The pixel value to use for the image background. If viewable is True, then this parameter is ignored.

Return Value

Type: CogImage8Grey
The returned CogImage8Grey.
Exceptions

ExceptionCondition
ArgumentExceptionbackground is less than 0 or greater than 255 (only if viewable is False).
InvalidOperationException If no result data is available.
Remarks

Create an image of the blobs and holes in this collection. Blobs and holes will be painted using their segmentation values in an image pre-filled with a supplied background color. You can also specify that a viewable image (one that maximizes contrast between features) be created.
See Also