hi_mpi_isp_fpn_calibrate

Description

Sets the calibration attribute for FPN removal.

Prototype

hi_s32 hi_mpi_isp_fpn_calibrate(hi_vi_pipe vi_pipe, hi_isp_fpn_calibrate_attr *calibrate_attr)

Constraints

  • This MPI is used to calibrate FPN algorithm parameters in debugging scenarios. You are not advised to use this MPI in commercial scenarios because it may cause memory exceptions and image exceptions.
  • The memory used for calibration must be 16-bit and allocated by calling the acltdtAllocBuf interface. Ensure that the input black frame address is valid. After the calibration is complete, information about the black frame, ISO, black frame length, offset, and compression flag must be saved to external storage medium, which is required for correction.

    For details about the acltdtAllocBuf interface, see "AscendCL API Reference > Shared Buffer Management" in CANN AscendCL Application Software Development Guide (C&C++).

  • Calibration in block mode is not supported.
  • FPN calibration is not supported in compression mode and can be performed only in non-compressed mode.
  • In WDR scenarios, FPN calibration cannot be enabled.
  • When the physical VI channel is enabled, FPN calibration cannot be enabled.
  • Before disabling a physical VI channel by calling the corresponding interface, you are advised to wait for an appropriate period to ensure that the job is delivered.
  • Only FPN calibration for a single pipe is supported, and FPN calibration and correction for a single pipe cannot be performed at the same time.
  • The minimum resolution of the black frame for calibration is 120 x 120, and the maximum resolution is 4096 x 4096.
  • When a pipe of the VI module is destroyed (for example, the resolution or WDR mode is switched), the FPN attribute stored in the VI module is lost. The FPN function can be restored only after a pipe of the VI module is created and configured.

Parameters

Parameter

Input/Output

Description

vi_pipe

Input

VI pipe ID

Value range: [0, 8)

calibrate_attr

Input

Pointer to the calibration attribute for FPN removal

Returns

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