Operator WhiteBalanceBayer

Operator Library: Color

WhiteBalanceBayer 算子使用三個獨立的係數來縮放 Bayer 輸入串流的三個色彩分量。 該算子的一項用途是手動白平衡。 每個色彩分量都會使用參數所定義的值進行縮放 RedCoefficient, GreenCoefficient 和 BlueCoefficient。 乘法的範圍與精確度是使用參數來定義 ResolutionBits 和 RangeBits. RangeBits 定義了 Scaling 範圍。 範圍為 [0, 2^RangeBits[。 ResolutionBits 定義了 Scaling 的步階大小,即 。 結果會四捨五入至下一個整數值,並輸出至輸出連結 O。

相機的 Bayer 陣列組態必須與算子設定相符。 算子設定是使用 BayerInit 參數來變更。

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 + 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
Type dynamic/static read/write parameter
Default GreenFollowedByRed
Range {GreenFollowedByRed, GreenFollowedByBlue, RedFollowedByGreen, BlueFollowedByGreen}

相機的 Bayer 陣列組態必須與算子設定相符。

ResolutionBits
Type static parameter
Default 8
Range [1, 16]

此參數定義了乘法的精確度,也就是係數參數的步階大小。

RangeBits
Type static parameter
Default 2
Range [1, 8]

此參數定義了乘法的範圍。 此參數會影響輸出 Bit Width。 輸出 Bit Width 不得超過 64 Bit。

RedCoefficient
Type dynamic/static read/write parameter
Default 1
Range

此參數定義了用於縮放輸入紅色分量的係數。 輸入的浮點係數會四捨五入至最接近的有效定點數值(請參閱 RangeBits 和 ResolutionBits)。

GreenCoefficient
Type dynamic/static read/write parameter
Default 1
Range

此參數定義了用於縮放輸入綠色分量的係數。 輸入的浮點係數會四捨五入至最接近的有效定點數值(請參閱 RangeBits 和 ResolutionBits)。

BlueCoefficient
Type dynamic/static read/write parameter
Default 1
Range

此參數定義了用於縮放輸入藍色分量的係數。 輸入的浮點係數會四捨五入至最接近的有效定點數值(請參閱 RangeBits 和 ResolutionBits)。

使用範例

以下範例顯示了 WhiteBalanceBayer 算子的使用方式: