Operator BAYER5x5Linear

Operator Library: Color

The operator BAYER5x5Linear reconstructs an RGB image from a Bayer input image. Technically, a Bayer raw image is a grayscale image which is composed from alternating red, green and blue pixels. BAYER5x5Linear acquires an RGB image from a Bayer camera through a bilinear reconstruction. The input link must be a 5x5 kernel of a Bayer image.

The underlying algorithm is a patent free high quality linear implementation.

The operator input is a grayscale image while the output is a color image. Therefore, the output bit width is increased by a factor of three plus 4 precision bits per component. For example, an 8 bit grayscale input image will be reconstructed into a 3 * (8 + 4) bit color image. If the added precision bits are not required they can be discarded using operator RND or ShiftRight.

The Bayer array configuration of the camera must match the operator settings. The operator setting is changed using parameter BayerInit. Four different mappings of the Bayer array on the sensor are possible:

  • GreenFollowedByRed

  • RedFollowedByGreen

  • BlueFollowedByGreen

  • GreenFollowedByBlue

The figures show the top left corner an image transferred to the frame grabber. In general, this is the top left corner of the camera's sensor but could change if you set a region of interest in the camera. The sensor pixel are overlaid with one of the four different Bayer patterns shown in the figures. Select the Bayer pattern corresponding to the image sensor of your camera.

I/O Properties

Property Value
Operator Type O
Input Link I,影像資料輸入
Output Link O,影像資料輸入

支援的 Link 格式

Link Parameter Input Link I Output Link O
Bit Width [1, 16] (InputBitWidth + 4) * 3
Arithmetic unsigned as I
Parallelism any as I
Kernel Columns 3 1
Kernel Rows 3 1
Img Protocol {VALT_IMAGE2D, VALT_LINE1D} as I
Color Format VAF_GRAY VAF_COLOR
Color Flavor FL_NONE FL_RGB
Max. Img Width any as I
Max. Img Height any as I

參數

BayerInit
Type dynamic/static read/write parameter
Default GreenFollowedByRed
Range {GreenFollowedByRed, GreenFollowedByBlue, RedFollowedByGreen, BlueFollowedByGreen}

The Bayer array configuration of the camera must match the operator settings. See descriptions above.

ImplementationType
Type 靜態寫入參數
Default AUTO
Range (AUTO, EmbeddedALU, LUT)

參數 ImplementationType 會影響 operator 的實作策略,亦即 使用哪些邏輯元素來實作 operator。

您可以選擇以下其中一個值:

AUTO: 當具現化 operator 時,會根據所連接 link 的參數化設定, 自動選擇最佳的實作策略。

EmbeddedALU:此運算子使用 FPGA 中非基於 LUT 的內嵌算術邏輯元素。

LUT:此運算子使用 FPGA 的 LUT 邏輯。

[備註] 一般情況下請使用 AUTO

通常此引數應設為 AUTO。在特殊情況下,例如設計中的某種 FPGA 資源不足時,您可以手動使用 EmbeddedALU 和/或 LUT 值來影響 FPGA 資源管理。

使用範例

The use of operator BAYER5x5Linear is shown in the following examples: