Save the segmented image as part of the blob results.
Otherwise, the image will be released once blob analysis has completed
and the CreateSegmentedImage method will return
Nothing when requesting this image.
Namespace: Cognex.VisionPro.BlobAssembly: Cognex.VisionPro.Blob (in Cognex.VisionPro.Blob.dll) Version: 75.1.0.0
Syntax
Property Value
Type: BooleanThe default is False.
Events
| Event Type | Reason |
|---|---|
| ICogChangedEvent Changed | Fires when the value of this property changes. The following state flag may be affected: |
Remarks
Save the segmented image as part of the blob results. You must set this property to True if you wish to call CreateSegmentedImage(CogBlobSegmentedImageConstants, Boolean) If you do not set this property to true, CreateSegmentedImage(CogBlobSegmentedImageConstants, Boolean) returns a NULL image.
Examples
Imports Cognex.VisionPro Imports Cognex.VisionPro.Blob Private Sub doBlob() Dim myBlob As New CogBlob Dim myBlobResults As CogBlobResults Dim myImage As CogImage8Grey myBlob.SaveSegmentedImage = True myBlobResults = myBlob.Execute(mobjImage, r) myImage = myBlobResults.CreateSegmentedImage(CogBlobSegmentedImageConstants.cogBlobSegmentedImage, True) cdDisp.Image = myImage End Sub
using Cognex.VisionPro; using Cognex.VisionPro.Blob; private void doBlob() { CogBlob myBlob=new CogBlob(); CogBlobResults myBlobResults; CogImage8Grey myImage; myBlob.SaveSegmentedImage = true; myBlobResults = myBlob.Execute(mobjImage,r); myImage = myBlobResults.CreateSegmentedImage(CogBlobSegmentedImageConstants.cogBlobSegmentedImage, true); cdDisp.Image = myImage; }
See Also