CogBlob SaveSegmentedImageBeforeMasking Property Cognex VisionPro
Save the segmented image, before masking and morphology, 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: 65.1.0.0
Syntax

public bool SaveSegmentedImageBeforeMasking { get; set; }

Property Value

Type: Boolean
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, before masking and morphology, as part of the blob results. Otherwise, the image will be released once blob analysis has completed and the CreateSegmentedImage(CogBlobSegmentedImageConstants, Boolean) method will return Nothing when requesting this 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.SaveSegmentedImageBeforeMasking = True
 myBlobResults = myBlob.Execute(mobjImage, r)
 myImage = myBlobResults.CreateSegmentedImage(CogBlobSegmentedImageConstants.BeforeMasking, 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.SaveSegmentedImageBeforeMasking = true;
  myBlobResults = myBlob.Execute(mobjImage,r);
  myImage = myBlobResults.CreateSegmentedImage(CogBlobSegmentedImageConstants.BeforeMasking, true);
  cdDisp.Image = myImage;
 }
See Also