Assembly: Cognex.VisionPro.Core (in Cognex.VisionPro.Core.dll) Version: 93.1.0.0
Parameters
- inputImage
- Type: Cognex.VisionPro ICogImage
The image to convert.
- x
- Type: System Int32
The X-coordinate in pixels of the origin of the region to convert.
- y
- Type: System Int32
The Y-coordinate in pixels of the origin of the region to convert.
- width
- Type: System Int32
The width in pixels of the region to convert.
- height
- Type: System Int32
The height in pixels of the region to convert.
Return Value
Type: CogImage8GreyThe converted image.
| Exception | Condition |
|---|---|
| CogOperatorNoInputImageException | inputImage is null. |
| CogImageBadTypeException | inputImage does not refer to an image type that can be converted to an intensity image. |
| CogImageNoPixelsException | inputImage is not allocated. |
| CogImageClippedException | x is less than 0 or greater than or equal to the width of inputImage; y is less than 0 or greater than or equal to the height of inputImage; x plus width is greater than the width of inputImage; or y plus height is greater than the height of inputImage. |
Produce an intensity image from the supplied input image. If the input image is an RGB-format CogImage24PlanarColor image, then a new intensity image is converted. If the input image is in HSI format, then the existing intensity (I) plane is returned.
If x, y, width, and height are all zero, then the entire image is converted. Otherwise, only the specified portion of the image is converted.