Operator WhiteBalanceBayer

Operator Library: Color

運算子 WhiteBalanceBayer 會使用三個獨立的係數,對拜耳 (Bayer) 輸入流的三大色彩成分進行縮放。 此運算子的一項用途是手動白平衡。 每個色彩成分皆會根據參數所定義的數值進行縮放 RedCoefficient, GreenCoefficient 進行明確的生命週期管理即呼叫 BlueCoefficient進行縮放。 乘法的範圍與精度是使用參數 ResolutionBits 進行明確的生命週期管理即呼叫 RangeBits. RangeBits 定義 Scaling 範圍。 範圍為 [0, 2^RangeBits[。 ResolutionBits 定義 Scaling 的步階大小,為 。 結果會四捨五入至最接近的整數值,並輸出至輸出連結 O。

相機的拜耳陣列配置必須與操作員設定相符。 操作員設定可透過參數BayerInit 進行變更。

I/O Properties

Property Value
Operator Type O
Input Link I,影像資料輸入
Output Link O,影像資料輸入

Supported Link Format

Link Parameter Input Link I Output Link O
Bit Width [1, 16] InputBitWidth + RangeBits
Arithmetic 無號數 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

Parameters

BayerInit
Type 動態/靜態讀寫參數
Default 綠後接紅
Range {綠後接紅、綠後接藍、紅後接綠、藍後接綠}

相機的拜耳陣列配置必須與操作員的設定相符。

ResolutionBits
Type 靜態參數
Default 8
Range [1, 16]

此參數定義乘法的精度,亦即係數參數的步階大小。

RangeBits
Type 靜態參數
Default 2
Range [1, 8]

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

RedCoefficient
Type 動態/靜態讀寫參數
Default 1
Range

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

GreenCoefficient
Type 動態/靜態讀寫參數
Default 1
Range

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

BlueCoefficient
Type 動態/靜態讀寫參數
Default 1
Range

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

Examples of Use

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