hi_isp_awb_cbcr_track_attr
Description
Defines the associated parameters of the Bayer domain statistics.
Definition
typedef struct {
hi_bool enable;
hi_u16 cr_max[HI_ISP_AUTO_ISO_NUM];
hi_u16 cr_min[HI_ISP_AUTO_ISO_NUM];
hi_u16 cb_max[HI_ISP_AUTO_ISO_NUM];
hi_u16 cb_min[HI_ISP_AUTO_ISO_NUM];
} hi_isp_awb_cbcr_track_attr;
Members
Member |
Description |
|---|---|
enable |
Enabling for associating the parameters of the Bayer domain statistics with the ambient illuminance and color temperature. The options are as follows:
|
cr_max[HI_ISP_AUTO_ISO_NUM] |
cr_max values under different luminance. The value range is [0x0, 0xFFF]. #define HI_ISP_AUTO_ISO_NUM 16 |
cr_min[HI_ISP_AUTO_ISO_NUM] |
cr_min values under different luminance. The value range is [0x0, cr_max]. |
cb_max[HI_ISP_AUTO_ISO_NUM] |
cb_max values under different luminance. The value range is [0x0, 0xFFF]. |
cb_min[HI_ISP_AUTO_ISO_NUM] |
cb_min values under different luminance. The value range is [0x0, cb_max]. |
Restrictions
- After the statistical parameter association is enabled, the AWB algorithm calculates the cr_max, cr_min, cb_max, and cb_min parameters in real time based on the ambient illuminance, color temperature, and cr_max array configured by the user, and configures the corresponding logical register. In this case, the settings of the preceding four statistical parameters by using the PQ Tools do not take effect.
- After the statistical parameter association is enabled, the statistical parameters such as cr_max calculated by the AWB algorithm are related to the ambient color temperature based on ISO interpolation. At the low color temperature, the range of the white points is wide, and at the middle/high color temperatures, the range of the white points is narrow.
- Before manually configuring cr_max, cr_min, cb_max, and cb_min, you need to disable the association function.
- The values of cr_max[0], cr_min[0], cb_max[0], and cb_min[0] can be determined during AWB parameter calibration. After the supported color temperature range is determined, the raw images at high and low color temperatures are captured, and the R/G and B/G values of the white area are calculated.
cr_max[0] and cb_min[0] correspond to the R/G and B/G values at the low color temperature. cr_min[0] and cb_max[0] correspond to the R/G and B/G values at the high color temperature. It is recommended that the user-defined value ranges of Cr and Cb be slightly greater than those of R/G and B/G in the raw image statistics.
- The statistical parameters such as cr_max calculated by the AWB algorithm refer values of cr_max[0], cr_min[0], cb_max[0], and cb_min[0] when performing ISO interpolation. Therefore, ISO values should be set based on the value of ISO100. The values monotonically increase or decrease.
- You are advised to calibrate the cr_max and cb_min arrays in the low color temperature scenario (for example, under the sodium lamp). You need to the collect the R/G and B/G values of the white area under various illuminance to configure the cr_max and cb_min arrays. It is recommended that the user-defined value ranges of Cr and Cb be slightly greater than those of R/G and B/G in the raw image statistics.
- In low illuminance, the ambient color temperature is usually lower than 5000K. Therefore, the values of cr_min and cb_max can be set to constants.
- When the AWB statistics are configured after the DRC, hi_isp_awb_cbcr_track_attr does not take effect. cr_min and cb_min are fixed at 128, and cr_max and cb_max are fixed at 512.
Mapping between the values of cr_max[16] and gains (only for reference)
cr_max |
Again x Dgain x ISP Dgain (Multiple) |
Value |
|---|---|---|
cr_max [0] |
1 |
0x150 |
cr_max [1] |
2 |
0x150 |
cr_max [2] |
4 |
0x150 |
cr_max [3] |
8 |
0x160 |
cr_max [4] |
16 |
0x170 |
cr_max [5] |
32 |
0x180 |
cr_max [6] |
64 |
0x190 |
cr_max [7] |
128 |
0x1A0 |
cr_max [8] |
256 |
0x1B0 |
cr_max [9] |
512 |
0x1C0 |
cr_max [10] |
1024 |
0x1D0 |
cr_max [11] |
2048 |
0x1E0 |
cr_max [12] |
4096 |
0x1F0 |
cr_max [13] |
8192 |
0x1F0 |
cr_max [14] |
16384 |
0x1F0 |
cr_max [15] |
32768 |
0x1F0 |
Mapping between the values of cr_min[16] and gains (only for reference)
cr_min |
Again x Dgain x ISP Dgain (Multiple) |
Value |
|---|---|---|
cr_min [0] |
1 |
0x30 |
cr_min [1] |
2 |
0x30 |
cr_min [2] |
4 |
0x30 |
cr_min [3] |
8 |
0x30 |
cr_min [4] |
16 |
0x30 |
cr_min [5] |
32 |
0x2C |
cr_min [6] |
64 |
0x2A |
cr_min [7] |
128 |
0x28 |
cr_min [8] |
256 |
0x26 |
cr_min [9] |
512 |
0x24 |
cr_min [10] |
1024 |
0x22 |
cr_min [11] |
2048 |
0x20 |
cr_min [12] |
4096 |
0x1F |
cr_min [13] |
8192 |
0x1E |
cr_min [14] |
16384 |
0x1D |
cr_min [15] |
32768 |
0x1C |
Mapping between the values of cb_max[16] and gains (only for reference)
cb_max |
Again x Dgain x ISP Dgain (Multiple) |
Value |
|---|---|---|
cb_max [0] |
1 |
0x130 |
cb_max [1] |
2 |
0x130 |
cb_max [2] |
4 |
0x130 |
cb_max [3] |
8 |
0x130 |
cb_max [4] |
16 |
0x140 |
cb_max [5] |
32 |
0x150 |
cb_max [6] |
64 |
0x160 |
cb_max [7] |
128 |
0x170 |
cb_max [8] |
256 |
0x180 |
cb_max [9] |
512 |
0x190 |
cb_max [10] |
1024 |
0x1A0 |
cb_max [11] |
2048 |
0x1B0 |
cb_max [12] |
4096 |
0x1B0 |
cb_max [13] |
8192 |
0x1B0 |
cb_max [14] |
16384 |
0x1B0 |
cb_max [15] |
32768 |
0x1B0 |
Mapping between the values of cb_min[16] and gains (only for reference)
cb_min |
Again x Dgain x ISP Dgain (Multiple) |
Value |
|---|---|---|
cb_min [0] |
1 |
0x30 |
cb_min [1] |
2 |
0x30 |
cb_min [2] |
4 |
0x30 |
cb_min [3] |
8 |
0x30 |
cb_min [4] |
16 |
0x30 |
cb_min [5] |
32 |
0x2C |
cb_min [6] |
64 |
0x2A |
cb_min [7] |
128 |
0x28 |
cb_min [8] |
256 |
0x26 |
cb_min [9] |
512 |
0x24 |
cb_min [10] |
1024 |
0x22 |
cb_min [11] |
2048 |
0x20 |
cb_min [12] |
4096 |
0x1F |
cb_min [13] |
8192 |
0x1E |
cb_min [14] |
16384 |
0x1D |
cb_min [15] |
32768 |
0x1C |