acl.himpi.vpc_warp_affine

c函数原型

hi_s32 hi_mpi_vpc_warp_affine(hi_vpc_chn chn, hi_transform_matrix *matrix, hi_warp_transform_param *transform_param, hi_u32 *task_id, hi_s32 milli_sec)

Python函数

task_id, ret = acl.himpi.vpc_warp_affine(chn, matrix, transform_param, milli_sec)

函数功能

对输入图片做仿射变换。

Atlas 200/300/500 推理产品,不支持该接口。

Atlas 训练系列产品,不支持该接口。

Atlas 推理系列产品,不支持该接口。

输入说明

chn:int,图片处理通道号。
  • Atlas A2训练系列产品/Atlas 800I A2推理产品,该参数的取值范围:[0, 256),通道总数最多256。
  • Atlas 200I/500 A2推理产品,该参数的取值范围:[0, 128),通道总数最多128。

matrix:dict,仿射变换需要的变换矩阵信息字典,具体参见hi_transform_matrix。使用acl.himpi.vpc_get_affine_transform或者acl.himpi.vpc_get_rotation_matrix接口获取的仿射变换矩阵信息字典。

transform_param:dict,仿射变换参数,在hi_warp_transform_param字典内配置输入、输出图片信息,相关约束请参见约束说明

milli_sec:int,超时时间配置,单位是毫秒,取值范围如下。
  • “-1”:阻塞方式。
  • “0”:非阻塞方式。
  • >0:超时方式,配置具体的超时时间。超时时间受操作系统影响,一般偏差在操作系统的一个时间片内,例如,操作系统的一个时间片为4ms,用户设置的milli_sec参数值为1,则实际的超时时间在1ms到5ms范围内。在CPU负载高场景下,超时时间仍可能存在波动。

返回值说明

ret:int,错误码。

task_id:任务分配的ID,用来区分任务。

约束说明