Skip to main content

hi_point_pair_info

hi_workspace_func

说明

定义需申请临时缓存的功能枚举。

定义

REMAP = 0,
AFFINE = 1

父主题: 图像处理

hi_remap_lut

说明

定义像素位置重映射表信息。

定义

hi_remap_lut = {"src_pic_width": src_pic_width,
"src_pic_height": src_pic_height,
"dest_pic_width": dest_pic_width,
"dest_pic_height": dest_pic_height,
"lut": lut,
"lut_size": lut_size,
"reserved": reserved}

成员

Atlas 200/500 A2推理产品,输入、输出图片分辨率的取值范围为:10*6~4096*8192。

成员名称描述
src_pic_width整型,输入图片宽度。
src_pic_height整型,输入图片高度。
dest_pic_width整型,输出图片宽度。
dest_pic_height整型,输出图片高度。
lut_size整型,像素位置重映射表的内存大小,单位Byte。 可调用acl.himpi.vpc_get_lut_mem_size接口获取内存大小。
lut整型,像素位置重映射表的内存地址。 Atlas 200/500 A2推理产品,该内存需由用户提前调用acl.himpi.dvpp_malloc接口申请。
reserved整型,预留参数,为保证后续版本兼容性,请务必使用memset配置方式进行清零初始化,在代码中必须避免显式对reserved字段进行访问。

父主题: 图像处理

hi_point_pair_info

说明

输入、输出图片中的像素点坐标信息。

定义

hi_point_pair_info = {"src_point": hi_point[4],
"src_point_count": src_point_count,
"dest_point": hi_point[4],
"dest_point_count": dest_point_count}

成员

成员名称描述
src_point字典,输入图片像素点坐标。
src_point_count整型,输入图片像素点坐标数量。
dest_point字典,输出图片像素点坐标。
dest_point_count整型,输出图片像素点坐标数量。

父主题: 图像处理

hi_float_point

说明

坐标信息。

定义

hi_float_point = {"x": x,
"y": y}

成员

成员名称描述
x浮点型,像素点x坐标。
y浮点型,像素点y坐标。

父主题: 图像处理

hi_warp_transform_param

说明

Remap变换参数。

定义

hi_warp_transform_param = {"src": hi_vpc_pic_info,
"dst": hi_vpc_pic_info,
"transform_config": hi_transform_config}

成员

成员名称描述
src字典,输入图片信息
dst字典,输出图片信息。
transform_config字典,仿射/透视/Remap变换配置信息。

父主题: 图像处理

hi_transform_config

说明

定义仿射/透视/Remap变换配置信息。

定义

hi_transform_config = {"interpolation": interpolation,
"border_type": hi_vpc_bord_type,
"scalar_value": hi_vpc_scalar}

成员

成员名称描述
interpolation整型,支持如下缩放算法: Atlas 200/500 A2推理产品支持如下缩放算法:
- 0:业界通用的Bilinear算法
- 1:业界通用的Nearest neighbor 算法
border_type整型,边界填充的类型。 Atlas 200/500 A2推理产品支持如下取值:
- 0:寄存器固定值
- 1:边界复制模式
scalar_value字典,图像填充的像素值,只支持3通道。 Atlas 200/500 A2推理产品,如果输入图片格式为YUV400,则val[0]存放Y分量,val[1]、val[2]、val[3预留,需初始化为0。

父主题: 图像处理

在线提单