hi_mpi_awb_sensor_reg_callback

The Atlas 200/300/500 Inference Product does not support this API.

The Atlas Training Series Product does not support this API.

Description

Registers a sensor. This callback function is provided by the AWB algorithm library. The AWB obtains differentiated initialization parameters and controls the sensor based on related callback APIs.

Prototype

hi_s32 hi_mpi_awb_sensor_reg_callback(hi_vi_pipe vi_pipe, hi_isp_3a_alg_lib *awb_lib, const hi_isp_sns_attr_info *sns_attr_info, const hi_isp_awb_sensor_register * awb_sns_register)

Restrictions

This API does not support multiple processes.

Parameters

Parameter

Input/Output

Description

vi_pipe

Input

VI pipe ID.

Value range: [0, 12)

awb_lib

Input

Pointer to the data structure of the AWB algorithm library.

sns_attr_info

Input

Attributes of the sensor that is registered with the AWB.

sensor_id in this structure can be configured in the sensor library and must be unique. It is used to ensure that the sensor to be registered with the ISP library is the same as that registered with the 3A algorithm library.

awb_sns_register

Input

Pointer to the sensor registration structure.

Returns

Example

hi_isp_3a_alg_lib awb_lib; 
hi_isp_awb_sensor_register awb_register; 
hi_isp_sns_attr_info sns_attr_info; 
hi_isp_awb_sensor_exp_func *exp_funcs = &awb_register.sns_exp; 
memset(exp_funcs, 0, sizeof(hi_isp_awb_sensor_exp_func)); 
exp_funcs-> pfn_cmos_get_awb_default = cmos_get_awb_default; 
hi_vi_pipe vi_pipe = 0; 
awb_lib.id = 0; 
sns_attr_info.sensor_id = IMX178_ID; 
strcpy(awb_lib. lib_name, HI_AWB_LIB_NAME); 
ret = hi_mpi_awb_sensor_reg_callback(vi_pipe, &awb_lib, &sns_attr_info, &awb_register); 
if (ret) {
    printf("sensor register callback function to awb lib failed!\n");     
return ret;
}