Operator WhiteBalanceBayer

Operator Library: Color

White Balance Bayer 算子使用三个独立的系数对 Bayer 输入流的三个颜色分量进行 Scaling。 该算子的一个用途是手动白平衡。 每个颜色分量均使用参数所定义的值进行 Scaling RedCoefficient, GreenCoefficient 和 BlueCoefficient。 乘法的范围和精度使用参数进行定义 ResolutionBits 和 RangeBits. RangeBits 定义了 Scaling 范围。 该范围为 [0, 2^RangeBits[。 ResolutionBits 定义了 Scaling 的步长,即 。 结果四舍五入到下一个整数值,并从输出链路 O 输出。

相机的 Bayer 排列配置必须与算子设置相匹配。 算子设置使用参数 BayerInit 进行更改。

I/O Property

Property 值
Operator Type O
Input Link I, image data input
Output Link O, image data input

Supported Link Format

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

参数

BayerInit
键入 动态/静态读/写参数
默认 GreenFollowedByRed
范围 {GreenFollowedByRed, GreenFollowedByBlue, RedFollowedByGreen, BlueFollowedByGreen}

相机的 Bayer 排列配置必须与算子设置相匹配。

ResolutionBits
键入 static 参数
默认 8
范围 [1, 16]

此参数定义乘法的精度,即系数参数的步长。

RangeBits
键入 static 参数
默认 2
范围 [1, 8]

此参数定义乘法范围。 此参数会影响输出 Bit Width。 输出 Bit Width 不得超过 64 Bit。

RedCoefficient
键入 动态/静态读/写参数
默认 1
范围

此参数定义对输入红色分量进行 Scaling 的系数。 输入的浮点系数会四舍五入到最接近的有效定点值(请参阅 RangeBits 和 ResolutionBits)。

GreenCoefficient
键入 动态/静态读/写参数
默认 1
范围

此参数定义对输入绿色分量进行 Scaling 的系数。 输入的浮点系数会四舍五入到最接近的有效定点值(请参阅 RangeBits 和 ResolutionBits)。

BlueCoefficient
键入 动态/静态读/写参数
默认 1
范围

此参数定义对输入蓝色分量进行 Scaling 的系数。 输入的浮点系数会四舍五入到最接近的有效定点值(请参阅 RangeBits 和 ResolutionBits)。

使用示例

White Balance Bayer 算子的使用方法见以下示例: