CogBlob SaveSegmentedImage Property Cognex VisionPro 9.5
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.Blob
Assembly: Cognex.VisionPro.Blob (in Cognex.VisionPro.Blob.dll) Version: 69.0.0.0
Syntax

public bool SaveSegmentedImage { get; set; }

Property Value

Type: Boolean
The default is False.
Events

Event TypeReason
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