29. RGBCAC¶
29.1. Function Overview¶
To achieve the image to remove purple edge function, improve the image edge purple phenomenon.
29.2. API Reference¶
CVI_ISP_SetRGBCACAttr : Set gamma attribute parameters
CVI_ISP_GetRGBCACAttr : Get gamma attribute parameters
29.2.1. CVI_ISP_SetRGBCACAttr¶
【Description】
Set gamma attribute parameters
【Syntax】
CVI_S32 CVI_ISP_SetRGBCACAttr(VI_PIPE ViPipe, const ISP_RGBCAC_ATTR_S *pstRGBCACAttr);
【Parameter】
Parameter |
Description |
Input/Output |
---|---|---|
ViPipe |
VI_PIPE number |
Input |
pstRGBCACAttr |
Gamma property parameters |
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】
29.2.2. CVI_ISP_GetRGBCACAttr¶
【Description】
Get gamma attribute parameters
【Syntax】
【Parameter】
Parameter |
Description |
Input/Output |
---|---|---|
ViPipe |
VI_PIPE number |
Input |
pstRGBCACAttr |
Gamma property parameters |
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】
29.3. Data Types¶
ISP_RGBCAC_MANUAL_ATTR_S : Gamma attribute manual parameter
ISP_RGBCAC_AUTO_ATTR_S : Gamma attribute automatic parameter
ISP_RGBCAC_ATTR_S : Gamma attribute parameter
29.3.1. ISP_RGBCAC_MANUAL_ATTR_S¶
【Description】
Gamma attribute manual parameter
【Syntax】
typedef struct _ISP_RGBCAC_MANUAL_ATTR_S {
CVI_U8 DePurpleStr0; /*RW; Range:[0x0, 0xFF]*/
CVI_U8 DePurpleStr1; /*RW; Range:[0x0, 0xFF]*/
CVI_U16 EdgeCoring; /*RW; Range:[0x0, 0xFFF]*/
CVI_U8 DePurpleCrStr0; /*RW; Range:[0x0, 0x10]*/
CVI_U8 DePurpleCbStr0; /*RW; Range:[0x0, 0x10]*/
CVI_U8 DePurpleCrStr1; /*RW; Range:[0x0, 0x10]*/
CVI_U8 DePurpleCbStr1; /*RW; Range:[0x0, 0x10]*/
} ISP_RGBCAC_MANUAL_ATTR_S;
【Member】
Member |
Description |
---|---|
DePurpleStr0 |
Long frame de-fringing intensity. The larger the value, the less purple fringing Value range: [0x0, 0xff] Data type: CVI_U8 |
DePurpleStr1 |
Short frame de-fringing intensity. The larger the value, the less purple fringing Value range: [0x0, 0xff] Data type: CVI_U8 |
EdgeCoring |
Noise Suppression Control for Edge Detection Value range: [0x0, 0xfff] Data type: CVI_U16 |
DePurpleCrStr0 |
Long frame R channel corrected edge intensity Value range: [0x0, 0x10] Data type: CVI_U8 |
DePurpleCbStr0 |
Long frame B channel corrected edge intensity Value range: [0x0, 0x10] Data type: CVI_U8 |
DePurpleCrStr1 |
Short frame R channel corrected edge intensity Value range: [0x0, 0x10] Data type: CVI_U8 |
DePurpleCbStr1 |
Short frame B channel corrected edge intensity Value range: [0x0, 0x10] Data type: CVI_U8 |
【Note】
None.
【Related Data Type and Interface】
29.3.2. ISP_RGBCAC_AUTO_ATTR_S¶
【Description】
Gamma attribute automatic parameter
【Syntax】
typedef struct _ISP_RGBCAC_AUTO_ATTR_S {
CVI_U8 DePurpleStr0[ISP_AUTO_ISO_STRENGTH_NUM];
CVI_U8 DePurpleStr1[ISP_AUTO_ISO_STRENGTH_NUM];
CVI_U16 EdgeCoring[ISP_AUTO_ISO_STRENGTH_NUM];
CVI_U8 DePurpleCrStr0[ISP_AUTO_ISO_STRENGTH_NUM];
CVI_U8 DePurpleCbStr0[ISP_AUTO_ISO_STRENGTH_NUM];
CVI_U8 DePurpleCrStr1[ISP_AUTO_ISO_STRENGTH_NUM];
CVI_U8 DePurpleCbStr1[ISP_AUTO_ISO_STRENGTH_NUM];
} ISP_RGBCAC_AUTO_ATTR_S;
【Member】
Member |
Description |
---|---|
DePurpleStr0 |
Long frame de-fringing intensity. The larger the value, the less purple fringing Value range: [0x0, 0xff] Data type: CVI_U8 |
DePurpleStr1 |
Short frame de-fringing intensity. The larger the value, the less purple fringing Value range: [0x0, 0xff] Data type: CVI_U8 |
EdgeCoring |
Noise Suppression Control for Edge Detection Value range: [0x0, 0xfff] Data type: CVI_U16 |
DePurpleCrStr0 |
Long frame R channel corrected edge intensity Value range: [0x0, 0x10] Data type: CVI_U8 |
DePurpleCbStr0 |
Long frame B channel corrected edge intensity Value range: [0x0, 0x10] Data type: CVI_U8 |
DePurpleCrStr1 |
Short frame R channel corrected edge intensity Value range: [0x0, 0x10] Data type: CVI_U8 |
DePurpleCbStr1 |
Short frame B channel corrected edge intensity Value range: [0x0, 0x10] Data type: CVI_U8 |
【Note】
None.
【Related Data Type and Interface】
29.3.3. ISP_RGBCAC_ATTR_S¶
【Description】
Gamma attribute parameter
【Syntax】
typedef struct _ISP_RGBCAC_ATTR_S {
CVI_BOOL Enable;
ISP_OP_TYPE_E enOpType;
CVI_U16 VarThr;
CVI_U8 PurpleDetRange0;
CVI_U8 PurpleDetRange1;
CVI_U8 DePurpleStrMax0;
CVI_U8 DePurpleStrMin0;
CVI_U8 DePurpleStrMax1;
CVI_U8 DePurpleStrMin1;
CVI_U16 EdgeGlobalGain;
CVI_U8 EdgeGainIn[3];
CVI_U8 EdgeGainOut[3];
CVI_U16 LumaScale;
CVI_U16 UserDefineLuma;
CVI_U8 LumaBlendWgt;
CVI_U8 LumaBlendWgt2;
CVI_U8 LumaBlendWgt3;
CVI_U8 PurpleCb;
CVI_U8 PurpleCr;
CVI_U8 PurpleCb2;
CVI_U8 PurpleCr2;
CVI_U8 PurpleCb3;
CVI_U8 PurpleCr3;
CVI_U8 GreenCb;
CVI_U8 GreenCr;
CVI_U8 TuningMode;
ISP_RGBCAC_MANUAL_ATTR_S stManual;
ISP_RGBCAC_AUTO_ATTR_S stAuto;
} ISP_RGBCAC_ATTR_S;
【Member】
Member |
Description |
---|---|
Enable |
CAC module enable Value range: [0, 1] Data type: CVI_BOOL |
enOpType |
job type OP_TYPE_AUTO: automatic mode OP_TYPE_MANUAL: manual mode |
VarThr |
Threshold for edge detection. The smaller the value, the more regions are judged as edges Value range: [0x0, 0x1ff] Data type: CVI_U16 |
PurpleDetRange0 |
Threshold for long frame purple fringe detection. The larger the value, the more areas are judged as purple fringing Value range: [0x0, 0x80] Data type: CVI_U8 |
PurpleDetRange1 |
Threshold for short frame purple fringing detection. The larger the value, the more areas are judged as purple fringing Value range: [0x0, 0x80] Data type: CVI_U8 |
DePurpleStrMax0 |
Allowable maximum value of long frame depurple intensity Value range: [0x0, 0xff] Data type: CVI_U8 |
DePurpleStrMin0 |
The allowable minimum value of the long frame depurple intensity Value range: [0x0, 0xff] Data type: CVI_U8 |
DePurpleStrMax1 |
Allowable maximum value of short frame depurple intensity Value range: [0x0, 0xff] Data type: CVI_U8 |
DePurpleStrMin1 |
The minimum value allowed for the intensity of purple fringing in short frames Value range: [0x0, 0xff] Data type: CVI_U8 |
EdgeGlobalGain |
Intensity total gain for edge detection Value range: [0x0, 0xfff] Data type: CVI_U16 |
EdgeGainIn[3] |
An array of four numeric values. Define the edge strength level, the larger the value, the stronger the edge strength Value range: [0x0, 0x3] Data type: CVI_U8 |
EdgeGainOut[3] |
An array of four numeric values. Define the edge strength gain, the larger the value, the stronger the purple fringing effect Value range: [0x0, 0x3] Data type: CVI_U8 |
LumaScale |
brightness control Value range: [0x0, 0x7ff] Data type: CVI_U16 |
UserDefineLuma |
custom brightness value Value range: [0x0, 0xfff] Data type: CVI_U16 |
LumaBlendWgt |
Blend weights for luma 1 Value range: [0x0, 0x20] Data type: CVI_U8 |
LumaBlendWgt2 |
Blend weights for luma 2 Value range: [0x0, 0x20] Data type: CVI_U8 |
LumaBlendWgt3 |
Blend weights for luma 3 Value range: [0x0, 0x20] Data type: CVI_U8 |
PurpleCb |
The coordinates of purple in Cb domain Value range: [0x0, 0xff] Data type: CVI_U8 |
PurpleCr |
The coordinates of purple in Cr domain Value range: [0x0, 0xff] Data type: CVI_U8 |
PurpleCb2 |
The coordinates of purple 2 in Cb domain Value range: [0x0, 0xff] Data type: CVI_U8 |
PurpleCr2 |
The coordinates of purple 2 in the Cr domain Value range: [0x0, 0xff] Data type: CVI_U8 |
PurpleCb3 |
The coordinates of purple 3 in Cb domain Value range: [0x0, 0xff] Data type: CVI_U8 |
PurpleCr3 |
The coordinates of purple 3 in the Cr domain Value range: [0x0, 0xff] Data type: CVI_U8 |
GreenCb |
Coordinates of green in Cb domain Value range: [0x0, 0xff] Data type: CVI_U8 |
GreenCr |
Coordinates of green in Cr domain Value range: [0x0, 0xff] Data type: CVI_U8 |
TuningMode |
Output debug strategy to assist in adjusting parameters. 0: CAC image result. 1: Edge detection image result. 2: Image result of purple fringing detection Value range: [0x0, 0x2] Data type: CVI_U8 |
stManual |
Manual Mode parameter Properties |
stAuto |
Auto Mode parameter Properties |
【Note】
None.
【Related Data Type and Interface】