30. YCONTRAST

30.1. Functional Description

Yvaluedomainlinearforratiodegree.

30.2. API Reference

30.2.1. CVI_ISP_SetYContrastAttr

[Description]

SetY Contrast parameter attributes

[Syntax]

CVI_S32 CVI_ISP_SetYContrastAttr(VI_PIPE ViPipe, const ISP_YCONTRAST_ATTR_S *pstYContrastAttr);

[Parameters]

Parameter Name

Description

Input/Output

ViPipe

VI_PIPE No.

Input

pstYContrastAttr

Y Contrast parameter attributes

Input

[Return Value]

Return Value

Description

0

Success

Non-zero

Failure, whose value is Error Code.

[Requirements]

  • Header File: cvi_isp.h, cvi_comm_isp.h

  • Library File: libisp.so

[Note]

None

[Example]

VI_PIPE ViPipe = 0;
ISP_YCONTRAST_ATTR_S stAttr;
CVI_ISP_GetYContrastAttr(ViPipe, &stAttr);
stAttr.enOpType = OP_TYPE_AUTO;
CVI_ISP_SetYContrastAttr(ViPipe, &stAttr);

[Related Topics]

30.2.2. CVI_ISP_GetYContrastAttr

[Description]

GetY Contrast parameter attributes

[Syntax]

CVI_S32 CVI_ISP_GetYContrastAttr(VI_PIPE ViPipe, ISP_YCONTRAST_ATTR_S *pstYContrastAttr);

[Parameters]

Parameter Name

Description

Input/Output

ViPipe

VI_PIPE No.

Input

pstYContrastAttr

Y Contrast parameter attributes

output

[Return Value]

Return Value

Description

0

Success

Non-zero

Failure, whose value is Error Code.

[Requirements]

  • Header File: cvi_isp.h, cvi_comm_isp.h

  • Library File: libisp.so

[Note]

None

[Example]

None

[Related Topics]

30.3. Data Types

30.3.1. ISP_YCONTRAST_MANUAL_ATTR_S

[Description]

Manual DefinitionY Contrast parameter attributes

[Definition]

typedef struct _ISP_YCONTRAST_MANUAL_ATTR_S {
        CVI_U8 ContrastLow; /*Rw; Range:[0, 100]*/
        CVI_U8 ContrastHigh; /*Rw; Range:[0, 100]*/
        CVI_U8 CenterLuma; /*Rw; Range:[0, 64]*/
} ISP_YCONTRAST_MANUAL_ATTR_S;

[Members]

Member Name

Description

ContrastLow

smallincenterpointposition regionforratiodegreestrength. the larger the value, forratiothe morestrong.

Value Range: [0, 100]

Data Types: CVI_U8

ContrastHigh

largeincenterpointposition regionforratiodegreestrength. the larger the value, forratiothe morestrong.

Value Range: [0, 100]

Data Types: CVI_U8

CenterLuma

centerpointposition, willusingcenterpointtowardtwoedgeaddstrongforratio.

Value Range: [0, 64]

Data Types: CVI_U8

[Precautions]

None

[Related Data Types and Interfaces]

30.3.2. ISP_YCONTRAST_AUTO_ATTR_S

[Description]

Automatic DefinitionY Contrast parameter attributes

[Definition]

typedef struct _ISP_YCONTRAST_AUTO_ATTR_S {
        CVI_U8 ContrastLow[ISP_AUTO_LV_NUM]; /*Rw; Range:[0, 100]*/
        CVI_U8 ContrastHigh[ISP_AUTO_LV_NUM]; /*Rw; Range:[0, 100]*/
        CVI_U8 CenterLuma[ISP_AUTO_LV_NUM]; /*Rw; Range:[0, 64]*/
} ISP_YCONTRAST_AUTO_ATTR_S;

[Members]

Member Name

Description

ContrastLow

smallincenterpointposition regionforratiodegreestrength. the larger the value, forratiothe morestrong.

Value Range: [0, 100]

Data Types: CVI_U8

ContrastHigh

largeincenterpointposition regionforratiodegreestrength. the larger the value, forratiothe morestrong.

Value Range: [0, 100]

Data Types: CVI_U8

CenterLuma

centerpointposition, willusingcenterpointtowardtwoedgeaddstrongforratio.

Value Range: [0, 64]

Data Types: CVI_U8

[Precautions]

None

[Related Data Types and Interfaces]

30.3.3. ISP_YCONTRAST_ATTR_S

[Description]

Define Y Contrast parameter attributes

[Definition]

typedef struct _ISP_YCONTRAST_ATTR_S {
        CVI_BOOL Enable; /*Rw; Range:[0, 1]*/
        ISP_OP_TYPE_E enOpType;
        CVI_U8 UpdateInterval; /*Rw; Range:[1, 255]*/
        ISP_YCONTRAST_MANUAL_ATTR_S stManual;
        ISP_YCONTRAST_AUTO_ATTR_S stAuto;
} ISP_YCONTRAST_ATTR_S;

[Members]

Member Name

Description

Enable

module enable switch

Value Range: [0, 1]

Data Types: CVI_BOOL

enOpType

operation type

OP_TYPE_AUTO: automatic mode

OP_TYPE_MANUAL: manual mode

Data Types: ISP_OP_TYPE_E

UpdateInterval

affects the parameter update interval,the larger the value, the slower the image changes,the better the performance.

Value Range: [1, 255]

Data Types: CVI_U8

stManual

manual parameters

stAuto

automatic parameters

[Precautions]

None

[Related Data Types and Interfaces]