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 MarshalByRefObject
Cognex.VisionPro.Implementation CogObjectBase
Cognex.VisionPro CogShapeExtract
Namespace: Cognex.VisionPro
Assembly: Cognex.VisionPro.Core (in Cognex.VisionPro.Core.dll) Version: 80.0.0.0
Syntax
The CogShapeExtract type exposes the following members.
Constructors
| Name | Description | |
|---|---|---|
| CogShapeExtract | Constructs a new instance of this class. | |
| CogShapeExtract(IntPtr) | Constructs a new instance of this class using com pointer. | |
| CogShapeExtract(CogShapeExtract) | Constructs a new instance of this class as a deep copy of the given instance. |
Methods
| Name | Description | |
|---|---|---|
| attachCom | ||
| Clone | 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 | |
| CreateObjRef | Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object. (Inherited from MarshalByRefObject.) | |
| Dispose | ||
| Dispose(Boolean) | ||
| Equals | (Inherited from Object.) | |
| Execute | 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. | |
| Finalize | (Overrides Object Finalize .) | |
| GetAttributes |
Implements the corresponding member of the ICustomTypeDescriptor interface.
May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.) | |
| GetClassName |
Implements the corresponding member of the ICustomTypeDescriptor interface.
May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.) | |
| GetComponentName |
Implements the corresponding member of the ICustomTypeDescriptor interface.
May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.) | |
| GetConverter |
Implements the corresponding member of the ICustomTypeDescriptor interface.
May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.) | |
| GetDefaultEvent |
Implements the corresponding member of the ICustomTypeDescriptor interface.
May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.) | |
| GetDefaultProperty |
Implements the corresponding member of the ICustomTypeDescriptor interface.
May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.) | |
| GetEditor |
Implements the corresponding member of the ICustomTypeDescriptor interface.
May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.) | |
| GetEvents |
Implements the corresponding member of the ICustomTypeDescriptor interface.
May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.) | |
| GetEvents( Attribute ) |
Implements the corresponding member of the ICustomTypeDescriptor interface.
May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.) | |
| GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) | |
| GetLifetimeService | Retrieves the current lifetime service object that controls the lifetime policy for this instance. (Inherited from MarshalByRefObject.) | |
| GetObjectData | ||
| GetProperties |
Implements the corresponding member of the ICustomTypeDescriptor interface.
May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.) | |
| GetProperties( Attribute ) |
Implements the corresponding member of the ICustomTypeDescriptor interface.
May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.) | |
| GetPropertyOwner |
Implements the corresponding member of the ICustomTypeDescriptor interface.
May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.) | |
| GetType | Gets the Type of the current instance. (Inherited from Object.) | |
| InitializeLifetimeService | Obtains a lifetime service object to control the lifetime policy for this instance. (Inherited from MarshalByRefObject.) | |
| MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
| MemberwiseClone(Boolean) | Creates a shallow copy of the current MarshalByRefObject object. (Inherited from MarshalByRefObject.) | |
| ResumeAndRaiseChangedEvent | 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. | |
| SuspendChangedEvent | 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. | |
| ToString | (Inherited from Object.) |
Fields
| Name | Description | |
|---|---|---|
| __com | ||
| __disposed | ||
| __factory | ||
| Creator | ||
| SfApproximationTolerance | This bit will be set in the EventArgs of a Changed event every time the value returned by ApproximationTolerance may have changed. | |
| SfClosure | This bit will be set in the EventArgs of a Changed event every time the value returned by Closure may have changed. | |
| SfConnectTolerance | This bit will be set in the EventArgs of a Changed event every time the value returned by ConnectTolerance may have changed. | |
| SfContrastThreshold | This bit will be set in the EventArgs of a Changed event every time the value returned by ContrastThreshold may have changed. | |
| SfMaxNumShapes | This bit will be set in the EventArgs of a Changed event every time the value returned by MaxNumShapes may have changed. | |
| SfPerimeterLimitMax | This bit will be set in the EventArgs of a Changed event every time the value returned by PerimeterLimitMax may have changed. | |
| SfPerimeterLimitMin | This bit will be set in the EventArgs of a Changed event every time the value returned by PerimeterLimitMin may have changed. | |
| SfPerimeterLimitsEnabled | This bit will be set in the EventArgs of a Changed event every time the value returned by PerimeterLimitsEnabled may have changed. | |
| SfPolarity | This bit will be set in the EventArgs of a Changed event every time the value returned by Polarity may have changed. | |
| SfProximityShape | This bit will be set in the EventArgs of a Changed event every time the value returned by ProximityShape may have changed. | |
| SfRankMode | This bit will be set in the EventArgs of a Changed event every time the value returned by RankMode may have changed. | |
| SfVocabulary | This bit will be set in the EventArgs of a Changed event every time the value returned by Vocabulary may have changed. |
Properties
| Name | Description | |
|---|---|---|
| ApproximationTolerance | 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. | |
| ChangedEventSuspended | 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. | |
| Closure | Indicates whether open and/or closed shapes should be extracted from the input image. | |
| ConnectTolerance | 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. | |
| ContrastThreshold | 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. | |
| HasChanged | If true, the serializable state of this object has changed since the last time it was serialized. | |
| MaxNumShapes | 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. | |
| PerimeterLimitMax | 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. | |
| PerimeterLimitMin | 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. | |
| PerimeterLimitsEnabled | If true then only shapes with perimeter length within the limits specified by PerimeterLimitMin and PerimeterLimitMax will be extracted. | |
| Polarity | Specifies the desired polarity for extracting closed shapes. The polarity setting has no effect on the extraction of open shapes. | |
| ProximityShape | 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. | |
| RankMode | 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. | |
| Vocabulary | 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. |
Events
| Name | Description | |
|---|---|---|
| Changed | Occurs when one or more parts of the object's state may have changed. |
Remarks
Primary interface of CogShapeExtract.
See Also