hi_isp_wb_stats

Description

Defines AWB statistics.

Definition

typedef struct { 
    hi_u16 global_r; 
    hi_u16 global_g; 
    hi_u16 global_b;
    hi_u16 count_all;
    hi_u16 zone_avg_r[HI_ISP_AWB_ZONE_NUM];
    hi_u16 zone_avg_g[HI_ISP_AWB_ZONE_NUM];
    hi_u16 zone_avg_b[HI_ISP_AWB_ZONE_NUM]; 
    hi_u16 zone_count_all[HI_ISP_AWB_ZONE_NUM]; 
    hi_isp_awb_grid_info grid_info;
} hi_isp_wb_stats;

Members

Member

Description

global_r

Average value of the R component in global statistics for the Bayer domain. The value range is [0x0, 0xFFFF].

global_g

Average value of the G component in global statistics for the Bayer domain. The value range is [0x0, 0xFFFF].

global_b

Average value of the B component in global statistics for the Bayer domain. The value range is [0x0, 0xFFFF].

count_all

Number of pixels in the gray region of the square in global statistics, which has been normalized. The value range is [0x0, 0xFFFF].

zone_avg_r[HI_ISP_AWB_ZONE_NUM]

Average value of the R component in zoned statistics for the Bayer domain. The value range is [0x0, 0xFFFF].

#define HI_ISP_AWB_ZONE_NUM  (HI_ISP_AWB_ZONE_ORIG_ROW * HI_ISP_AWB_ZONE_ORIG_COLUMN)

zone_avg_g[HI_ISP_AWB_ZONE_NUM]

Average value of the G component in zoned statistics for the Bayer domain. The value range is [0x0, 0xFFFF].

#define HI_ISP_AWB_ZONE_NUM  (HI_ISP_AWB_ZONE_ORIG_ROW * HI_ISP_AWB_ZONE_ORIG_COLUMN)

zone_avg_b[HI_ISP_AWB_ZONE_NUM]

Average value of the B component in zoned statistics for the Bayer domain. The value range is [0x0, 0xFFFF].

#define HI_ISP_AWB_ZONE_NUM  (HI_ISP_AWB_ZONE_ORIG_ROW * HI_ISP_AWB_ZONE_ORIG_COLUMN)

zone_count_all

Number of pixels in the gray region of the square in zoned statistics, which has been normalized. The value range is [0x0, 0xFFFF].

grid_info

Coordinates of the AWB zoned statistics.

Restrictions

Table 1 AWB zoned statistics (taking zone_avg_r as an example, zone_row = 32, zone_col = 32)

Index

Zone

Bin

Description of Data Read

0

0

0

Average R of block 0

1

1

0

Average R of block 1

2

2

0

Average R of block 2

3

3

0

Average R of block 3

4

4

0

Average R of block 4

...

1023

1023

0

Average R of block 1023

Normalization of zone_count_all helps to eliminate the impact of resolution difference on the number of gray pixels. The normalization formula is as follows:

CountAll = (Count of Gray Pixels << 16)/(Count of All Pixels)