hi_isp_wb_info
Description
Defines WB, saturation, color correction information.
Definition
typedef struct {
hi_u16 r_gain;
hi_u16 gr_gain;
hi_u16 gb_gain;
hi_u16 b_gain;
hi_u16 saturation;
hi_u16 color_temp;
hi_u16 ccm[HI_ISP_CCM_MATRIX_SIZE];
hi_u16 ls0_ct;
hi_u16 ls1_ct;
hi_u16 ls0_area;
hi_u16 ls1_area;
hi_u8 multi_degree;
hi_u16 active_shift;
hi_u32 first_stable_time;
hi_isp_awb_indoor_outdoor_status in_out_status;
hi_s16 bv;
} hi_isp_wb_info;
Members
Member |
Description |
|---|---|
r_gain |
Current gain of the R channel (8-bit decimal precision) Value range: [0x0, 0xFFF] |
gr_gain |
Current gain of the Gr channel (8-bit decimal precision) Value range: [0x0, 0xFFF] |
gb_gain |
Current gain of the Gb channel (8-bit decimal precision) Value range: [0x0, 0xFFF] |
b_gain |
Current gain of the B channel (8-bit decimal precision) Value range: [0x0, 0xFFF] |
saturation |
Current saturation. Value range is [0x0, 0xFF]. |
color_temp |
Current color temperature Value range: [0x0, 0xFFFF] |
ccm[HI_ISP_CCM_MATRIX_SIZE] |
Current CCM value (8-bit decimal precision). Bit 15 is a sign bit. 0 indicates a positive number, and 1 indicates a negative number. For example, 0x8010 indicates −16. Value range: [0x0, 0xFFFF] #define HI_ISP_CCM_MATRIX_NUM 7 |
ls0_ct |
Color temperature of the primary illuminant in the multi-illuminant scenario Value range: [0x0, 0xFFFF] |
ls1_ct |
Color temperature of the secondary illuminant in the multi-illuminant scenario Value range: [0x0, 0xFFFF] |
ls0_area |
Area of the primary illuminant in the multi-illuminant scenario Value range: [0x0, 0xFF] |
ls1_area |
Area of the secondary illuminant in the multi-illuminant scenario Value range: [0x0, 0xFF] |
multi_degree |
Probability that the current scenario is a multi-illuminant scenario. Value range: [0x0, 0xFF] |
first_stable_time |
Time that the AWB becomes stable for the first time (unit: frame). Value range: [0x0, 0xFFFFFFFF] |
active_shift |
Shift value that limits the range of white points taking effect in the current scenario. Value range: [0x0, 0xFF] |
in_out_status |
Detection result for the indoor or outdoor scenario. The value can be AWB_INDOOR_MODE or AWB_OUTDOOR_MODE. |
bv |
Ambient BV. Value range: [-32768, 32767] |
Restrictions
- When multi_degree is set to a non-zero value, the current scenario is a multi-illuminant scenario. A larger value indicates a high probability that the current scenario is a multi-illuminant scenario.
- The query results such as ls0_ct, ls1_ct, ls0_area, and ls1_area are valid only when the value of multi_degree is not 0.
- Detection of the multi-illuminant is enabled only in the indoor scenario. After the AWB determines that the current scenario is an outdoor scenario, the detection strength of the multi-illuminant is automatically reduced to avoid saturation reduction.
- The probability that the current scenario is a multi-illuminant scenario is affected by factors such as the luminance of the primary and secondary illuminants and the color temperature difference. After both the primary and secondary illuminants are detected in the scenario, the probability of multi-illuminant is higher when the color temperature difference between the two illuminants is larger and the luminance difference is smaller.
- The sum of ls0_area and ls1_area may be greater than the number of white balance zones. The reason is that some zones may be affected by the primary and secondary illuminants and the algorithm cannot clearly identify the overlapped zone, which might be overlapped to the primary and secondary illuminants separately.
- first_stable_time indicates the number of frames when the AWB becomes stable for the first time. If first_stable_time is not 0, the AWB has become stable. After the ISP system is started, the AWB is executed once for each frame from 1 to 64 frames to accelerate AWB convergence.