算子 BAYER5x5Linear

Operator Library: Color

BAYER5x5Linear 算子通过 Bayer 输入图像重建 RGB 图像。从技术上讲,Bayer 原始图像是由交替的红、绿、蓝像素组成的灰度图像。BAYER5x5Linear 通过双线性重建从 Bayer 相机获取 RGB 图像。输入 link 必须是 Bayer 图像的 5x5 kernel。

底层算法是一种无专利的高 Quality 线性实现。

算子输入为灰度图像,输出为彩色图像。因此,输出 Bit Width 会按三倍再加每个分量 4 个精度 bit 的比例增加。例如,8 bit 的灰度输入图像将被重建为 3 * (8 + 4) bit 的彩色图像。如果不需要增加的精度 bit,可以使用算子 RND 或 ShiftRight 将其丢弃。

相机的 Bayer 阵列配置必须与算子设置相匹配。 使用参数 BayerInit 更改算子设置。 传感器上的 Bayer 阵列可能有四种不同的映射方式:

  • GreenFollowedByRed

  • RedFollowedByGreen

  • BlueFollowedByGreen

  • GreenFollowedByBlue

这些图显示了传输到 frame grabber 的图像的左上角。通常,这是相机传感器的左上角,但如果您在相机的 region of interest 中进行了设置,则可能会发生变化。传感器像素覆盖有图中所示四种不同的 Bayer 模式之一。请选择与相机图像传感器对应的 Bayer 模式。

I/O Property

Property 值
Operator Type O
Input Link I,图像数据输入
Output Link O, image data input

支持的 Link Format

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
键入 动态/静态读/写参数
默认 GreenFollowedByRed
范围 {GreenFollowedByRed, GreenFollowedByBlue, RedFollowedByGreen, BlueFollowedByGreen}

相机的 Bayer 阵列配置必须与算子设置相匹配。请参阅上文说明。

ImplementationType
键入 静态写参数
默认 AUTO
范围 (AUTO, EmbeddedALU, LUT)

Parameter ImplementationType influences the implementation strategy of the operator, i.e., which logic elements are used for implementing the operator.

您可以选择以下值之一:

AUTO: When the operator is instantiated, the optimal implementation strategy is selected automatically based on the parametrization of the connected links.

EmbeddedALU: 算子使用 FPGA 的嵌入式算术逻辑元件,这些元件不是基于 LUT 的。

LUT: 算子使用 FPGA 的 LUT 逻辑。

[注意] 通常情况下使用 AUTO

通常,该参数应设置为 AUTO。在特殊情况下,例如设计中的某类 FPGA 资源不足时,您可以使用 EmbeddedALU 和/或 LUT 手动干预 FPGA 资源管理。

使用示例

以下示例展示了 BAYER5x5Linear 算子的使用方法: