跳到主要内容

hi_vpc_resize_info

hi_vpc_pic_info

说明

图像信息字典,用来描述VPC功能输入和输出图片信息。

定义

hi_vpc_pic_info = {"picture_address": picture_address,
"picture_buffer_size": picture_buffer_size,
"picture_width": picture_width,
"picture_height": picture_height,
"picture_width_stride": picture_width_stride,
"picture_height_stride": picture_height_stride,
"picture_format": hi_pixel_format}

成员

成员名称描述
picture_address整型,存放图片数据的Device地址。
picture_buffer_size整型,存放图片数据的缓冲区大小。
picture_width整型,图片真实宽。
picture_height整型,图片真实高。
picture_width_stride整型,图片宽Stride。
picture_height_stride整型,图片高Stride。
picture_format整型,目标图片的格式。

父主题: 图像处理

hi_vpc_crop_region

说明

VPC抠图功能需要的参数。

定义

hi_vpc_crop_region = {"top_offset": top_offset,
"left_offset": left_offset,
"crop_width": crop_width,
"crop_height": crop_height}

成员

成员名称描述
top_offset整型,上偏移。
left_offset整型,左偏移。
crop_width整型,抠图区域宽。
crop_height整型,抠图区域高。

父主题: 图像处理

hi_vpc_resize_info

说明

VPC缩放功能需要的参数。

定义

hi_vpc_resize_info = {"resize_width": resize_width,
"resize_height": resize_height,
"interpolation": interpolation}

成员

成员名称描述
resize_width整型,缩放之后的宽。
resize_height整型,缩放之后的高。
interpolation整型,缩放算法。 Atlas 200/500 A2推理产品,支持如下缩放算法:
- 0:业界通用的Bilinear算法(与OpenCV-3.4.2版本算法的计算结果相同)
- 1:业界通用的Nearest neighbor 算法(与OpenCV-3.4.2版本算法的计算结果相同)

父主题: 图像处理

hi_vpc_crop_region_info

说明

VPC抠图功能需要的参数。

定义

hi_vpc_crop_region_info = {"dest_pic_info": hi_vpc_pic_info,
"crop_region": hi_vpc_crop_region}

成员

成员名称描述
dest_pic_info字典,抠图目标图片信息。
crop_region字典,抠图区域信息。

父主题: 图像处理

hi_vpc_crop_resize_region

说明

VPC抠图并缩放功能需要的参数。

定义

hi_vpc_crop_resize_region = {"dest_pic_info": hi_vpc_pic_info,
"crop_region": hi_vpc_crop_region,
"resize_info": hi_vpc_resize_info}

成员

成员名称描述
dest_pic_info字典,目标图片信息。
crop_region字典,抠图区域信息。
resize_info字典,图片缩放信息。

注意事项

处理图片的数量不能大于256个。缩放宽高必须与目标图片宽高一致。

父主题: 图像处理

在线提单