hi_stitching_gain_param

Description

Defines the gain compensation parameters.

Prototype

typedef struct {
    hi_stitching_histogram_type hist_type;
    hi_stitching_gain_type gain_type;
    hi_void *user_data;
    hi_s32 (*calulate_gain_callback)(
        hi_void *user_data,
        hi_void *hist_config,
        hi_u32 hist_count,
        hi_void *gain,      
        hi_u32 gain_size);
} hi_stitching_gain_param;

Members

Member

Description

hist_type

Histogram statistics type.

gain_type

Gain compensation type.

user_data

User-defined data.

calulate_gain_callback

Callback function pointer.

If gain_type is set to GAIN_LUT or GAIN_VALUE, the callback function pointer must be configured.

The parameters in the callback function are described as follows:

  • user_data

    The system assigns the user-defined data (hi_stitching_gain_param.user_data) to user_data in the callback function.

  • hist_config

    The hist_config parameter in the callback function is internally managed by the system. You can obtain the histogram information by using this parameter after delivering a surround-view stitching task and before releasing the internal surround-view stitching resources. The information contains only the Y component data but not the UV component data.

    If hist_type (the histogram statistics type) is OVERLAP_HISTOGRAM or GLOBAL_HISTOGRAM, the data type is hi_stitching_histogram_param.

    If hist_type is OVERLAP_MEAN_VALUE, the data type is hi_stitching_mean_param.

    If hist_type is MEAN_Y_VALUE, this parameter indicates the Y-component average value of the pixels of each input image. The data type is UINT32.

  • hist_count

    Indicates the number of hi_stitching_histogram_param structure objects.

    If hist_type is OVERLAP_HISTOGRAM or OVERLAP_MEAN_VALUE, the value of hist_count is fixed at 8.

    If hist_type is GLOBAL_HISTOGRAM, the value of hist_count is fixed at 4.

    If hist_type is MEAN_Y_VALUE, the value of hist_count is fixed at 5.

  • gain

    gain parameter in the callback function.

    If gain_type is GAIN_LUT, you need to convert it into a hi_vpc_lut_remap structure array. The array length is 4.

    hi_vpc_lut_remap* lutRemap = (hi_vpc_lut_remap*)gain

    If gain_type is GAIN_VALUE, you need to convert it into UINT32. The array length is 5. In this case, hist_type must be MEAN_Y_VALUE.

  • gain_size

    If gain_type is GAIN_LUT, gain_size (indicating the length) of the hi_vpc_lut_remap structure array is 4.

    If gain_type is GAIN_VALUE, gain_size is 5.