acl.himpi.vpc_get_perspective_lut

c函数原型

hi_s32 hi_mpi_vpc_get_perspective_lut(hi_point_pair_info *point_pair_info, hi_u32 interpolation, hi_remap_lut *remap_lut)

Python函数

remap_lut, ret = acl.himpi.vpc_get_perspective_lut(point_pair_info, interpolation, remap_lut)

函数功能

根据输入、输出图片中的像素位置坐标点,获取透视变换像素位置重映射表。

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

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

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

输入说明

point_pair_info:dict,包含四对输入、输出图片中的像素点坐标信息字典,每对中分别包含一个输入图片像素点坐标、一个输出图片像素点坐标,具体请参见hi_point_pair_info

interpolation:int,支持如下缩放算法。
  • 0:业界通用的Bilinear算法(与OpenCV算法的计算过程类似)。
  • 1:业界通用的Nearest neighbor 算法(与OpenCV算法的计算过程类似)。

remap_lut:dict,透视变换像素位置重映射表字典,具体请参见hi_remap_lut。字典中的lut属性需由用户提前申请内存,内存大小“lut_size”属性可调用acl.himpi.vpc_get_lut_mem_size接口获取。

返回值说明

remap_lut:dict,透视变换像素位置重映射表字典。在成功调用本接口后,用户可通过lut属性中的地址获取仿射变换LUT表信息。

ret:int,错误码。