CogImageConvert GetRGBImage Method Cognex VisionPro 9.7
Produce an RGB image from the supplied input image.

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

public static ICogImage GetRGBImage(
	ICogImage inputImage,
	int x,
	int y,
	int width,
	int height
)

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: ICogImage
The converted image.
Exceptions

ExceptionCondition
CogImageBadTypeExceptioninputImage does not refer to an image type that is convertible such as CogImage24PlanarColor.
CogImageClippedExceptionThe region to convert does not lie entirely within the inputImage.
CogImageNoPixelsExceptioninputImage is not allocated.
CogOperatorNoInputImageExceptioninputImage 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