Operator Library: Color
Operator BAYER5x5Linear 用于从 Bayer 输入图像重建 RGB 图像。 从技术上讲,Bayer 原始图像是由交替的红色、绿色和蓝色像素组成的灰度图像。 BAYER5x5Linear 通过双线性重建从 Bayer 相机获取 RGB 图像。 输入链接必须是 Bayer 图像的 5x5 核。
底层算法采用的是免专利的高 Quality 线性实现方案。
该 operator 的输入是灰度图像,输出是彩色图像。 因此,输出 Bit Width 增加了三倍,每个分量外加 4 个精度位。 例如,8 bit 灰度输入图像将被重建为 3 * (8 + 4) bit 彩色图像。 如果不需要增加的精度位,可以使用 operator RND 或 ShiftRight 将其丢弃。
相机的 Bayer 阵列配置必须与 operator 设置相匹配。 可以通过参数 BayerInit 更改 operator 设置。 传感器上的 Bayer 阵列支持四种不同的映射方式:
-
GreenFollowedByRed

-
RedFollowedByGreen

-
BlueFollowedByGreen

-
GreenFollowedByBlue

这些图显示了传输到图像采集卡之图像的左上角。 通常,这是相机传感器的左上角,但如果在相机中设置了 ROI,则可能会有所改变。 传感器像素覆盖了图中所示的四种不同 Bayer 图案之一。 请选择与您的相机图像传感器相对应的 Bayer 图案。
| Property | 值 |
|---|---|
| Operator Type | O |
| Input Link | I, image data input |
| Output Link | O, image data input |
| 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 影响算子的实现策略,即 使用哪些逻辑元素来实现该算子。 您可以选择以下值之一: AUTO:实例化算子时,系统会根据连接链路的参数化配置 自动选择最佳实现策略。 EmbeddedALU:算子使用 FPGA 中非基于 LUT 的嵌入式算术逻辑元素。 LUT:算子使用 FPGA 的 LUT 逻辑。
|
||||
以下示例展示了算子 BAYER5x5Linear 的使用方法:
-
示例 - 该示例展示了使用 5x5 滤波器对 Bayer RAW 图案进行去马赛克处理。
-
示例 - 该示例展示了使用 5x5 滤波器对 Bayer RAW 图案进行去马赛克处理。 此外,还添加了用于色彩校正的白平衡功能。
-
“针对色彩图案为 Red/BlueFollowedByGreen GreenFollowedByBlue/Red 的双线阵相机的 Bayer 去马赛克”
示例 - 该示例展示了对具有色彩图案 Red/BlueFollowedByGreen_GreenFollowedByBlue/Red 的双线阵相机的 Bayer RAW 图案进行去马赛克处理
-
'适用于具有 RedFollowedByBlue GreenFollowedByGreen 彩色模式的双线阵彩色相机的 Bayer Demosaicing'
示例 - 该示例展示了双线阵彩色相机 Bayer RAW 模式的去马赛克处理,其彩色模式为 Red/BlueFollowedByBlue/Red_GreenFollowedByGreen
-
'具有 8 位 BiColor Bayer 模式的线阵相机的 Bayer Demosaicing'
示例 - 本示例展示了带有 BiColor Bayer 模式的 CXP-12 线阵相机(例如 racer 2 L 相机)的 Bayer 8 位 RAW 模式去马赛克处理: BiColorRGBG、BiColorGRGB、BiColorBGRG 和 BiColorGBGR。此外,该示例还包含 一个线阵触发模块 和一个白平衡模块。
-
'具有 10 位 BiColor Bayer 模式的线阵相机的 Bayer Demosaicing'
示例 - 本示例展示了带有 BiColor Bayer 模式的 CXP-12 线阵相机(例如 racer 2 L 相机)的 10 位 Bayer RAW 模式去马赛克处理: BiColorRGBG、BiColorGRGB、BiColorBGRG 和 BiColorGBGR。此外,该示例还包含 一个线阵触发模块 和一个白平衡模块。
-
'具有 12 位 BiColor Bayer 模式的线阵相机的 Bayer Demosaicing'
示例 - 本示例展示了带有 BiColor Bayer 模式的 CXP-12 线阵相机(例如 racer 2 L 相机)的 10 位 Bayer RAW 模式去马赛克处理: BiColorRGBG、BiColorGRGB、BiColorBGRG 和 BiColorGBGR。此外,该示例还包含 一个线阵触发模块 和一个白平衡模块。

![[注意]](../common/images/admon/note.png)
上一页

