hi_mpi_isp_calc_flicker_type
Description
Obtains the power frequency flicker type. This is input frame information.
Prototype
hi_s32 hi_mpi_isp_calc_flicker_type(hi_vi_pipe vi_pipe, hi_isp_calc_flicker_input *input_param, hi_isp_calc_flicker_output *output_param, hi_video_frame_info frame[], hi_u32 array_size)
Constraints
- Three consecutive frames must be used for calculation. The number of input array_size frames must be 3. In addition, the data pointed to by frame[] must be valid.
- The resolution of the calculated frame data cannot exceed the maximum image resolution that can be processed by the ISP module.
- To speed up the calculation, the VGS hardware module is used for calculation. Therefore, the image resolution used for calculating power frequency flicker cannot exceed the maximum resolution range of the VGS.
- In mixed light sources with different power flickers, for example, 50 Hz and 60 Hz light sources exist at the same time, or the power frequency flicker source occupies only a small part of the light source environment, misjudgment easily occurs.
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
vi_pipe |
Input |
VI pipe ID Value range: [0, 8) |
input_param |
Input |
Pointer to the input of auto power frequency flicker calculation |
output_param |
Output |
Pointer to the output of auto power frequency flicker calculation |
frame[] |
Input |
Consecutive frame data to be calculated |
array_size |
Input |
Number of consecutive frames to be input for calculation |
Returns
- 0: success
- Other values: failure. For details, see Error Codes.
Example
hi_vi_pipe vi_pipe = 0; hi_u16 frame_num = 3; hi_video_frame_info frame[3]; hi_isp_calc_flicker_input input_param; hi_isp_calc_flicker_output output_param; hi_isp_exp_info exp_info; hi_mpi_isp_query_exposure_info(vi_pipe, &exp_info); input_param. lines_per_second = exp_info.lines_per500ms*2 .. .. .. Obtain three consecutive frames and send them to frame[3]. (Omitted) .. .. .. ret = hi_mpi_isp_calc_flicker_type(vi_pipe, input_param, output_param, frame, frame_num);
Parent topic: Auto Flicker Type Detection