MultiCam Boards Documentation > GRABLINK series Documentation > GRABLINK Base Handbook > Functional Specification > Image Processing > Bayer CFA to RGB Conversion

Bayer CFA to RGB Conversion

The Bayer CFA decoder transforms the raw Bayer CFA data stream issued by the camera into an RGB color data stream.

The missing pixel components are reconstructed using one of the following interpolation methods:

The CFA decoder requires up to eight surrounding pixels to compute the missed components of RGB pixels. Surrounding pixels are identified by their geographic location relative to the pixel for computation.

Definitions

Computing Missing Components on 4 Positions of a Bayer CFA Array

For red pixel locations (case of R22)

G <= Mean4(GN, GS, GE, GW)

B <= Mean4(BNE, BSE, BSW, BNW)

Case of R22

For green pixel locations in lines with blue (case of G23)

R <= Mean4(RN, RS)

B <= Mean4(BE, BW)

Case of G23

For green pixel locations in lines with red (case of G32)

R <= Mean2(RE, RW)

B <= Mean2(BN, BS)

Case of G32

For blue pixel locations (case of B33)

G <= Mean4(GN, GS, GE, GW)

R <= Mean4(RNE, RSE, RSW, RNW)

Case of B33

Enabling the Bayer CFA Decoder

The Bayer CFA decoding function is automatically enabled if all the following conditions are satisfied:

Registering Bayer CFA

The registration of the BAYER CFA must be correctly set by assigning the appropriate value to the ColorRegistration parameter.

There are 4 values: GB, BG, RG, GR corresponding to the colors of the 2 first pixels of the first image line delivered by the camera.

Configuring the Bayer CFA Decoder

The CFA decoder has only one setting to select the interpolation method: the CFD_Mode parameter.

The default and recommended setting is ADVANCED. The alternate setting is LEGACY.

CFA Decoder Performance

The peak pixel processing rate of the CFA decoder of each acquisition channel is 125 megapixels/s.

The performance level of the Bayer CFA decoder is matching approximately the performance of the DMA transfer. However, the peak pixel processing rate is significantly lower than the highest pixel rate achievable by the board-compatible Bayer CFA cameras.