32. DIS¶
32.1. Function Overview¶
DIS module calculates the current displacement by comparing the current image and the previous frame image, and it is transferred to the post module for image cutting, and then the anti-jitter effect is realized.
32.2. API Reference¶
CVI_ISP_SetDISAttr : Set DIS property parameter.
CVI_ISP_GetDISAttr : Get DIS property parameter.
CVI_ISP_SetDISConfig : Set DIS control parameter.
CVI_ISP_GetDISConfig : Get DIS control parameter.
32.2.1. CVI_ISP_SetDISAttr¶
【Description】
Set DIS property parameter.
【Syntax】
CVI_S32 CVI_ISP_SetDisAttr(VI_PIPE ViPipe, const ISP_DIS_ATTR_S *pstDisAttr);
【Parameter】
Parameter |
Description |
Input/Output |
---|---|---|
ViPipe |
VI_PIPE number |
Input |
pstDisAttr |
DIS property parameter |
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】
32.2.2. CVI_ISP_GetDISAttr¶
【Description】
Get DIS property parameter.
【Syntax】
CVI_S32 CVI_ISP_GetDisAttr(VI_PIPE ViPipe, ISP_DIS_ATTR_S *pstDisAttr);
【Parameter】
Parameter |
Description |
Input/Output |
---|---|---|
ViPipe |
VI_PIPE number |
Input |
pstDisAttr |
DIS property 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】
None.
【Example】
None.
【Related Topic】
32.2.3. CVI_ISP_SetDISConfig¶
【Description】
Set DIS control parameter.
【Syntax】
CVI_S32 CVI_ISP_SetDisConfig(VI_PIPE ViPipe, const ISP_DIS_CONFIG_S *pstDisConfig);
【Parameter】
Parameter |
Description |
Input/Output |
---|---|---|
ViPipe |
VI_PIPE number |
Input |
pstDisConfig |
DIS control parameter |
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】
32.2.4. CVI_ISP_GetDISConfig¶
【Description】
Get DIS control parameter.
【Syntax】
CVI_S32 CVI_ISP_GetDisConfig(VI_PIPE ViPipe, const ISP_DIS_CONFIG_S *pstDisConfig);
【Parameter】
Parameter |
Description |
Input/Output |
---|---|---|
ViPipe |
VI_PIPE number |
Input |
pstDisConfig |
DIS control 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】
None.
【Example】
None.
【Related Topic】
32.3. Data Types¶
ISP_DIS_ATTR_S : DIS attribute parameter.
ISP_DIS_CONFIG_S : DIS configuration parameter.
DIS_MODE_E : DIS mode parameter
DIS_MOTION_LEVEL_E : DIS level parameter
32.3.1. ISP_DIS_ATTR_S¶
【Description】
DIS attribute parameter.
【Syntax】
typedef struct _ISP_DIS_ATTR_S {
CVI_BOOL enable;
CVI_U32 movingSubjectLevel;
CVI_U32 horizontalLimit;
CVI_U32 verticalLimit;
CVI_BOOL stillCrop;
} ISP_DIS_ATTR_S;
【Member】
Member |
Description |
---|---|
enable |
DIS enable switch; CVI_FALSE: not enabled CVI_TRUE: Enable |
movingSubjectLevel |
A parameter used to determine whether an object is moving or not; the smaller the value of the parameter used to judge whether an object is moving or not, the better the anti-shake effect is, but it is prone to offset. On the contrary, the jitter is easy to increase, but the offset phenomenon is reduced. Value range: [0, 6] Data type: CVI_U32 |
horizontalLimit |
Horizontal displacement limit; when the displacement of a large area object causes the background displacement to reach a certain range, the anti- shake effect is not done. The calculation method is image_width * horizontalLimit / 1000 Value range: [0, 1000] Data type: CVI_U32 |
verticalLimit |
Vertical displacement limit; when the displacement of a large area object causes the background displacement to reach a certain range, the anti-shake effect is not done. The calculation method is image_height * verticalLimit / 1000 Value range: [0, 1000] Data type: CVI_U32 |
stillCrop |
Turn off the anti-shake effect of DIS, but keep the output of clipping ratio to avoid the change of image size CVI_FALSE: not enabled CVI_TRUE: Enable |
【Note】
None.
【Related Data Type and Interface】
32.3.2. ISP_DIS_CONFIG_S¶
【Description】
DIS configuration parameter.
【Syntax】
typedef struct _ISP_DIS_CONFIG_S {
DIS_MODE_E enMode;
DIS_MOTION_LEVEL_E enMotionLevel;
CVI_U32 u32CropRatio;
} ISP_DIS_CONFIG_S;
【Member】
Member |
Description |
---|---|
mode |
Digital anti jitter algorithm mode; only one algorithm mode is supported at present Value range: [0, 0] Data type: dis_MODE_E |
motionLevel |
The motion level of camera only supports IS_MOTION_LEVEL_NORMAL at present. Value range: [1,1] Data type: DIS_MOTION_LEVEL |
cropRatio |
Image clipping ratio of DIS output; the larger the cut ratio of DIS output image, the larger the retained image, and vice versa. The recommended default value is 94 Value range: [50, 98] Data type: CVI_U32 |
【Note】
CropRatio will affect the maximum displacement that DIS algorithm can support. Assuming that CropRatio is 98, it means that only 2% of the wide energy is left for displacement.
【Related Data Type and Interface】
32.3.3. DIS_MODE_E¶
【Description】
Define DIS anti-shake algorithm mode.
【Syntax】
typedef enum _ISP_DIS_MODE_E {
DIS_MODE_2_DOF_GME = 0, /* Only use with GME in 2 dof */
DIS_MODE_DEBUG,
DIS_MODE_DOF_BUTT,
} DIS_MODE_E;
【Member】
Member |
Description |
---|---|
DIS_MODE_2_DOF_GME |
Two degree of freedom GME algorithm |
DIS_MODE_DEBUG |
debug mode |
【Note】
None.
【Related Data Type and Interface】
32.3.4. DIS_MOTION_LEVEL_E¶
【Description】
Define the motion level of the lens.
【Syntax】
typedef enum _ISP_DIS_MOTION_LEVEL_E {
DIS_MOTION_LEVEL_NORMAL = 1,
DIS_MOTION_LEVEL_BUTT
} DIS_MOTION_LEVEL_E;
【Member】
Member |
Description |
---|---|
DIS_MOTION_LEVEL_NORMAL |
Normal level of lens wobble |
【Note】
None.
【Related Data Type and Interface】