9. DPC¶
9.1. Functional Description¶
DPC allnameis Defect Pixel Correction, cancorrect Sensor onhaveproblem defectivepoint.
correctmethodhavetwokind, respectivelyisstaticcorrectionanddynamiccorrection.
staticcorrection:correctionwhenpartisdarkpointcorrectionandbrightpointcorrection.
brightpointcorrectionwhen, handlelensshadeblack, startdefectivepointcalibrationprogram.
darkpointcorrectionwhen, notshadeblackinflatflatbackgroundscenewhensuch asgraydegreeboxbefore, Adjustexposuremakeimageoverallbrightnessapproximatelyis 50%.
staticdefectivepointmostmultipleallow 4095 defectivepoint.
dynamiccorrection:usethismethodwhen, notusecorrectionnumberdataandisdirectdynamicdeterminedefectivepoint, andandaddusingcorrect. inlownoisewhenforimagecolor casthavehelp, butifstrengthtoostrongcancanwillcauseimagedetailsdecreaselow.
[Important Notice]
thisin cv184x systemcolumnonlyusetodynamiccorrection
9.2. API Reference¶
CVI_ISP_SetDPDynamicAttr : Setdynamicdefectivepointcorrectionattribute
CVI_ISP_GetDPDynamicAttr : Getdynamicdefectivepointcorrectionattribute
9.2.1. CVI_ISP_SetDPDynamicAttr¶
[Description]
Setdynamicdefectivepointcorrectionattribute
[Syntax]
CVI_S32 CVI_ISP_SetDPDynamicAttr(VI_PIPE ViPipe, const ISP_DP_DYNAMIC_ATTR_S *pstDPDynamicAttr);
[Parameters]
Parameter Name |
Description |
Input/Output |
|---|---|---|
ViPipe |
VI_PIPE No. |
Input |
pstDPDynamicAttr |
dynamicdefectivepointcorrectionattribute |
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_DP_DYNAMIC_ATTR_S stAttr;
CVI_ISP_GetDPDynamicAttr(ViPipe, &stAttr);
stAttr.enOpType = OP_TYPE_AUTO;
CVI_ISP_SetDPDynamicAttr(ViPipe, &stAttr);
[Related Topics]
9.2.2. CVI_ISP_GetDPDynamicAttr¶
[Description]
Getdynamicdefectivepointcorrectionattribute
[Syntax]
CVI_S32 CVI_ISP_GetDPDynamicAttr(VI_PIPE ViPipe, ISP_DP_DYNAMIC_ATTR_S *pstDPDynamicAttr);
[Parameters]
Parameter Name |
Description |
Input/Output |
|---|---|---|
ViPipe |
VI_PIPE No. |
Input |
pstDPDynamicAttr |
dynamicdefectivepointcorrectionattribute |
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]
9.3. Data Types¶
ISP_DP_DYNAMIC_MANUAL_ATTR_S : Manual Definitiondynamicdefectivepointcorrectionattribute
ISP_DP_DYNAMIC_AUTO_ATTR_S : Automatic Definitiondynamicdefectivepointcorrectionattribute
ISP_DP_DYNAMIC_ATTR_S : Define dynamicdefectivepointcorrectionattribute
9.3.1. ISP_DP_DYNAMIC_MANUAL_ATTR_S¶
[Description]
Manual Definitiondynamicdefectivepointcorrectionattribute
[Definition]
typedef struct _ISP_DP_DYNAMIC_MANUAL_ATTR_S {
CVI_U8 DefectCnt1; /*Rw; Range:[0, 16]*/
CVI_U8 DefectCnt2; /*Rw; Range:[0, 16]*/
CVI_U8 AdvMode; /*Rw; Range:[0, 1]*/
CVI_U8 AvgMode; /*Rw; Range:[0, 1]*/
} ISP_DP_DYNAMIC_MANUAL_ATTR_S;
[Members]
Member Name |
Description |
|---|---|
DefectCnt1 |
defectivepointdeterminelogic threshold1 Value Range: [0, 16] Data Types: CVI_U8 |
DefectCnt2 |
defectivepointdeterminelogic threshold2 Generally DefectCnt2 need tosmallin DefectCnt1 Value Range: [0, 16] Data Types: CVI_U8 |
AdvMode |
seconddirectional compensationEnable. 0:Disable, the compensation method depends on AvgMode. 1:Enable. Value Range: [0, 1] Data Types: CVI_U8 |
AvgMode |
defectivepointcompensationmode. 0: directional compensation. 1: non-directional compensation (average compensation). Value Range: [0, 1] Data Types: CVI_U8 |
[Precautions]
None
[Related Data Types and Interfaces]
9.3.2. ISP_DP_DYNAMIC_AUTO_ATTR_S¶
[Description]
Automatic Definitiondynamicdefectivepointcorrectionattribute
[Definition]
typedef struct _ISP_DP_DYNAMIC_AUTO_ATTR_S {
CVI_U8 DefectCnt1[ISP_AUTO_ISO_STRENGTH_NUM]; /*Rw; Range:[0, 16]*/
CVI_U8 DefectCnt2[ISP_AUTO_ISO_STRENGTH_NUM]; /*Rw; Range:[0, 16]*/
CVI_U8 AdvMode[ISP_AUTO_ISO_STRENGTH_NUM]; /*Rw; Range:[0, 1]*/
CVI_U8 AvgMode[ISP_AUTO_ISO_STRENGTH_NUM]; /*Rw; Range:[0, 1]*/
} ISP_DP_DYNAMIC_AUTO_ATTR_S;
[Members]
Member Name |
Description |
|---|---|
DefectCnt1 |
defectivepointdeterminelogic threshold1 Value Range: [0, 16] Data Types: CVI_U8 |
DefectCnt2 |
defectivepointdeterminelogic threshold2 Generally DefectCnt2 need tosmallin DefectCnt1 Value Range: [0, 16] Data Types: CVI_U8 |
AdvMode |
seconddirectional compensationEnable. 0:Disable, the compensation method depends on AvgMode. 1:Enable. Value Range: [0, 1] Data Types: CVI_U8 |
AvgMode |
defectivepointcompensationmode. 0: directional compensation. 1: non-directional compensation (average compensation). Value Range: [0, 1] Data Types: CVI_U8 |
[Precautions]
None
[Related Data Types and Interfaces]
9.3.3. ISP_DP_DYNAMIC_ATTR_S¶
[Description]
Define dynamicdefectivepointcorrectionattribute
[Definition]
typedef struct _ISP_DP_DYNAMIC_ATTR_S {
CVI_BOOL Enable; /*Rw; Range:[0, 1]*/
ISP_OP_TYPE_E enOpType;
CVI_U8 UpdateInterval; /*Rw; Range:[0, 255]*/
CVI_U16 DarkDefectThresh[DP_THR_LUT_NUM]; /*Rw; Range:[0, 4095]*/
CVI_U16 BrightDefectThresh[DP_THR_LUT_NUM]; /*Rw; Range:[0, 4095]*/
CVI_U16 DarkDefectThreshOffset; /*Rw; Range:[0, 4095]*/
CVI_U16 BrightDefectThreshOffset; /*Rw; Range:[0, 4095]*/
CVI_U8 TransitionWeight; /*Rw; Range:[0, 255]*/
ISP_DP_DYNAMIC_MANUAL_ATTR_S stManual;
ISP_DP_DYNAMIC_AUTO_ATTR_S stAuto;
} ISP_DP_DYNAMIC_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 |
DarkDefectThresh |
according tolumalook upthreshold1 Lut, fordarkdefectivepoint. Value Range: [0, 4095] Data Types: CVI_U16 |
BrightDefectThresh |
according tolumalook upthreshold1 Lut,forbrightdefectivepoint. Value Range: [0, 4095] Data Types: CVI_U16 |
DarkDefectThreshOffset |
according tobiasmoveamountseekobtainthreshold2, fordarkdefectivepoint. Value Range: [0, 4095] Data Types: CVI_U16 |
BrightDefectThreshOffset |
according tobiasmoveamountseekobtainthreshold2, forbrightdefectivepoint. Value Range: [0, 4095] Data Types: CVI_U16 |
TransitionWeight |
whendefectivepointdetermineconditionprocessinthroughtransitionrangeinsidewhen (notcorrectsetisnotisdefectivepoint) , thisweightdeterminesisperformdpcalsoisnotperform ratioexample. Value Range: [0, 255] Data Types: CVI_U8 |
stManual |
manual parameters |
stAuto |
automatic parameters |
[Precautions]
None
[Related Data Types and Interfaces]