CogShapeExtract ClassCognex VisionPro 9.24
The shape extraction operator is used to extract contours from an image. Each contour is converted into a shape model which describes the geometry of the contour as well as its polarity. A filtered and ranked collection of shape models is returned.
Inheritance Hierarchy

System Object
  System MarshalByRefObject
    Cognex.VisionPro.Implementation CogObjectBase
      Cognex.VisionPro CogShapeExtract

Namespace: Cognex.VisionPro
Assembly: Cognex.VisionPro.Core (in Cognex.VisionPro.Core.dll) Version: 91.0.0.0
Syntax

[SerializableAttribute]
public class CogShapeExtract : CogObjectBase, 
	ICogNetInternal, IDisposable, ICloneable, ISerializable, ICogHasChanged, 
	ICogChangedEvent

The CogShapeExtract type exposes the following members.

Constructors

  NameDescription
Public methodCogShapeExtract 
Constructs a new instance of this class.
Public methodCogShapeExtract(IntPtr)
Constructs a new instance of this class using com pointer.
Public methodCogShapeExtract(CogShapeExtract)
Constructs a new instance of this class as a deep copy of the given instance.
Top
Methods

  NameDescription
Protected methodattachCom
Protected methodClone
Returns a deep copy of this class instance. Derived classes that implement Clone should override this method; other clients who wish to clone this instance should call ICloneable.Clone. See also CogSerializer.DeepCopyObject
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 methodDispose 
Protected methodDispose(Boolean)
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Public methodExecute
Execute will extract contours from the input image and convert each contour into a shape model which describes the geometry of the contour as well as its polarity. A filtered and ranked collection of shape models is returned.
Protected methodFinalize (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.)
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
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 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 methodResumeAndRaiseChangedEvent
Re-enables raising of the Changed event after SuspendChangedEvent has been called. Also raises the Changed event if the ChangedEventSuspended count is reduced to zero and any changes were made while events were suspended. Must be called once for each call to SuspendChangedEvent.
Public methodSuspendChangedEvent
Temporarily suspends the raising of the Changed event. May be called more than once, and a corresponding call to ResumeAndRaiseChangedEvent must be made for each call to SuspendChangedEvent.
Public methodToString
Returns a String that represents the current Object.
(Inherited from Object.)
Top
Fields

  NameDescription
Protected field__com
Protected field__disposed
Protected fieldStatic member__factory
Protected fieldStatic memberCreator
Public fieldStatic memberSfApproximationTolerance
This bit will be set in the EventArgs of a Changed event every time the value returned by ApproximationTolerance may have changed.
Public fieldStatic memberSfClosure
This bit will be set in the EventArgs of a Changed event every time the value returned by Closure may have changed.
Public fieldStatic memberSfConnectTolerance
This bit will be set in the EventArgs of a Changed event every time the value returned by ConnectTolerance may have changed.
Public fieldStatic memberSfContrastThreshold
This bit will be set in the EventArgs of a Changed event every time the value returned by ContrastThreshold may have changed.
Public fieldStatic memberSfMaxNumShapes
This bit will be set in the EventArgs of a Changed event every time the value returned by MaxNumShapes may have changed.
Public fieldStatic memberSfPerimeterLimitMax
This bit will be set in the EventArgs of a Changed event every time the value returned by PerimeterLimitMax may have changed.
Public fieldStatic memberSfPerimeterLimitMin
This bit will be set in the EventArgs of a Changed event every time the value returned by PerimeterLimitMin may have changed.
Public fieldStatic memberSfPerimeterLimitsEnabled
This bit will be set in the EventArgs of a Changed event every time the value returned by PerimeterLimitsEnabled may have changed.
Public fieldStatic memberSfPolarity
This bit will be set in the EventArgs of a Changed event every time the value returned by Polarity may have changed.
Public fieldStatic memberSfProximityShape
This bit will be set in the EventArgs of a Changed event every time the value returned by ProximityShape may have changed.
Public fieldStatic memberSfRankMode
This bit will be set in the EventArgs of a Changed event every time the value returned by RankMode may have changed.
Public fieldStatic memberSfVocabulary
This bit will be set in the EventArgs of a Changed event every time the value returned by Vocabulary may have changed.
Top
Properties

  NameDescription
Public propertyApproximationTolerance
Specifies an upper bound on the deviation of the raw edge data from the approximating shape. Specified in selected space units of the input image. Higher tolerances result in larger approximations, but tend to produce simpler shape representations.
Public propertyChangedEventSuspended
If nonzero, indicates that the raising of the Changed event has been suspended. This value is incremented when SuspendChangedEvent is called and decremented when ResumeAndRaiseChangedEvent is called.
Public propertyClosure
Indicates whether open and/or closed shapes should be extracted from the input image.
Public propertyConnectTolerance
If the distance between two endpoints of raw edge chains is less than this tolerance then the chains will be connected into a single chain. In the case that the two endpoints come from the same open chain, the chain is converted into a closed chain.
Public propertyContrastThreshold
The minimum absolute contrast difference used when extracting raw edge data from the input image. Edges with a contrast difference that is less than or equal to this threshold are ignored.
Public propertyHasChanged
If true, the serializable state of this object has changed since the last time it was serialized.
Public propertyMaxNumShapes
The maximum number of shapes that will be returned. Shapes that do not meet the closure, polarity, and perimeter constraints are filtered out first. If more than MaxNumShapes remain after filtering then the lowest-ranked shapes are also discarded.
Public propertyPerimeterLimitMax
The maximum allowed perimeter length of extracted shapes when PerimeterLimitsEnabled is true. The maximum perimeter length is specified in units of the selected space of the input image.
Public propertyPerimeterLimitMin
The minimum allowed perimeter length of extracted shapes when PerimeterLimitsEnabled is true. The minimum perimeter length is specified in units of the selected space of the input image.
Public propertyPerimeterLimitsEnabled
If true then only shapes with perimeter length within the limits specified by PerimeterLimitMin and PerimeterLimitMax will be extracted.
Public propertyPolarity
Specifies the desired polarity for extracting closed shapes. The polarity setting has no effect on the extraction of open shapes.
Public propertyProximityShape
Shape used for ranking extracted shapes when RankMode is cogShapeExtractRankModeProximity. Shapes are ranked based on their distance from this shape. Shapes closer to this proximity shape are ranked higher.
Public propertyRankMode
Indicates the mode for ranking extracted shapes. The returned collection of shapes is sorted from highest rank to lowest. If more shapes than the maximum number requested are found then the lowest ranking shapes are discarded.
Public propertyVocabulary
Indicates which primitive shapes that may be extracted. The shape vocabulary is an integer that is obtained by ORing together the vocabulary constants of the desired primitive shapes.
Top
Events

  NameDescription
Public eventChanged
Occurs when one or more parts of the object's state may have changed.
Top
Remarks

Primary interface of CogShapeExtract.

See Also