10. RadialShading

10.1. Function Overview

Correct the vignetting around the lens in the form of concentric circles

10.2. API Reference

10.2.1. CVI_ISP_SetRadialShadingAttr

【Description】

Set Radial LSC parameters

【Syntax】

CVI_S32 CVI_ISP_SetRadialShadingAttr(VI_PIPE ViPipe, const ISP_RADIAL_SHADING_ATTR_S *pstRadialShadingAttr);

【Parameter】

Parameter

Description

Input / Output

ViPipe

VI_PIPE number

Input

pstRadialShadingAttr

Mesh Shading algorithm 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】

This function of cv180x & cv181x is not supported.

【Example】

None.

【Related Topic】

10.2.2. CVI_ISP_GetRadialShadingAttr

【Description】

  • Get Radial LSC parameters

【Syntax】

CVI_S32 CVI_ISP_GetRadialShadingAttr(VI_PIPE ViPipe, ISP_RADIAL_SHADING_ATTR_S *pstRadialShadingAttr);

【Parameter】

Parameter

Description

Input / Output

ViPipe

VI_PIPE number

Input

pstRadialShadingAttr

Radial LSC parameter

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】

This function of cv180x & cv181x is not supported.

【Example】

None.

【Related Topic】

10.2.3. CVI_ISP_SetRadialShadingGainLutAttr

【Description】

  • Set the LSC Radius form compensation gain table

【Syntax】

CVI_S32 CVI_ISP_SetRadialShadingGainLutAttr(VI_PIPE ViPipe, const ISP_RADIAL_SHADING_GAIN_LUT_ATTR_S *pstRadialShadingGainLutAttr);

【Parameter】

Parameter

Description

Input / Output

ViPipe

VI_PIPE number

Input

pstRadialShadingGainLutAttr

LSC Radius Form Compensation Gain Table

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】

This function of cv180x & cv181x is not supported.

【Example】

None.

【Related Topic】

10.2.4. CVI_ISP_GetRadialShadingGainLutAttr

【Description】

Get the LSC Radius form compensation gain table

【Syntax】

CVI_S32 CVI_ISP_GetRadialShadingGainLutAttr(VI_PIPE ViPipe, const ISP_RADIAL_SHADING_GAIN_LUT_ATTR_S *pstRadialShadingGainLutAttr);

【Parameter】

Parameter

Description

Input / Output

ViPipe

VI_PIPE number

Input

pstRadialShadingGainLutAttr

LSC Radius Form Compensation Gain Table

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】

This function of cv180x & cv181x is not supported.

【Example】

None.

【Related Topic】

10.3. Data Types

10.3.1. ISP_RADIAL_SHADING_MANUAL_ATTR_S

【Description】

  • Radial LSC manual parameter

【Syntax】

typedef struct _ISP_RADIAL_SHADING_MANUAL_ATTR_S {
   CVI_U16 RadiusStr;
   CVI_U16 RadiusIRStr;
} ISP_RADIAL_SHADING_MANUAL_ATTR_S;

【Member】

Member

Description

RadiusStr

LSC compensation strength

Value range: [0x0, 0xfff]

Data Type: CVI_U16

RadiusIRStr

LSC IR Compensation Strength

Value range: [0x0, 0xfff]

Data Type: CVI_U16

【Note】

None.

【Related Data Type and Interface】

10.3.2. ISP_RADIAL_SHADING_AUTO_ATTR_S

【Description】

Radial LSC automatic parameter

【Syntax】

typedef struct _ISP_RADIAL_SHADING_AUTO_ATTR_S {
CVI_U16 RadiusStr[ISP_AUTO_ISO_STRENGTH_NUM];
CVI_U16 RadiusIRStr[ISP_AUTO_ISO_STRENGTH_NUM];
} ISP_RADIAL_SHADING_AUTO_ATTR_S;

【Member】

Member

Description

RadiusStr

LSC compensation strength

Value range: [0x0, 0xfff]

Data Type: CVI_U16

RadiusIRStr

LSC IR Compensation Strength

Value range: [0x0, 0xfff]

Data Type: CVI_U16

【Note】

None.

【Related Data Type and Interface】

10.3.3. ISP_RADIAL_SHADING_ATTR_S

【Description】

  • Radial LSC parameter

【Syntax】

typedef struct _ISP_RADIAL_SHADING_ATTR_S {
   CVI_BOOL Enable;
   ISP_OP_TYPE_E enOpType;
   CVI_U8 UpdateInterval;
   CVI_U16 CenterX;
   CVI_U16 CenterY;
   CVI_U16 RadiusScaleRGB;
   CVI_U16 RadiusScaleIR;
   ISP_RADIAL_SHADING_MANUAL_ATTR_S stManual;
   ISP_RADIAL_SHADING_AUTO_ATTR_S stAuto;
} ISP_RADIAL_SHADING_ATTR_S;

【Member】

Member

Description

Enable

The LSC function is enabled.

0: off.

1: Enabled.

Value range: [0, 1]

Data Type: CVI_BOOL

enOpType

Choose manual or automatic mode

UpdateInterval

Affects the parameter update interval, the larger the value, the slower the screen changes and the better the performance.

Value range: [0x0, 0xff]

Data Type: CVI_U8

CenterX

X-direction coordinates of image sensor mirror center

Value range: [0x0, 0x1fff]

Data Type: CVI_U16

CenterY

Y-direction coordinates of image sensor mirror center

Value range: [0x0, 0x1fff]

Data Type: CVI_U16

RadiusScaleRGB

RGB Radius and compensation gain table normalization coefficient

Value range: [0x0, 0x7fff]

Data Type: CVI_U16

RadiusScaleIR

IR Radius and Compensation Gain Table Normalization Coefficients

Value range: [0x0, 0x7fff]

Data Type: CVI_U16

stManual

manual parameters

stAuto

automatic parameters

【Note】

None.

【Related Data Type and Interface】

10.3.4. ISP_RADIAL_SHADING_GAIN_LUT_S

【Description】

  • Radial LSC Radius form compensation gain table item

【Syntax】

typedef struct _ISP_RADIAL_SHADING_GAIN_LUT_S {
   CVI_U16 ColorTemperature;
   CVI_U16 RGain[ISP_RLSC_WINDOW_SIZE];
   CVI_U16 GGain[ISP_RLSC_WINDOW_SIZE];
   CVI_U16 BGain[ISP_RLSC_WINDOW_SIZE];
   CVI_U16 IrGain[ISP_RLSC_WINDOW_SIZE];
} ISP_RADIAL_SHADING_GAIN_LUT_S;

【Member】

Member

Description

ColorTemperature

The color temperature corresponding to the color temperature adaptive LSC compensation gain table, the unit is K

Value range: [0x0, 0xffff]

Data Type: CVI_U16

RGain

LSC Radius form red channel gain

Value range: [0x0, 0xfff]

Data Type: CVI_U16

GGain

LSC Radius form green channel gain

Value range: [0x0, 0xfff]

Data Type: CVI_U16

BGain

LSC Radius form blue channel gain

Value range: [0x0, 0xfff]

Data Type: CVI_U16

IrGain

LSC Radius form IR color channel gain

Value range: [0x0, 0xfff]

Data Type: CVI_U16

【Note】

None.

【Related Data Type and Interface】

10.3.5. ISP_RADIAL_SHADING_GAIN_LUT_ATTR_S

【Description】

  • LSC Radius form compensation gain table

【Syntax】

typedef struct _ISP_RADIAL_SHADING_GAIN_LUT_ATTR_S {
   CVI_U8 Size;
   CVI_U16 ColorTemperature[ISP_RLSC_COLOR_TEMPERATURE_SIZE];
   ISP_RADIAL_SHADING_GAIN_LUT_S RLscGainLut[ISP_RLSC_COLOR_TEMPERATURE_SIZE];
} ISP_RADIAL_SHADING_GAIN_LUT_ATTR_S;

【Member】

Member

Description

Size

Color temperature adaptive LSC compensation gain table quantity

Value range: [0x1, 0x7]

Data Type: CVI_U8

ColorTemperature

The color temperature corresponding to the color temperature adaptive LSC compensation gain table, the unit is K

Value range: [0x0, 0xffff]

Data Type: CVI_U16

RLscGainLut

LSC Radius Form Compensation Gain Table Details

Value range: [0x0, 0xfff]

Data Type: CVI_U16

【Note】

None.

【Related Data Type and Interface】