Operator Library: Color
WhiteBalance operator 會使用三個獨立的係數來縮放 RGB 輸入資料流的三個色彩分量。
operator 的其中一個用途是手動白平衡。
每個色彩分量都會使用參數所定義的值進行縮放 RedCoefficient, GreenCoefficient 和 BlueCoefficient。
乘法的範圍與精確度是使用參數來定義 ResolutionBits 和 RangeBits.
RangeBits 定義了 Scaling 範圍。
範圍為 [0, 2^RangeBits[。
ResolutionBits 定義了 Scaling 的步階大小,即
。
結果會四捨五入至下一個整數值,並輸出至輸出連結 O。
| Link Parameter | Input Link I | Output Link O |
|---|---|---|
| Bit Width | [3, 63] | 3*(InputBitWidth/3 + RangeBits) <= 64 |
| 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_COLOR | as I |
| Color Flavor | FL_RGB | as I |
| Max. Img Width | any | as I |
| Max. Img Height | any | as I |
| 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)。 |
|
以下範例顯示了 WhiteBalance operator 的使用方式:
-
Examples - The applet shows an example for white balancing on RGB images.

上一頁

