Assembly: Cognex.VisionPro.Core (in Cognex.VisionPro.Core.dll) Version: 69.0.0.0
Parameters
- inputImage
- Type: Cognex.VisionPro ICogImage
The image from which to extract shapes.
- extractRegion
- Type: Cognex.VisionPro ICogRegion
The region of inputImage from which to extract shapes. If no region is supplied, the entire image is used.
Return Value
Type: ICogShapeModelCollectionThe returned shape models.
| Exception | Condition |
|---|---|
| ArgumentException | A NULL shape model was supplied. |
| CogOperatorNoInputImageException | inputImage is NULL |
| CogImageNoPixelsException | inputImage is not allocated. |
| CogShapeExtractNoProximityShapeException | RankMode is Proximity but ProximityShape is Nothing. |
| CogShapeExtractNoOpenShapesException | Closure is set to either Open or DontCare but Vocabulary specifies no open shapes. |
| CogImageBadSelectedSpaceNameException | The selected space of the inputImage is not a valid space of the inputImage's coordinate space tree; inputImage's selected space is nonqualified and more than one instance of it exists in inputImage's space tree; or inputImage's selected space is not a legal space name. |
| CogOperatorInvalidShapeException | RankMode is Proximity and ProximityShape's selected space is not a valid space in inputImage; ProximityShape's selected space is nonqualified and more than one instance of it exists in inputImage's coordinate space tree; or ProximityShape's selected space is not a legal space name. |
| CogOperatorInvalidRegionException | extractRegion's selected space is not a valid space in inputImage's coordinate space tree; extractRegion's selected space is nonqualified and more than once instance of it appears in inputImage's coordinate space tree; extractRegion's selected space is not a legal space name; or extractRegion falls completely outside of inputImage. |
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.
Note: Each shape model within the collection will have its selected space set to the fully-qualified name of inputImage's selected space.