Operator Library: Color
BAYER3x3Linear 算子可从 Bayer 输入图像重建 RGB 图像。 从技术上讲,Bayer 原始图像是一种灰度图像,由交替的红色、绿色和蓝色像素组成。 BAYER3x3Linear 通过双线性重建从 Bayer 相机获取 RGB 图像。 输入链路必须是 Bayer 图像的 3x3 kernel。
算子输入为灰度图像,而输出为彩色图像。 因此,输出 Bit Width 增加了三倍,每个分量外加 2 个精度位。 例如,8 bit 灰度输入图像将被重建为 3 * (8 + 2) bit 彩色图像。 如果不需要添加的精度位,可以使用算子 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, 19] | (InputBitWidth + 2) * 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 阵列配置与算子设置相匹配。 请参阅上述说明。 |
|
以下示例展示了 BAYER3x3Linear 算子的用法:
-
示例 - 该示例展示了使用 3x3 滤波器对 Bayer RAW 图案进行去马赛克处理。
-
“Bayer 3x3 Demosacing with White Balancing”
示例 - 该示例展示了使用 3x3 滤波器对 Bayer RAW 图案进行去马赛克(Demosaicing)处理。 此外,还添加了用于颜色校正的白平衡。
-
示例 - 该示例展示了图像帧开始和结束时的信号与事件生成。

上一页

