Produce an RGB image from the supplied input image.
Namespace: Cognex.VisionProAssembly: Cognex.VisionPro.Core (in Cognex.VisionPro.Core.dll) Version: 73.0.0.0
Syntax
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: ICogImageThe converted image.
Exceptions
| Exception | Condition |
|---|---|
| CogImageBadTypeException | inputImage does not refer to an image type that is convertible such as CogImage24PlanarColor. |
| CogImageClippedException | The region to convert does not lie entirely within the inputImage. |
| CogImageNoPixelsException | inputImage is not allocated. |
| CogOperatorNoInputImageException | inputImage is null. |
Remarks
Produce an RGB image from the supplied input image. The output image is of the same type (such as CogImage24PlanarColor) as the input image. If the supplied image is already an RGB image (ColorSpace is RGB) then no conversion is done.
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.
See Also