Skip to main content

hi_stiching_ipm_table

hi_stiching_ipm_param

说明

定义畸变矫正参数的结构体。

定义

typedef struct {
hi_u32 src_pic_width;
hi_u32 src_pic_height;
hi_u32 dest_pic_width;
hi_u32 dest_pic_height;
hi_u32 ipm_table_len;
hi_stiching_ipm_table *ipm_table_address;
} hi_stiching_ipm_param;

成员

成员名称描述
src_pic_width输入图片宽。 4张输入图片的宽保持一致。
src_pic_height输入图片高。 4张输入图片的高保持一致。
dest_pic_width输出图片宽。
dest_pic_height输出图片高。
ipm_table_len数组长度,必须为dest_pic_width * dest_pic_height
ipm_table_address畸变矫正结构体数组。 由用户提前申请内存存放数组中的数据,内存大小(单位为Byte) = sizeof(hi_stiching_ipm_table) * ipm_table_len,该内存大小可能比较大,如果直接使用C标准库中的malloc接口申请内存,会导致内存碎片化,大页个数减少,进而影响使用hi_mpi_dvpp_malloc接口申请DVPP各功能的输入/输出内存。因此推荐直接使用hi_mpi_dvpp_malloc接口申请存放ipm_table_address数组数据的内存。

父主题: VPC图像处理

hi_stiching_ipm_table

说明

定义畸变矫正表的结构体。即每个输出图片像素点,是怎么由2幅输入图片融合成的。

定义

typedef struct {
hi_u32 pic1_index;
hi_u32 pic2_index;
hi_float weight1;
hi_float weight2;
hi_float offset1_x;
hi_float offset1_y;
hi_float offset2_x;
hi_float offset2_y;
}hi_stiching_ipm_table;

成员

设置输入图片编号时,如果pic1_index、pic2_index设置为同一个编号,则表示图像融合时参考的是同一张输入图片。

设置图像融合的比重时,要求weight2 + weight1 = 1。

如果weight1、weight2都设置为0 ,无论pic1_index、pic2_index配置什么,硬件都不会进行融合。

成员名称描述
pic1_index对应输入图片1的编号,取值范围[0, 3]。
pic2_index对应输入图片2的编号,取值范围[0, 3]。
weight1图像融合时图片1的比重,取值范围[0, 1]。
weight2图像融合时图片2的比重,取值范围[0, 1]。
offset1_x图片1插值点x坐标。
offset1_y图片1插值点y坐标。
offset2_x图片2插值点x坐标。
offset2_y图片2插值点y坐标。

父主题: VPC图像处理

hi_stitching_gain_param

说明

定义增益补偿参数的结构体。

定义

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,
void *gain,
hi_u32 gain_size);
} hi_stitching_gain_param;

成员

成员名称描述
hist_type直方图统计类型。
gain_type增益补偿类型。
user_data用户自定义数据。
calulate_gain_callback回调函数指针。 gain_type选择GAIN_LUT时,必须配置回调函数指针。 回调函数内的参数说明如下:
- user_data 系统将hi_stitching_gain_param.user_data用户自定义数据赋值给回调函数内的user_data。
- hist_config 回调函数中的hist_config参数,由系统内部管理,用户可以在下发环视拼接任务之后,释放环视拼接内部资源前,通过该参数获取直方图信息。
- hist_count hi_stitching_histogram_param结构体对象的个数。 当直方图统计类型hi_stitching_histogram_type为OVERLAP_HISTOGRAM 时,hist_count固定为8;当直方图统计类型hi_stitching_histogram_type为GLOBAL_HISTOGRAM时,hist_count固定为4。
- gain 回调函数中的gain参数,需由用户转换为hi_vpc_lut_remap结构体数组,数组长度为4:
text<br> hi_vpc_lut_remap* lutRemap = (hi_vpc_lut_remap*)gain<br>
- gain_size hi_vpc_lut_remap结构体数组的长度,当前为4。

父主题: VPC图像处理

hi_stitching_histogram_type

说明

环视拼接的直方图统计类型。

定义

typedef enum &#123;
OVERLAP_HISTOGRAM = 0, // 对8个重叠区域做直方图统计
GLOBAL_HISTOGRAM, // 对4张输入图做直方图统计
&#125; hi_stitching_histogram_type;

父主题: VPC图像处理

在线提单