Foundation (etBayerToRGB.dll) 14.1
BayerToRGB Conversion

Functions

cvbres_t etBayerToRGB (IMG ImgIn, IMG &ImgOut, B2RGB_PixelMode PixelMode, B2RGB_InterpolationMode RGBMode, B2RGB_Gamma GammaMode, WB &ImgWB)
 Creates a RGB colour image from a Bayer monochrome image passed to it.

The RGB image is created with the specified gamma correction and using the white balance structure passed to it. There are 3 different conversion methods supported, see RGB Conversion for more information.

If this function is passed an uninitialised output image, the output image memory is allocated internally and the user must then call the ReleaseObject function each time the etBayerToRGB function is called. If, however, the function is passed an output image created using the etCreateOutputImage function, the etBayerToRGB function will use this allocated buffer. Using an allocated buffer will increase performance in two ways, firstly the processing time will be faster and secondly the user can perform a live zoom during acquisition. More...
 
cvbres_t etCreateOutputImage (IMG ImgIn, IMG &ImgOut, B2RGB_InterpolationMode RGBMode)
 Creates a compatible output image that can be passed to the etBayerToRGB function.

Passing an image will not only speed up the processing time but it also allows the user to perform a live zoom. More...
 
cvbres_t etWhiteBalance (IMG ImgIn, B2RGB_PixelMode PixelMode, B2RGB_WhiteBalanceMode WBMode, TArea &ImgArea, WB &ImgWB)
 Performs a white balance operation on the specified image.

The function modifies a white balance structure that is passed to it, this structure is then passed to the etBayerToRGB function.

The function analyses the specified area of interest (AOI) to calculate the scaling factors for red, green and blue. This AOI should be an evenly illuminated area of white that is not in saturation. More...
 

Detailed Description

Function Documentation

◆ etBayerToRGB()

cvbres_t etBayerToRGB ( IMG  ImgIn,
IMG &  ImgOut,
B2RGB_PixelMode  PixelMode,
B2RGB_InterpolationMode  RGBMode,
B2RGB_Gamma  GammaMode,
WB ImgWB 
)

Creates a RGB colour image from a Bayer monochrome image passed to it.

The RGB image is created with the specified gamma correction and using the white balance structure passed to it. There are 3 different conversion methods supported, see RGB Conversion for more information.

If this function is passed an uninitialised output image, the output image memory is allocated internally and the user must then call the ReleaseObject function each time the etBayerToRGB function is called. If, however, the function is passed an output image created using the etCreateOutputImage function, the etBayerToRGB function will use this allocated buffer. Using an allocated buffer will increase performance in two ways, firstly the processing time will be faster and secondly the user can perform a live zoom during acquisition.

Attention
The user must still call the ReleaseObject function when the output image is no longer needed.
Parameters
[in]ImgInHandle of input image.
[out]ImgOutHandle of output image.
[in]PixelModeSpecifies the colour mosaic format (see B2RGB_PixelMode and Color Mosaic Format for more information).
[in]RGBModeSpecifies the RGB conversion to be used (see B2RGB_InterpolationMode and RGB Conversion for more information).
[in]GammaModeSpecifies the gamma value to be used (see B2RGB_Gamma for more information).
[out]ImgWBA white balance structure containing the scaling factors for Red, Green and Blue.
The WB structure should be initialised before being passed to this function (see WB for more information).
Returns
0 : OK
1 : General Error
-101 : Invalid Input Image
-102 : Invalid Output Image
-104 : Invalid Bit Depth
-201 : Invalid WB Structure
Supported platforms:
Win32
Win64
Linux
Examples:
Delphi - Delphi BayerToRGB Example
Visual Basic - VB BayerToRGB Example
Visual C++ - VC BayerToRGB Example

◆ etCreateOutputImage()

cvbres_t etCreateOutputImage ( IMG  ImgIn,
IMG &  ImgOut,
B2RGB_InterpolationMode  RGBMode 
)

Creates a compatible output image that can be passed to the etBayerToRGB function.

Passing an image will not only speed up the processing time but it also allows the user to perform a live zoom.

Note
Call ReleaseObject from CVCImg.dll on ImgOut, when it is no longer needed.
Parameters
[in]ImgInHandle of input image.
[out]ImgOutHandle of output image.
[in]RGBModeSpecifies the RGB conversion to be used (see B2RGB_InterpolationMode and RGB Conversion for more information).
Returns
0 : OK
1 : General Error
-101 : Invalid Input Image
-102 : Invalid Output Image
Supported platforms:
Win32
Win64
Linux
Examples:
Visual C++ - VC BayerToRGB Example

◆ etWhiteBalance()

cvbres_t etWhiteBalance ( IMG  ImgIn,
B2RGB_PixelMode  PixelMode,
B2RGB_WhiteBalanceMode  WBMode,
TArea &  ImgArea,
WB ImgWB 
)

Performs a white balance operation on the specified image.

The function modifies a white balance structure that is passed to it, this structure is then passed to the etBayerToRGB function.

The function analyses the specified area of interest (AOI) to calculate the scaling factors for red, green and blue. This AOI should be an evenly illuminated area of white that is not in saturation.

Attention
The specified area of interest (AOI) should not be in saturation.
Parameters
[in]ImgInHandle of input image.
[in]PixelModeSpecifies the colour mosaic format (see B2RGB_PixelMode and Color Mosaic Format for more information).
[in]WBModeSpecifies the white balance mode (see B2RGB_WhiteBalanceMode for more information).
[in]ImgAreaSpecifies the area to be used for the white balance operation.
This is a TArea structure, further information can be found in the Common Vision Blox ImageManager help.
[out]ImgWBA white balance structure containing the scaling factors for Red, Green and Blue.
The WB structure should be initialised before being passed to this function (see WB for more information).
Returns
0 : OK
1 : General Error
-101 : Invalid Input Image
-102 : Invalid Output Image
-104 : Invalid Bit Depth
-201 : Invalid WB Structure
Supported platforms:
Win32
Win64
Linux
Examples:
Delphi - Delphi BayerToRGB Example
Visual Basic - VB BayerToRGB Example
Visual C++ - VC BayerToRGB Example