28. LCAC¶
28.1. Function Overview¶
Color distortion correction. Due to the different refractive index of different colors, purple fringing is easy to form around objects at the junction of high-brightness areas and low-brightness areas. This module realizes the image de-purple fringing function and improves the purple fringing phenomenon at the edge of the image.
28.2. API Reference¶
CVI_ISP_SetLCACAttr : Set gamma attribute parameters
CVI_ISP_GetLCACAttr : Get gamma attribute parameters
28.2.1. CVI_ISP_SetLCACAttr¶
【Description】
Set gamma attribute parameters
【Syntax】
CVI_S32 CVI_ISP_SetLCACAttr(VI_PIPE ViPipe, const ISP_LCAC_ATTR_S *pstLCACAttr);
【Parameter】
Parameter |
Description |
Input/Output |
---|---|---|
ViPipe |
VI_PIPE number |
Input |
pstLCACAttr |
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】
28.2.2. CVI_ISP_GetLCACAttr¶
【Description】
Get gamma attribute parameters
【Syntax】
【Parameter】
Parameter |
Description |
Input/Output |
---|---|---|
ViPipe |
VI_PIPE number |
Input |
pstLCACAttr |
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】
28.3. Data Types¶
ISP_LCAC_GAUSS_COEF_ATTR_S : Gamma Gauss parameter
ISP_LCAC_MANUAL_ATTR_S : Gamma attribute manual parameter
ISP_LCAC_AUTO_ATTR_S : Gamma attribute automatic parameter
ISP_LCAC_ATTR_S : Gamma attribute parameter
28.3.1. ISP_LCAC_GAUSS_COEF_ATTR_S¶
【Description】
Gamma Gauss parameter
【Syntax】
typedef struct _ISP_LCAC_GAUSS_COEF_ATTR_S {
CVI_U8 Wgt;
CVI_U8 Sigma;
} ISP_LCAC_GAUSS_COEF_ATTR_S;
【Member】
Member |
Description |
---|---|
Wgt |
Control the degree of purple fringing according to the edge strength, and determine the weight curve of the fusion of the purple fringing result and the original image. The larger the Wgt, the larger the ratio of the fusion original image Value range: [0x0, 0x80] Data type: CVI_U8 |
Sigma |
Control the degree of purple fringing according to the edge strength, and determine the weight curve of the fusion of the purple fringing result and the original image. The larger the Sigma, the more pixels are fused with the original image Value range: [0x0, 0xff] Data type: CVI_U8 |
【Note】
None.
- 【Related Data Type and Interface】
None.
28.3.2. ISP_LCAC_MANUAL_ATTR_S¶
【Description】
Gamma attribute manual parameter
【Syntax】
typedef struct _ISP_LCAC_MANUAL_ATTR_S {
CVI_U16 DePurpleCrGain;
CVI_U16 DePurpleCbGain;
CVI_U8 DePurepleCrWgt0;
CVI_U8 DePurepleCbWgt0;
CVI_U8 DePurepleCrWgt1;
CVI_U8 DePurepleCbWgt1;
CVI_U8 EdgeCoringBase;
CVI_U8 EdgeCoringAdv;
} ISP_LCAC_MANUAL_ATTR_S;
【Member】
Member |
Description |
---|---|
DePurpleCrGain |
R channel purple fringing correction gain Value range: [0x0, 0xfff] Data type: CVI_U16 |
DePurpleCbGain |
B channel purple fringing correction gain Value range: [0x0, 0xfff] Data type: CVI_U16 |
DePurepleCrWgt0 |
Long Frame R Channel Corrected Intensity Blend Weights Value range: [0x0, 0x40] Data type: CVI_U8 |
DePurepleCbWgt0 |
Long Frame B Channel Corrected Intensity Blend Weights Value range: [0x0, 0x40] Data type: CVI_U8 |
DePurepleCrWgt1 |
Short frame R channel corrected intensity blend weights Value range: [0x0, 0x40] Data type: CVI_U8 |
DePurepleCbWgt1 |
Short frame B channel corrected intensity blend weights Value range: [0x0, 0x40] Data type: CVI_U8 |
EdgeCoringBase |
Noise Suppression Control for Base Edge Detection Value range: [0x0, 0xff] Data type: CVI_U8 |
EdgeCoringAdv |
Noise suppression control for Advance edge detection Value range: [0x0, 0xff] Data type: CVI_U8 |
【Note】
None.
【Related Data Type and Interface】
28.3.3. ISP_LCAC_AUTO_ATTR_S¶
【Description】
Gamma attribute automatic parameter
【Syntax】
typedef struct _ISP_LCAC_AUTO_ATTR_S {
CVI_U16 DePurpleCrGain[ISP_AUTO_ISO_STRENGTH_NUM];
CVI_U16 DePurpleCbGain[ISP_AUTO_ISO_STRENGTH_NUM];
CVI_U8 DePurepleCrWgt0[ISP_AUTO_ISO_STRENGTH_NUM];
CVI_U8 DePurepleCbWgt0[ISP_AUTO_ISO_STRENGTH_NUM];
CVI_U8 DePurepleCrWgt1[ISP_AUTO_ISO_STRENGTH_NUM];
CVI_U8 DePurepleCbWgt1[ISP_AUTO_ISO_STRENGTH_NUM];
CVI_U8 EdgeCoringBase[ISP_AUTO_ISO_STRENGTH_NUM];
CVI_U8 EdgeCoringAdv[ISP_AUTO_ISO_STRENGTH_NUM];
} ISP_LCAC_AUTO_ATTR_S;
【Member】
Member |
Description |
---|---|
DePurpleCrGain |
R channel purple fringing correction gain Value range: [0x0, 0xfff] Data type: CVI_U16 |
DePurpleCbGain |
B channel purple fringing correction gain Value range: [0x0, 0xfff] Data type: CVI_U16 |
DePurepleCrWgt0 |
Long Frame R Channel Corrected Intensity Blend Weights Value range: [0x0, 0x40] Data type: CVI_U8 |
DePurepleCbWgt0 |
Long Frame B Channel Corrected Intensity Blend Weights Value range: [0x0, 0x40] Data type: CVI_U8 |
DePurepleCrWgt1 |
Short frame R channel corrected intensity blend weights Value range: [0x0, 0x40] Data type: CVI_U8 |
DePurepleCbWgt1 |
Short frame B channel corrected intensity blend weights Value range: [0x0, 0x40] Data type: CVI_U8 |
EdgeCoringBase |
Noise Suppression Control for Base Edge Detection Value range: [0x0, 0xff] Data type: CVI_U8 |
EdgeCoringAdv |
Noise suppression control for Advance edge detection Value range: [0x0, 0xff] Data type: CVI_U8 |
【Note】
None.
【Related Data Type and Interface】
28.3.4. ISP_LCAC_ATTR_S¶
【Description】
Gamma attribute parameter
【Syntax】
typedef struct _ISP_LCAC_ATTR_S {
CVI_BOOL Enable;
ISP_OP_TYPE_E enOpType;
CVI_U8 UpdateInterval;
CVI_U8 TuningMode;
CVI_U8 DePurpleCrStr0;
CVI_U8 DePurpleCbStr0;
CVI_U8 DePurpleCrStr1;
CVI_U8 DePurpleCbStr1;
CVI_U8 FilterTypeBase;
CVI_U8 EdgeGainBase0;
CVI_U8 EdgeGainBase1;
CVI_U8 EdgeStrWgtBase;
CVI_U8 DePurpleStrMaxBase;
CVI_U8 DePurpleStrMinBase
CVI_U8 FilterScaleAdv;
CVI_U8 LumaWgt;
CVI_U8 FilterTypeAdv;
CVI_U8 EdgeGainAdv0;
CVI_U8 EdgeGainAdv1;
CVI_U8 EdgeStrWgtAdvG;
CVI_U8 DePurpleStrMaxAdv;
CVI_U8 DePurpleStrMinAdv;
ISP_LCAC_GAUSS_COEF_ATTR_S EdgeWgtBase;
ISP_LCAC_GAUSS_COEF_ATTR_S EdgeWgtAdv;
ISP_LCAC_MANUAL_ATTR_S stManual;
ISP_LCAC_AUTO_ATTR_S stAuto;
} ISP_LCAC_ATTR_S;
【Member】
Member |
Description |
---|---|
Enable |
LCAC module enable Value range: [0, 1] Data type: CVI_BOOL |
enOpType |
job type OP_TYPE_AUTO: automatic mode OP_TYPE_MANUAL: manual mode |
UpdateInterval |
Affects the parameter update terval, the larger the value, the slower the screen changes and the better the performance Value range: [0x0, 0xff] Data type: CVI_U8 |
TuningMode |
Threshold for edge detection. The smaller the value, the more regions are judged as edges Value range: [0x0, 0x6] Data type: CVI_U8 |
DePurpleCrStr0 |
Long frame R channel correction strength Value range: [0x0, 0x40] Data type: CVI_U8 |
DePurpleCbStr0 |
Long Frame B Channel Correction Intensity Value range: [0x0, 0x40] Data type: CVI_U8 |
DePurpleCrStr1 |
Short frame R channel correction strength Value range: [0x0, 0x40] Data type: CVI_U8 |
DePurpleCbStr1 |
Short frame B channel correction strength Value range: [0x0, 0x40] Data type: CVI_U8 |
FilterTypeBase |
Filter selection. The larger the value, the stronger the purple fringing strength Value range: [0x0, 0x3] Data type: CVI_U8 |
EdgeGainBase0 |
Intensity gain for long frame edge detection Value range: [0x0, 0x1c] Data type: CVI_U8 |
EdgeGainBase1 |
Intensity Gain for Short Frame Edge Detection Value range: [0x0, 0x23] Data type: CVI_U8 |
EdgeStrWgtBase |
Base channel edge detection weight Value range: [0x0, 0x10] Data type: CVI_U8 |
DePurpleStrMaxBase |
Base Upper limit for de-fringing intensity Value range: [0x0, 0x80] Data type: CVI_U8 |
DePurpleStrMinBase |
Base Lower limit for de-fringing intensity Value range: [0x0, 0x80] Data type: CVI_U8 |
FilterScaleAdv |
filter scale parameter Value range: [0x0, 0xf] Data type: CVI_U8 |
LumaWgt |
Luma Blend Weight Value range: [0x0, 0x1ff] Data type: CVI_U16 |
FilterTypeAdv |
filter selection. The larger the value, the stronger the purple fringing strength Value range: [0x0, 0x40] Data type: CVI_U8 |
EdgeGainAdv0 |
Intensity gain for long frame edge detection Value range: [0x0, 0x1c] Data type: CVI_U8 |
EdgeGainAdv1 |
Intensity Gain for Short Frame Edge Detection Value range: [0x0, 0x23] Data type: CVI_U8 |
EdgeStrWgtAdvG |
Advance G channel edge detection weights Value range: [0x0, 0x10] Data type: CVI_U8 |
DePurpleStrMaxAdv |
Advance Upper limit of the intensity of purple fringing Value range: [0x0, 0xff] Data type: CVI_U8 |
DePurpleStrMinAdv |
Advance The lower limit of the intensity of purple fringing Value range: [0x0, 0xff] Data type: CVI_U8 |
EdgeWgtBase |
Control the degree of purple fringing according to the edge strength, and determine the weight curve of the fusion of the purple fringing result and the original image |
EdgeWgtAdv |
Control the degree of purple fringing according to the edge strength, and determine the weight curve of the fusion of the purple fringing result and the original image |
stManual |
Manual Mode parameter Properties |
stAuto |
Auto Mode parameter Properties |
【Note】
None.
【Related Data Type and Interface】