hi_isp_dp_static_calibrate
Description
Defines the attribute for static defect pixel calibration.
Definition
typedef struct {
hi_bool enable_detect;
hi_isp_static_dp_type static_dp_type;
hi_u8 start_thresh;
hi_u16 count_max;
hi_u16 count_min;
hi_u16 time_limit;
hi_u32 table[HI_ISP_STATIC_DP_COUNT_MAX];
hi_u8 finish_thresh;
hi_u16 count;
hi_isp_status status;
} hi_isp_dp_static_calibrate;
Members
Member |
Description |
|---|---|
enable_detect |
Static defect pixel calibration enable The options are as follows:
|
static_dp_type |
Type of static defect pixel calibration The options are as follows:
|
start_thresh |
Threshold for detecting whether static defect pixel calibration starts. The value is related to the sensor. Value range: [1, 0xFF] |
count_max |
Maximum number of allowed static defect pixels. The value range is related to the width configured for the VI pipe. If the width range is [120, 3840], the value range of this member is (0, HI_ISP_STATIC_DP_COUNT_NORMAL]. If the width range is [3841, 7680], the value range of this member is (0, 2 x HI_ISP_STATIC_DP_COUNT_NORMAL]. If the width range is [7681, 11520], the value range of this member is (0, 3 x HI_ISP_STATIC_DP_COUNT_NORMAL]. If the width range is [11521, 15360], the value range of this member is (0, 4 x HI_ISP_STATIC_DP_COUNT_NORMAL]. If the width range is [15361, 16384], the value range of this member is (0, 5 x HI_ISP_STATIC_DP_COUNT_NORMAL]. #define HI_ISP_STATIC_DP_COUNT_NORMAL 2048 |
count_min |
Minimum number of allowed static defect pixels Value range: [0, count_max) |
time_limit |
Calibration timeout threshold Value range: [0, 0x640] |
table[HI_ISP_STATIC_DP_COUNT_MAX] |
Coordinate lookup table for the bright and dark defect pixels. This member is read-only, and only the lower 29 bits are valid. Bit[12:0] indicate the horizontal coordinates of defect pixels, and bit[28:16] indicate the vertical coordinates of defect pixels. Value range of each coordinate: [0, 0x1FFF1FFF] #define HI_ISP_STATIC_DP_COUNT_NORMAL 2048 #define HI_ISP_STRIPING_MAX_NUM 5 #define HI_ISP_STATIC_DP_COUNT_MAX (HI_ISP_STATIC_DP_COUNT_NORMAL * HI_ISP_STRIPING_MAX_NUM) |
finish_thresh |
Threshold for detecting whether static defect pixel calibration ends. This member is read-only. Value range: [0, 0xFF] |
count |
Number of calibrated static defect pixels. This member is read-only. Value range: [0, HI_ISP_STATIC_DP_COUNT_MAX] |
status |
Status of the static defect pixel calibration result. This member is read-only. The options are as follows:
|
Restrictions
- Defect pixel detection is successful if the number of detected defect pixels is within the range of [count_min, count_max). You need to fine-tune the values of the two parameters when different sensors are used.
- The maximum number of defect pixels supported by the system is defined by HI_ISP_STATIC_DP_COUNT_MAX. When the number of sensor defect pixels is greater than the value of HI_ISP_STATIC_DP_COUNT_MAX, the number of defect pixels reported by the system is HI_ISP_STATIC_DP_COUNT_MAX. Therefore, HI_ISP_STATIC_DP_COUNT_MAX does not necessarily reflect the actual number of defect pixels.
- finish_thresh is used only as the output. If sensors of the same type are used, you can set start_thresh to an appropriate value based on the value of finish_thresh to accelerate static DPC.
- The algorithm automatically restores status to HI_ISP_STATE_INIT each time hi_mpi_isp_set_dp_calibrate is called.
- To calibrate bright defect pixels, frame rate reduction is recommended. The timeout period of bright defect pixels is approximately equal to time_limit/8s. To calibrate dark defect pixels, frame rate reduction is not recommended. The timeout period of dark defect pixels is approximately equal to time_limit/48s.