35. CA

35.1. Function Overview

Adjust UV domain saturation. This module is divided into CA mode and CP (thermal imaging) mode. Only one can be opened at the same time.

CA mode: The saturation is adjusted based on input Y, so it can be adjusted locally.

CP mode: Because the thermal imaging mode only has Y value, it will search the preset debug color template according to the Y value, search the corresponding YUV value, and make it color.

35.2. API Reference

35.2.1. CVI_ISP_SetCAAttr

【Description】

Set saturation attribute parameter

【Syntax】

CVI_S32 CVI_ISP_SetCAAttr(VI_PIPE ViPipe, const ISP_CA_ATTR_S *pstCAAttr);

【Parameter】

Parameter

Description

Input/Output

ViPipe

VI_PIPE number

Input

pstCAAttr

Saturation property parameter

Input

【Return Value】

Return Value

Description

0

Success

Non 0

Failure. An error code is returned. For details, see chapter Error Codes.

【Requirement】

  • Header files: cvi_isp.h, cvi_comm_isp.h

  • Library files: libisp.so

【Note】

None.

【Example】

None.

【Related Topic】

35.2.2. CVI_ISP_GetCAAttr

【Description】

Get the saturation attribute parameter

【Syntax】

CVI_S32 CVI_ISP_GetCAAttr(VI_PIPE ViPipe, ISP_CA_ATTR_S *pstCAAttr);

【Parameter】

Parameter

Description

Input/Output

ViPipe

VI_PIPE number

Input

pstCAAttr

Saturation property parameter

Output

【Return Value】

Return Value

Description

0

Success

Non 0

Failure. An error code is returned. For details, see chapter Error Codes.

【Requirement】

  • Header files: cvi_isp.h, cvi_comm_isp.h

  • Library files: libisp.so

【Note】

None.

【Example】

None.

【Related Topic】

35.3. Data Types

35.3.1. ISP_CA_MANUAL_ATTR_S

【Description】

Saturation attribute manual parameter

【Syntax】

 typedef struct _ISP_CA_MANUAL_ATTR_S {
  CVI_U16 ISORatio;
  CVI_U16 YRatioLut[CA_LUT_NUM];
} ISP_CA_MANUAL_ATTR_S;

【Member】

Member

Description

ISORatio

CA mode, find UV gain based on ISO value. The UV adjustment gain of all pixels is the same. It is recommended that the gain be set larger at low ISO, and smaller at high ISO to suppress color noise in dark areas.

Value range: [0x0, 0x7ff]

Data Type: CVI_U16

YRatioLut[CA_LUT_NUM]

In CA mode, look up UV gain based on brightness Y. This value can set different UV gains according to different brightness levels. It is recommended that the gain in the bright area be set higher, and the color will be more vivid, while the gain in the dark area can be set smaller to suppress the color noise in the dark area.

Value range: [0x0, 0x7ff]

Data Type: CVI_U16

【Note】

None.

【Related Data Type and Interface】

35.3.2. ISP_CA_AUTO_ATTR_S

【Description】

Saturation attribute automatic parameter

【Syntax】

 typedef struct _ISP_CA2_AUTO_ATTR_S {
  CVI_U16 ISORatio[ISP_AUTO_ISO_STRENGTH_NUM];
  CVI_U16 YRatioLut[CA_LUT_NUM][ISP_AUTO_ISO_STRENGTH_NUM];
} ISP_CA2_AUTO_ATTR_S;

【Member】

Member

Description

ISORatio

CA mode, find UV gain based on ISO value. The UV adjustment gain of all pixels is the same. It is recommended that the gain be set larger at low ISO, and smaller at high ISO to suppress color noise in dark areas.

Value range: [0x0, 0x7ff]

Data Type: CVI_U16

YRatioLut[CA_LUT_NUM]

In CA mode, look up UV gain based on brightness Y. This value can set different UV gains according to different brightness levels. It is recommended that the gain in the bright area be set higher, and the color will be more vivid, while the gain in the dark area can be set smaller to suppress the color noise in the dark area.

Value range: [0x0, 0x7ff]

Data Type: CVI_U16

【Note】

None.

【Related Data Type and Interface】

35.3.3. ISP_CA_ATTR_S

【Description】

Saturation attribute parameter

【Syntax】

 typedef struct _ISP_CA_ATTR_S {
  CVI_BOOL Enable;
  ISP_OP_TYPE_E enOpType;
  CVI_U8 UpdateInterval;
  CVI_BOOL CaCpMode;
  CVI_U8 CPLutY[CA_LUT_NUM];
  CVI_U8 CPLutU[CA_LUT_NUM];
  CVI_U8 CPLutV[CA_LUT_NUM];
  ISP_CA_MANUAL_ATTR_S stManual;
  ISP_CA_AUTO_ATTR_S stAuto;
} ISP_CA_ATTR_S;

【Member】

Member

Description

Enable

The CA module is enabled.

0: off.

1: Enabled.

Value range: [0, 1]

Data Type: CVI_BOOL

UpdateInterval

Affects the parameter update interval, the larger the value, the slower the screen changes and the better the performance.

Value range: [0x0, 0xff]

Data type: CVI_U8

CaCpMode

CA mode selection:

0: CA mode.

1: CP mode.

Value range: [0, 1]

Data Type: CVI_BOOL

CPLutY

In CP mode, look up the Y value corresponding to the LUT according to the brightness Y.

Value range: [0, 0xff]

Data type: CVI_U8

CPLutU

In CP mode, look up the U value corresponding to the LUT according to the brightness Y.

Value range: [0, 0xff]

Data type: CVI_U8

CPLutV

In CP mode, look up the V value corresponding to the LUT according to the brightness Y.

Value range: [0, 0xff]

Data type: CVI_U8

stManual

Manual Mode Parameter Properties

stAuto

Auto Mode Parameter Properties

【Note】

None.

【Related Data Type and Interface】

  • CVI_ISP_SetCA2Attr

  • CVI_ISP_GetCA2Attr