28. DRC¶
28.1. Functional Description¶
whole imageimage dynamicrange, makeofcanindisplaydeviceon displayeffectandhuman visionvisualvisualsensebe affected byconsistent.
28.2. API Reference¶
CVI_ISP_SetDRCAttr : SetDRCattribute parameters
CVI_ISP_GetDRCAttr : GetDRCattribute parameters
28.2.1. CVI_ISP_SetDRCAttr¶
[Description]
SetDRCattribute parameters
[Syntax]
CVI_S32 CVI_ISP_SetDRCAttr(VI_PIPE ViPipe, const ISP_DRC_ATTR_S *pstDRCAttr);
[Parameters]
Parameter Name |
Description |
Input/Output |
|---|---|---|
ViPipe |
VI_PIPE No. |
Input |
pstDRCAttr |
DRCattribute parameters |
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_DRC_ATTR_S stAttr;
CVI_ISP_GetDRCAttr(ViPipe, &stAttr);
stAttr.enOpType = OP_TYPE_AUTO;
CVI_ISP_SetDRCAttr(ViPipe, &stAttr);
[Related Topics]
28.2.2. CVI_ISP_GetDRCAttr¶
[Description]
GetDRCattribute parameters
[Syntax]
CVI_S32 CVI_ISP_GetDRCAttr(VI_PIPE ViPipe, ISP_DRC_ATTR_S *pstDRCAttr);
[Parameters]
Parameter Name |
Description |
Input/Output |
|---|---|---|
ViPipe |
VI_PIPE No. |
Input |
pstDRCAttr |
DRCattribute parameters |
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]
28.3. Data Types¶
ISP_DRC_MANUAL_ATTR_S : Manual DefinitionDRCattribute parameters
ISP_DRC_AUTO_ATTR_S : Automatic DefinitionDRCattribute parameters
ISP_DRC_ATTR_S : Defines DRC attribute parameters
28.3.1. ISP_DRC_MANUAL_ATTR_S¶
[Description]
Manual DefinitionDRCattribute parameters
[Definition]
typedef struct _ISP_DRC_MANUAL_ATTR_S {
CVI_U8 Strength; /*Rw; Range:[0, 255]*/
CVI_U8 StrengthMin; /*Rw; Range:[0, 255]*/
CVI_U8 StrengthMax; /*Rw; Range:[0, 255]*/
} ISP_DRC_MANUAL_ATTR_S;
[Members]
Member Name |
Description |
|---|---|
Strength |
ControlDRC overallstrength. the larger the value, the stronger the intensity. Value Range: [0, 255] Data Types: CVI_U8 |
StrengthMin |
autoMode=1whentakes effect, Controlautomaticcalculateto drcstrength*gain range. Value Range: [0, 255] Data Types: CVI_U8 |
StrengthMax |
autoMode=1whentakes effect, Controlautomaticcalculateto drcstrength*gain range. Value Range: [0, 255] Data Types: CVI_U8 |
[Precautions]
None
[Related Data Types and Interfaces]
28.3.2. ISP_DRC_AUTO_ATTR_S¶
[Description]
Automatic DefinitionDRCattribute parameters
[Definition]
typedef struct _ISP_DRC_AUTO_ATTR_S {
CVI_U8 Strength[ISP_AUTO_ISO_STRENGTH_NUM]; /*Rw; Range:[0, 255]*/
CVI_U8 StrengthMin[ISP_AUTO_ISO_STRENGTH_NUM]; /*Rw; Range:[0, 255]*/
CVI_U8 StrengthMax[ISP_AUTO_ISO_STRENGTH_NUM]; /*Rw; Range:[0, 255]*/
} ISP_DRC_AUTO_ATTR_S;
[Members]
Member Name |
Description |
|---|---|
Strength |
ControlDRC overallstrength. the larger the value, the stronger the intensity. Value Range: [0, 255] Data Types: CVI_U8 |
StrengthMin |
autoMode=1whentakes effect, Controlautomaticcalculateto drcstrength*gain range. Value Range: [0, 255] Data Types: CVI_U8 |
StrengthMax |
autoMode=1whentakes effect, Controlautomaticcalculateto drcstrength*gain range. Value Range: [0, 255] Data Types: CVI_U8 |
[Precautions]
None
[Related Data Types and Interfaces]
28.3.3. ISP_DRC_ATTR_S¶
[Description]
Defines DRC attribute parameters
[Definition]
typedef struct _ISP_DRC_ATTR_S {
CVI_BOOL Enable; /*Rw; Range:[0, 1]*/
ISP_OP_TYPE_E enOpType;
CVI_U8 UpdateInterval; /*Rw; Range:[0, 255]*/
CVI_BOOL AutoMode; /*Rw; Range:[0, 1]*/
CVI_U16 SaturationLow; /*Rw; Range:[0, 4095]*/
CVI_U16 SaturationHigh; /*Rw; Range:[0, 4095]*/
CVI_U16 ContrastLow; /*Rw; Range:[0, 4095]*/
CVI_U16 ContrastHigh; /*Rw; Range:[0, 4095]*/
CVI_U8 BlockNumW; /*Rw; Range:[7, 47]*/
CVI_U8 GainUB; /*Rw; Range:[0, 255]*/
CVI_U8 GainLB; /*Rw; Range:[0, 255]*/
CVI_U8 GainProtStr; /*Rw; Range:[0, 255]*/
CVI_U8 FSBPstr; /*Rw; Range:[0, 255]*/
CVI_U8 DeFlareMode; /*Rw; Range:[0, 2]*/
CVI_U8 DeFlareRatio; /*Rw; Range:[0, 255]*/
CVI_U8 DeFlareSlope; /*Rw; Range:[0, 255]*/
CVI_U16 AdaptiveLowStr; /*Rw; Range:[0, 4095]*/
CVI_U16 AdaptiveHighStr; /*Rw; Range:[0, 4095]*/
CVI_U16 AdaptiveRatio; /*Rw; Range:[0, 1000]*/
CVI_U8 ColorProtStr; /*Rw; Range:[0, 255]*/
CVI_U16 ColorProtThr; /*Rw; Range:[0, 4095]*/
ISP_DRC_MANUAL_ATTR_S stManual;
ISP_DRC_AUTO_ATTR_S stAuto;
} ISP_DRC_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: [0, 255] Data Types: CVI_U8 |
AutoMode |
Controlauto drc Value Range: [0, 1] Data Types: CVI_BOOL |
SaturationLow |
ControlYandlocalMaxfusion ratio Value Range: [0, 4095] Data Types: CVI_U16 |
SaturationHigh |
ControlYandlocal Maxfusion ratio Value Range: [0, 4095] Data Types: CVI_U16 |
ContrastLow |
Controlfirstfusion pass outputandrawfusion ratio Value Range: [0, 4095] Data Types: CVI_U16 |
ContrastHigh |
Controlfirstfusion pass outputandrawfusion ratio Value Range: [0, 4095] Data Types: CVI_U16 |
BlockNumW |
ControllocalbrightnessControl range Value Range: [7, 47] Data Types: CVI_U8 |
GainUB |
1is1x, limitcalculateto out_lumaisin_luma multiplelessxusinginside Value Range: [0, 255] Data Types: CVI_U8 |
GainLB |
256is1x, limitcalculateto out_lumaisin_luma multiplelessxusingon Value Range: [0, 255] Data Types: CVI_U8 |
GainProtStr |
limitproducecolorbiasmove DRC gain, the larger the value, limitstrengththe morelarge, colorprotectionthe morestrong Value Range: [0, 255] Data Types: CVI_U8 |
FSBPstr |
forheightcontrastregionperformspecialprocessing Value Range: [0, 255] Data Types: CVI_U8 |
DeFlareMode |
lighthalosuppress mode. 0: Disable, 1: manualsuppressmode, 2: adaptivesuppressmode Value Range: [0, 2] Data Types: CVI_U8 |
DeFlareRatio |
Controllighthalosuppress strength, Ratiothe moresmall, suppressdegreethe morelarge, lighthalothe moreweak, forratiodegreethe moreweak Value Range: [0, 255] Data Types: CVI_U8 |
DeFlareSlope |
Controllighthalosuppress strength, Slopethe moresmall, suppressdegreethe morelarge, lighthalothe moreweak, forratiodegreethe moreweak Value Range: [0, 255] Data Types: CVI_U8 |
AdaptiveLowStr |
according tobrightnessadaptiveControlDRC strength underlimit Value Range: [0, 4095] Data Types: CVI_U16 |
AdaptiveHighStr |
according tobrightnessadaptiveControlDRC strength upper limit Value Range: [0, 4095] Data Types: CVI_U16 |
AdaptiveRatio |
according tobrightnessadaptiveControlDRC strength throughtransitiondiagonalrate Value Range: [0, 1000] Data Types: CVI_U16 |
ColorProtStr |
limitproducecolorbiasmove DRC gain, the larger the value, limitstrengththe morelarge, colorprotectionthe morestrong Value Range: [0, 255] Data Types: CVI_U8 |
ColorProtThr |
Controlcolorprotection range, the larger the value, openenableprotection brightnessthe morebiastoheightbright region Value Range: [0, 4095] Data Types: CVI_U16 |
stManual |
manual parameters |
stAuto |
automatic parameters |
[Precautions]
None
[Related Data Types and Interfaces]