---
title: hi_isp_awb_raw_stat_attr
description: "定义AWB库返回给ISP的配置寄存器结构体。"
url: https://www.hiascend.com/document/detail/zh/canncommercial/latest/others/ispdevug/ispdevapi_0153.html
sourcePath: /source/zh/canncommercial/900/others/ispdevug/ispdevapi_0153.html
indexId: 5227e6d75da35c546c1a14e86e28865659df96187acebdc8ae532a0612ad841965
---
# hi_isp_awb_raw_stat_attr

#### 说明

定义AWB库返回给ISP的配置寄存器结构体。


#### 定义

```
typedef struct {
hi_bool
stat_cfg_update;
hi_u16
metering_white_level_awb;
hi_u16
metering_black_level_awb;
hi_u16
metering_cr_ref_max_awb;
hi_u16
metering_cb_ref_max_awb;
hi_u16
metering_cr_ref_min_awb;
hi_u16
metering_cb_ref_min_awb;
} hi_isp_awb_raw_stat_attr;
```


#### 成员

| 成员名称 | 描述 |
| --- | --- |
| stat\_cfg\_update | 该结构体中的值是否需要配置寄存器 |
| metering\_white\_level\_awb | Bayer域统计白点信息时，找白点的亮度上限。 取值范围：[0x0, 0xFFFF]，默认值 0xFFF。 |
| metering\_black\_level\_awb | Bayer域统计白点信息时，找白点的亮度下限。 取值范围：[0x0, 0xFFFF]，默认值 0x0。 |
| metering\_cr\_ref\_max\_awb | Bayer域统计白点信息时，色差R/G的最大值，8bit精度，默认值 512。 |
| metering\_cb\_ref\_max\_awb | Bayer域统计白点信息时，色B/G的最大值，8bit精度，默认值 512。 |
| metering\_cr\_ref\_min\_awb | Bayer域统计白点信息时，色差R/G的最小值，8bit精度，默认值 128。 |
| metering\_cb\_ref\_min\_awb | Bayer域统计白点信息时，色差B/G的最小值，8bit精度，默认值 128。 |


图1 白色区域选择相关参数

#### 注意事项

- hi_isp_awb_raw_stat_attr结构体中的信息决定什么样的像素点被认为是白点，从而参与统计。用户开发新的AWB算法时可以使用默认值，也可以自定义配置， stat_cfg_update标识表明运行时当前帧是否需要配置stat_attr结构体中的值到寄存器。
- AWB统计模块在ISP Pipeline位置支持可配置，可配置为Digital Gain后，Expander后、或DRC后。默认在Digital Gain后。
- 只支持Bayer域统计信息。
