CogBlobResults ClassCognex VisionPro
Class which provides access to all of the results of a blob analysis. Includes access to filtered and unfiltered collections of CogBlobResult objects. Also provides access to intermediate and result images of the blob analysis.
Inheritance Hierarchy

System Object
  System MarshalByRefObject
    Cognex.VisionPro.Implementation CogObjectBase
      Cognex.VisionPro.Implementation CogSerializableObjectBase
        Cognex.VisionPro.Blob CogBlobResults

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

[SerializableAttribute]
public class CogBlobResults : CogSerializableObjectBase, 
	IDisposable, ICloneable, ICogRecordConstructor

The CogBlobResults type exposes the following members.

Constructors

  NameDescription
Public methodCogBlobResults 
For Cognex internal use only.
Public methodCogBlobResults(CogBlobResults)
Constructs a new instance of this class as a deep copy of the given instance.
Protected methodCogBlobResults(SerializationInfo, StreamingContext)
Serialization constructor for CogBlobResults object.
Top
Methods

  NameDescription
Public methodClone
Create a duplicate of this CogBlobResults object.
Public methodConstructAnnotation
Constructs the record's Annotation. For Cognex Internal use only.
Public methodConstructContent
Constructs the record's Content. For Cognex Internal use only.
Public methodConstructSubRecords
Constructs the record's SubRecords. For Cognex Internal use only.
Public methodCopy
Returns a copy of the constructor object. For Cognex Internal use only.
Public methodCreateBlobImage 
Create an image of the blobs & holes in this collection. Blobs & holes are painted for maximum viewable contrast.
Public methodCreateBlobImage(Boolean, Boolean, Int32)
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.
Public methodCreateObjRef
Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.
(Inherited from MarshalByRefObject.)
Public methodCreateSegmentedImage 
Gets the specified segmented image. The image will be stretched for maximum viewing contrast.
Public methodCreateSegmentedImage(CogBlobSegmentedImageConstants, Boolean)
Gets the specified segmented image. The image will be stretched for maximum viewing contrast if stretchIt is true, otherwise, the image will contain the actual segmented image data.
Public methodDispose 
Destruct this CogBlobResults.
Protected methodDispose(Boolean)
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Protected methodFinalize
Finalize this CogBlobResults.
(Overrides Object Finalize .)
Protected methodGetAttributes
Implements the corresponding member of the ICustomTypeDescriptor interface. May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.)
Public methodGetBlobByID
Given a blob ID, return its blob result.
Public methodGetBlobIDs
Gets an array of integer blob IDs. Note that this method does not force the creation of indvidual blob results.
Public methodGetBlobMeasure
Gets an individual measure for a single blob result. Note that this method does not force the creation of any individual blob results.
Public methodGetBlobMeasures
Gets an array of blob measures for the specified measure and the specified IDs. Note that this method does not force the creation of any individual blob results.
Public methodGetBlobs 
Gets all of the blobs from the blob analysis after filtering and sorting have been applied.
Public methodGetBlobs(Boolean)
Gets all of the blobs from the blob analysis. The Filtered argument indicates to get the blobs after filtering and sorting have been applied, or blobs without any filtering and sorting applied.
Public methodGetChildren
Get either a filtered or unfiltered collection of children of the blob specified by ID. The filtered blobs will also be sorted if sorting was enabled.
Protected methodGetClassName
Implements the corresponding member of the ICustomTypeDescriptor interface. May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.)
Protected methodGetComponentName
Implements the corresponding member of the ICustomTypeDescriptor interface. May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.)
Protected methodGetConverter
Implements the corresponding member of the ICustomTypeDescriptor interface. May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.)
Protected methodGetDefaultEvent
Implements the corresponding member of the ICustomTypeDescriptor interface. May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.)
Protected methodGetDefaultProperty
Implements the corresponding member of the ICustomTypeDescriptor interface. May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.)
Protected methodGetEditor
Implements the corresponding member of the ICustomTypeDescriptor interface. May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.)
Protected methodGetEvents 
Implements the corresponding member of the ICustomTypeDescriptor interface. May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.)
Protected methodGetEvents( Attribute )
Implements the corresponding member of the ICustomTypeDescriptor interface. May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.)
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetLifetimeService
Retrieves the current lifetime service object that controls the lifetime policy for this instance.
(Inherited from MarshalByRefObject.)
Protected methodGetObjectData
Implements the GetObjectData method of the ISerializable interface.
(Inherited from CogSerializableObjectBase.)
Public methodGetParent
Get the parent of the blob specified by ID. Returns Nothing for top level blobs which do not have parents.
Protected methodGetProperties 
Implements the corresponding member of the ICustomTypeDescriptor interface. May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.)
Protected methodGetProperties( Attribute )
Implements the corresponding member of the ICustomTypeDescriptor interface. May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.)
Protected methodGetPropertyOwner
Implements the corresponding member of the ICustomTypeDescriptor interface. May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.)
Public methodGetSiblings
Get either a filtered or unfiltered collection of the siblings of the blob specified by ID. The filtered blobs will also be sorted if sorting was enabled.
Public methodGetTopLevelBlobs
Gets all of the top level blobs, which are the blobs that do not have an enclosing parent blob. The Filtered argument indicates to get the blobs after filtering and sorting have been applied, or blobs without any filtering and sorting applied.
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodInitializeLifetimeService
Obtains a lifetime service object to control the lifetime policy for this instance.
(Inherited from MarshalByRefObject.)
Protected methodMemberwiseClone 
Creates a shallow copy of the current Object.
(Inherited from Object.)
Protected methodMemberwiseClone(Boolean)
Creates a shallow copy of the current MarshalByRefObject object.
(Inherited from MarshalByRefObject.)
Public methodToString
Returns a String that represents the current Object.
(Inherited from Object.)
Top
Remarks

The blob results interface. This interface provides information about the overall results of blob analysis; use CogBlobResult for information about individual blobs.
Examples

CogBlobResultCollection mBlobResults;

mBlobResults = mCogBlobTool.Results.GetBlobs();

Console.WriteLine("Number of Blobs: {0}", mBlobResults.Count);

// Print information for each blob found 
foreach (CogBlobResult blobResult in mBlobResults)
{
  Console.WriteLine("ID: {0}, CenterX: {1}, CenterY: {2}, Area: {3}",
  blobResult.ID, blobResult.CenterOfMassX, blobResult.CenterOfMassY, blobResult.Area);
}
Dim myBlobResults As CogBlobResultCollection

myBlobResults = myCogBlobTool.Results.GetBlobs()

Console.WriteLine("Number of Blobs: {0}", myBlobResults.Count)

' Print information for each blob found
For Each blobResult As CogBlobResult In myBlobResults
  Console.WriteLine("ID: {0}, CenterX: {1}, CenterY: {2}, Area: {3}", _
  blobResult.ID, blobResult.CenterOfMassX, blobResult.CenterOfMassY, blobResult.Area)
Next
See Also