Assembly: Cognex.VisionPro.Core (in Cognex.VisionPro.Core.dll) Version: 73.0.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.
- redWhiteBalanceScale
- Type: System Double
The nominally computed red value for each pixel is multiplied by this parameter.
- greenWhiteBalanceScale
- Type: System Double
The nominally computed green value for each pixel is multiplied by this parameter.
- blueWhiteBalanceScale
- Type: System Double
The nominally computed blue value for each pixel is multiplied by this parameter.
- bayerType
- Type: Cognex.VisionPro CogImageConvertBayerTypeConstants
The type of the input Bayer image. Choices include GR, RG, BG, and GB.
Return Value
Type: ICogImageThe converted image.
| Exception | Condition |
|---|---|
| CogOperatorNoInputImageException | inputImage is null. |
| CogImageBadTypeException | inputImage does not refer to an image type that can be used to represent a Bayer-format 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. |
| ArgumentException | width or height is not an even multiple of 2. |
| ArgumentException | redWhiteBalanceScale, greenWhiteBalanceScale, or BluewWhiteBalanceScale is less than or equal to 0. |
Produce an HSI image from the supplied Bayer format image. The result of this conversion is a CogImage24PlanarColor with its ColorSpace set to HSI.
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.
Note: This is a convenience routine; it calls GetRGBImageFromBayer(ICogImage, Int32, Int32, Int32, Int32, Double, Double, Double) followed by GetHSIImage(ICogImage, Int32, Int32, Int32, Int32). The redWhiteBalanceScale, greenWhiteBalanceScale, and blueWhiteBalanceScale are all used during thei initial Bayer-to-RGB conversion.