Registering the AWB Algorithm with the ISP
- Implement the following callback functions in the customized AWB algorithm library. For details about the callback functions, see hi_isp_awb_exp_func.
Member
Description
pfn_awb_init
Pointer to the callback function for initializing the AWB.
pfn_awb_init is called when hi_mpi_isp_init is called to initialize the AWB algorithm library.
pfn_awb_run
Pointer to the callback function for running the AWB.
pfn_awb_run is called when hi_mpi_isp_run is called to run the AWB algorithm library and calculate the white balance gain and color correction matrix (CCM).
pfn_awb_ctrl
Pointer to the callback function for controlling the internal status of the AWB.
pfn_awb_ctrl is called to change the internal status of the AWB algorithm library. When the firmware runs, it inexplicitly calls pfn_awb_ctrl to prompt the AWB algorithm library to switch the WDR or linear mode and set the ISO and exposure time. The ISO is related to the saturation. The chrominance noise becomes large when the gain is large. As a result, the saturation needs to be adjusted. The exposure time is set for the AWB algorithm to determine the environment illumination and optimize the scenario effect. For details about the cmd value in pfn_awb_ctrl, see hi_isp_ctrl_cmd.
pfn_awb_exit
Pointer to the callback function for destroying the AWB algorithm library
pfn_awb_exit is called when hi_mpi_isp_exit is called to destroy the AWB algorithm library.
- Implement hi_mpi_awb_register in the AWB algorithm, in which hi_mpi_isp_awb_lib_reg_callback provided by the ISP is called to register the AWB algorithm with the ISP library. The example is similar to that provided for the AE algorithm library registration.