hi_mpi_isp_set_dp_calibrate

Description

Sets the parameter of static defect pixel calibration.

Prototype

hi_s32 hi_mpi_isp_set_dp_calibrate(hi_vi_pipe vi_pipe, const hi_isp_dp_static_calibrate *dp_calibrate)

Constraints

  • This MPI is used to calibrate the parameter of the defect pixel algorithm in debugging scenarios. You are not advised to use this MPI in commercial scenarios because it may cause memory exceptions and image exceptions.
  • This MPI is used for static defect pixel calibration, which needs to be enabled only once. After the calibration is complete, static defect pixel calibration is automatically disabled and the DPC module is restored to the normal defect pixel correction mode. The environment for detecting bright defect pixels is as follows: the system automatically uses the minimum analog gain and digital gain, reduces the frame rate to 5 to 6 fps, and sets the exposure time to 200 ms. Then you need to cover the lens or turn off the iris. The environment for detecting dark defect pixels is as follows: open the iris, select the flat background, use a fixed illuminant such as a luminance box, and set the average luminance of the entire image to 50% of the maximum luminance or set the luminance of channel B in the Bayer format to 20% of the maximum luminance.
  • Static defect pixel calibration is supported in WDR mode. In WDR mode, static defect pixel calibration is performed on short frames by default. Before calibration, you are advised to select long frames by using the bit2_chn_select variable of hi_mpi_isp_set_module_ctrl before static defect pixel calibration. Typically, calibration on long frames is enough. In special cases, if there are residual defect pixels after the calibration on long frames, you can use the bit2_chn_select variable to select medium and short frames for re-calibration, and combine multiple defect pixel LUTs into one.

Parameters

Parameter

Input/Output

Description

vi_pipe

Input

VI pipe ID

Value range: [0, 8)

dp_calibrate

Input

Parameter of static defect pixel calibration

Returns

  • 0: success
  • Other values: failure. For details, see Error Codes.