---
title: hi_isp_cmos_lcac
description: "定义lcac的CMOS参数。"
url: https://www.hiascend.com/document/detail/zh/canncommercial/latest/others/ispdevug/ispdevapi_0130.html
sourcePath: /source/zh/canncommercial/900/others/ispdevug/ispdevapi_0130.html
indexId: 0c620330db75f13dd2ea8fd4333b2e9d5cd9c34dec1f691e21c09d67b9bc427565
---
# hi_isp_cmos_lcac

#### 说明

定义lcac的CMOS参数。


#### 定义

```
typedef struct {
hi_bool
enable;
hi_op_mode
op_mode;
hi_u16
var_thr;
hi_u16
r_luma_thd[HI_ISP_LCAC_DET_NUM];
hi_u16
g_luma_thd[HI_ISP_LCAC_DET_NUM];
hi_u16
b_luma_thd[HI_ISP_LCAC_DET_NUM];
hi_u16
y_luma_thd[HI_ISP_LCAC_DET_NUM];
hi_s16
cbcr_ratio[HI_ISP_LCAC_DET_NUM];
hi_u16
purple_det_range;
hi_isp_cmos_lcac_manual
manual_attr;
hi_isp_cmos_lcac_auto
auto_attr;
} hi_isp_cmos_lcac;
```


#### 成员

| 成员名称 | 描述 |
| --- | --- |
| enable | enable紫边校正使能。 HI\_FALSE：禁止； HI\_TRUE：使能。 |
| op\_mode | 紫边校正工作模式。 |
| var\_thr | var\_threshold边缘检测阈值取值范围：[0, 4095]。 |
| r\_luma\_thd | 它分了3段，每一段的值表示高亮检测模块里面R分量阈值。实际中生效的值取决于purple\_detect\_range这个参数的大小。purple\_detect\_range越小，越倾向于r\_detect\_threshold第一段的值，purple\_detect\_range越大，越倾向于r\_detect\_threshold第3段的值。取值范围：[0, 4095]。 \#define HI\_ISP\_LCAC\_DET\_NUM 3 |
| g\_luma\_thd | 它分了3段，每一段的值表示高亮检测模块里面G分量阈值。实际中生效的值取决于purple\_detect\_range这个参数的大小。purple\_detect\_range越小，越倾向于g\_detect\_threshold第一段的值，purple\_detect\_range越大，越倾向于g\_detect\_threshold第3段的值。 取值范围：[0, 4095]。 |
| b\_luma\_thd | 它分了3段，每一段的值表示高亮检测模块里面B分量阈值。实际中生效的值取决于purple\_detect\_range这个参数的大小。purple\_detect\_range越小，越倾向于b\_detect\_threshold第一段的值，purple\_detect\_range越大，越倾向于b\_detect\_threshold第3段的值。 取值范围：[0, 4095]。 |
| y\_luma\_thd | 它分了3段，每一段的值表示高亮检测模块里面Luma分量阈值。实际中生效的值取决于purple\_detect\_range这个参数的大小。purple\_detect\_range越小，越倾向于luma\_detect\_threshold第一段的值，purple\_detect\_range越大，越倾向于luma\_detect\_threshold第3段的值。 取值范围：[0, 4095] |
| cbcr\_ratio | 它分了3段，每一段的值表示紫色检测模块蓝色程度。实际中生效的值取决于purple\_detect\_range这个参数的大小。 purple\_detect\_range越小，越倾向于cb\_cr\_ratio第一段的值，purple\_detect\_range越大，越倾向于cb\_cr\_ratio第3段的值。 取值范围：[\-2048, 2047]。 |
| purple\_det\_range | 紫色检测的范围，该值控制的是r\_detect\_threshold，g\_detect\_threshold，b\_detect\_threshold，Iuma\_detect\_threshold，cb\_cr\_ratio这几个参数的生效情况。值越大，越多非高亮区域的紫色被界定为紫边区域。purple\_detect\_range可能会引入紫边去除不平滑的问题，可以检查r\_detect\_threshold，g\_detect\_threshold， b\_detect\_threshold，Iuma\_detect\_threshold，cb\_cr\_ratio这几个参数的配置。 取值范围：[0,410]。 |
| manual\_attr | 手动模式下配置紫边校正强度参数。 |
| auto\_attr | 自动模式下配置紫边校正强度参数。 |
