11. RLSC¶
11.1. Functional Description¶
LSC, that isLens shading correction, lensshadowcorrection.
in cv184x systemcolumnin, LSCwillpartbecometwopart: oneisLSC, that isMLSC (Mesh Lens shading correction) , mainlyusetocorrectionColor Shading. inprocessingdevicein LSC algorithmusegridmethodforimagefirstperformcalibration, thenaftercorrectpositive, algorithmwillwillBayeron domainimagedividepartbecome 37×37 subregionblock. Bayerdomainfourchannelbythreegroupdifferent RGBgainarraytoperformcalculate. byinonlyperformcoloron correction, theusingGenerallyGchannelgainkeeponex settings, that is512. whencalibrationMLSCgroupnumberisrepeatarraywhen, thenwillaccording tocurrent color temperatureselectoutputadjacentnear twocolor temperatureofMLSCcalibrationtableperforminterpolate, producecorrespondingcurrentcolor temperature MLSCgain. calibration groupnumberthenby LscGainLutSize parameternumberDefine of.
anotheroneisRLSC (Radius Lens shading correction) , mainlyusetocorrectionLuma Shading. inLSCalgorithmin, willusingimage brightnesscenteriscenter, eachpixelpointandcenterofinterval distanceisradius, performdifferentdegreebrightnesscompensation. Generallydistancebrightnesscenterthe morefar, compensationstrengththe morelarge.
thisinmainlyintroduceRLSC relatedAPIandnumberdatastructure, MLSC alreadythroughinononechaptersectionintroduce.
11.2. API Reference¶
CVI_ISP_SetRadialShadingAttr : SetRadius Shadingalgorithm parameters
CVI_ISP_GetRadialShadingAttr : GetRadius Shadingalgorithm parameters
CVI_ISP_SetRadialShadingGainLutAttr : SetLSC radius-form compensation gain table
CVI_ISP_GetRadialShadingGainLutAttr : GetLSC radius-form compensation gain table
11.2.1. CVI_ISP_SetRadialShadingAttr¶
[Description]
SetRadius Shadingalgorithm parameters
[Syntax]
CVI_S32 CVI_ISP_SetRadialShadingAttr(VI_PIPE ViPipe, const ISP_RADIAL_SHADING_ATTR_S *pstRadialShadingAttr);
[Parameters]
Parameter Name |
Description |
Input/Output |
|---|---|---|
ViPipe |
VI_PIPE No. |
Input |
pstRadialShadingAttr |
Radius Shadingalgorithm 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_RADIAL_SHADING_ATTR_S stAttr;
CVI_ISP_GetRadialShadingAttr(ViPipe, &stAttr);
stAttr.enOpType = OP_TYPE_AUTO;
CVI_ISP_SetRadialShadingAttr(ViPipe, &stAttr);
[Related Topics]
11.2.2. CVI_ISP_GetRadialShadingAttr¶
[Description]
GetRadius Shadingalgorithm parameters
[Syntax]
CVI_S32 CVI_ISP_GetRadialShadingAttr(VI_PIPE ViPipe, ISP_RADIAL_SHADING_ATTR_S *pstRadialShadingAttr);
[Parameters]
Parameter Name |
Description |
Input/Output |
|---|---|---|
ViPipe |
VI_PIPE No. |
Input |
pstRadialShadingAttr |
Radius Shadingalgorithm 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]
11.2.3. CVI_ISP_SetRadialShadingGainLutAttr¶
[Description]
SetLSC radius-form compensation gain table
[Syntax]
CVI_S32 CVI_ISP_SetRadialShadingGainLutAttr(VI_PIPE ViPipe, const ISP_RADIAL_SHADING_GAIN_LUT_ATTR_S *pstRadialShadingGainLutAttr);
[Parameters]
Parameter Name |
Description |
Input/Output |
|---|---|---|
ViPipe |
VI_PIPE No. |
Input |
pstRadialShadingGainLutAttr |
LSC radius-form compensation gain table |
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_RADIAL_SHADING_GAIN_LUT_ATTR_S stAttr;
CVI_ISP_GetRadialShadingGainLutAttr(ViPipe, &stAttr);
stAttr.enOpType = OP_TYPE_AUTO;
CVI_ISP_SetRadialShadingGainLutAttr(ViPipe, &stAttr);
[Related Topics]
11.2.4. CVI_ISP_GetRadialShadingGainLutAttr¶
[Description]
GetLSC radius-form compensation gain table
[Syntax]
CVI_S32 CVI_ISP_GetRadialShadingGainLutAttr(VI_PIPE ViPipe, ISP_RADIAL_SHADING_GAIN_LUT_ATTR_S *pstRadialShadingGainLutAttr);
[Parameters]
Parameter Name |
Description |
Input/Output |
|---|---|---|
ViPipe |
VI_PIPE No. |
Input |
pstRadialShadingGainLutAttr |
LSC radius-form compensation gain table |
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]
11.3. Data Types¶
ISP_RADIAL_SHADING_MANUAL_ATTR_S : Manual DefinitionRadius Shadingalgorithm parameters
ISP_RADIAL_SHADING_AUTO_ATTR_S : Automatic DefinitionRadius Shadingalgorithm parameters
ISP_RADIAL_SHADING_ATTR_S : Define Radius Shadingalgorithm parameters
ISP_RADIAL_SHADING_GAIN_LUT_ATTR_S : Define LSC radius-form compensation gain table
11.3.1. ISP_RADIAL_SHADING_MANUAL_ATTR_S¶
[Description]
Manual DefinitionRadius Shadingalgorithm parameters
[Definition]
typedef struct _ISP_RADIAL_SHADING_MANUAL_ATTR_S {
CVI_U16 RadiusStr; /*Rw; Range:[0, 4095]*/
CVI_U8 NDStr; /*Rw; Range:[0, 255]*/
CVI_U8 NDThr; /*Rw; Range:[0, 255]*/
} ISP_RADIAL_SHADING_MANUAL_ATTR_S;
[Members]
Member Name |
Description |
|---|---|
RadiusStr |
RLSC globalstrength. Value Range: [0, 4095] Data Types: CVI_U16 |
NDStr |
Adjustnoisereserved strength, the larger the value, noisereservedthe moremultiple. Value Range: [0, 255] Data Types: CVI_U8 |
NDThr |
allowreservednoisemaximum value. Value Range: [0, 255] Data Types: CVI_U8 |
[Precautions]
None
[Related Data Types and Interfaces]
11.3.2. ISP_RADIAL_SHADING_AUTO_ATTR_S¶
[Description]
Automatic DefinitionRadius Shadingalgorithm parameters
[Definition]
typedef struct _ISP_RADIAL_SHADING_AUTO_ATTR_S {
CVI_U16 RadiusStr[ISP_AUTO_ISO_STRENGTH_NUM]; /*Rw; Range:[0, 4095]*/
CVI_U8 NDStr[ISP_AUTO_ISO_STRENGTH_NUM]; /*Rw; Range:[0, 255]*/
CVI_U8 NDThr[ISP_AUTO_ISO_STRENGTH_NUM]; /*Rw; Range:[0, 255]*/
} ISP_RADIAL_SHADING_AUTO_ATTR_S;
[Members]
Member Name |
Description |
|---|---|
RadiusStr |
RLSC globalstrength. Value Range: [0, 4095] Data Types: CVI_U16 |
NDStr |
Adjustnoisereserved strength, the larger the value, noisereservedthe moremultiple. Value Range: [0, 255] Data Types: CVI_U8 |
NDThr |
allowreservednoisemaximum value. Value Range: [0, 255] Data Types: CVI_U8 |
[Precautions]
None
[Related Data Types and Interfaces]
11.3.3. ISP_RADIAL_SHADING_ATTR_S¶
[Description]
Define Radius Shadingalgorithm parameters
[Definition]
typedef struct _ISP_RADIAL_SHADING_ATTR_S {
CVI_BOOL Enable; /*Rw; Range:[0, 1]*/
ISP_OP_TYPE_E enOpType;
CVI_U8 UpdateInterval; /*Rw; Range:[0, 255]*/
CVI_U16 CenterX; /*Rw; Range:[0, 8191]*/
CVI_U16 CenterY; /*Rw; Range:[0, 8191]*/
CVI_U16 RadiusScaleRGB; /*Rw; Range:[0, 32767]*/
ISP_RADIAL_SHADING_MANUAL_ATTR_S stManual;
ISP_RADIAL_SHADING_AUTO_ATTR_S stAuto;
} ISP_RADIAL_SHADING_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 |
CenterX |
radiustoshadowcorrection centerpoint X coordinates. Value Range: [0, 8191] Data Types: CVI_U16 |
CenterY |
radiustoshadowcorrection centerpoint Y coordinates. Value Range: [0, 8191] Data Types: CVI_U16 |
RadiusScaleRGB |
Controlradiustoshadowcorrection radiusreduceplaceratioexample, affects RGB channel correctionrange. Value Range: [0, 32767] Data Types: CVI_U16 |
stManual |
manual parameters |
stAuto |
automatic parameters |
[Precautions]
None
[Related Data Types and Interfaces]
11.3.4. ISP_RADIAL_SHADING_GAIN_LUT_ATTR_S¶
[Description]
Define LSC radius-form compensation gain table
[Definition]
typedef struct _ISP_RADIAL_SHADING_GAIN_LUT_ATTR_S {
CVI_U16 GGain[ISP_RLSC_WINDOW_SIZE]; /*Rw; Range:[0, 4095]*/
} ISP_RADIAL_SHADING_GAIN_LUT_ATTR_S;
[Members]
Member Name |
Description |
|---|---|
GGain |
brightnesscompensationgaintable, bycalibrationobtainto. Value Range: [0, 4095] Data Types: CVI_U16 |
[Precautions]
None
[Related Data Types and Interfaces]