Skip to main content

acl.himpi.vpc_get_lut_mem_size

acl.himpi.vpc_get_affine_lut

c函数原型hi_s32 hi_mpi_vpc_get_affine_lut(hi_point_pair_info *point_pair_info, hi_u32 interpolation, hi_remap_lut *remap_lut)
Python函数remap_lut, ret = acl.himpi.vpc_get_affine_lut(point_pair_info, interpolation, remap_lut)
函数功能根据输入、输出图片中的像素位置坐标点,获取仿射变换像素位置重映射表。同步接口。
输入说明- point_pair_info:dict,包含三对输入、输出图片中的像素点坐标信息的字典,每对中分别包含一个输入图片像素点坐标、一个输出图片像素点坐标。
- **interpolation:**int,缩放算法。支持如下缩放算法:
- 0:业界通用的Bilinear算法(与OpenCV算法的计算过程类似)。
- 1:业界通用的Nearest neighbor 算法(与OpenCV算法的计算过程类似)。
- **remap_lut:**dict,仿射变换像素位置重映射表信息字典。字典中的lut属性需由用户提前申请内存,内存大小“lut_size”属性可调用acl.himpi.vpc_get_lut_mem_size接口获取。
返回值说明- remap_lut:dict,仿射变换像素位置重映射表信息字典。在成功调用本接口后,用户可通过lut属性中的地址获取仿射变换LUT表信息。
- ret:int,错误码。
- 返回0表示成功。
- 返回非0表示失败,参见VPC图像处理返回码

父主题: VPC图像处理接口

acl.himpi.vpc_get_affine_transform

c函数原型**hi_s32 hi_mpi_vpc_get_affine_transform(**hi_point_pair_info *point_pair_info, hi_transform_matrix *matrix)
Python函数matrix**, ret = acl.himpi.vpc_get_affine_transform(point_pair_info)**
函数功能获取仿射变换需要的变换矩阵。
输入说明point_pair_info:dict,包含三对输入、输出图片中的像素点坐标信息的字典,每对中分别包含一个输入图片像素点坐标、一个输出图片像素点坐标。
返回值说明matrix:dict,仿射变换需要的变换矩阵信息字典,其中“matrix_type”参数值请参考实际输入矩阵进行配置,具体参见hi_transform_matrixret:int,错误码。
- 返回0表示成功。
- 返回非0表示失败,参见VPC图像处理返回码

父主题: VPC图像处理接口

acl.himpi.vpc_get_lut_mem_size

c函数原型hi_s32 **hi_mpi_vpc_get_lut_mem_size(**hi_u32 width, hi_u32 height, hi_u32 *lut_size)
Python函数lut_size**, ret = acl.himpi.vpc_get_lut_mem_size(width, height)**
函数功能根据输出图片宽高信息获取像素位置重映射表所需的内存大小。同步接口。
输入说明- width:int,输出图像宽度。
- height:int,输出图像高度。
返回值说明- lut_size:int,像素位置重映射表的内存大小,单位Byte。
- ret:int,错误码。
- 返回0表示成功。
- 返回非0表示失败,参见VPC图像处理返回码
约束说明调用本接口时,width * height的取值范围为:10*6~4096*8192。

父主题: VPC图像处理接口

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**)**
函数功能根据输入、输出图片中的像素位置坐标点,获取透视变换像素位置重映射表。同步接口。
输入说明- point_pair_info:dict,包含四对输入、输出图片中的像素点坐标信息字典,每对中分别包含一个输入图片像素点坐标、一个输出图片像素点坐标。
- 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,错误码。
- 返回0表示成功。
- 返回非0表示失败,参见VPC图像处理返回码

父主题: VPC图像处理接口

acl.himpi.vpc_get_remap_lut

c函数原型hi_s32 hi_mpi_vpc_get_remap_lut(hi_map_param *map_param, hi_remap_lut *remap_lut)
Python函数remap_lut, ret =acl.himpi.vpc_get_remap_lut(map_param, remap_lut**)**
函数功能根据用户输入的Remap表(例如仿射、透视、鱼眼等),获取系统使用的像素位置重映射表。同步接口。
输入说明- map_param:dict,用户原始map表信息字典。请参见hi_map_param
- remap_lut:dict,透视变换像素位置重映射表字典,具体请参见hi_remap_lut。字典中的lut属性需由用户提前申请内存,内存大小“lut_size”属性可调用acl.himpi.vpc_get_lut_mem_size接口获取。
返回值说明- remap_lut:dict,透视变换像素位置重映射表字典。在成功调用本接口后,用户可通过lut属性中的地址获取仿射变换LUT表信息。
- ret:int,错误码。
- 返回0表示成功。
- 返回非0表示失败,参见VPC图像处理返回码

父主题: VPC图像处理接口

acl.himpi.vpc_get_rotation_matrix

c函数原型**hi_s32 hi_mpi_vpc_get_rotation_matrix(**hi_float_point center_point, hi_double angle, hi_double scale, hi_transform_matrix *matrix)
Python函数matrix, ret = acl.himpi.vpc_get_rotation_matrix(center_point, angle, scale**)**
函数功能获取仿射变换需要的旋转矩阵。
输入说明- center_point:dict,输入图像的旋转中心点字典。
- angle:float,旋转角度,正值表示逆时针旋转。
- scale:float,缩放参数,“scale”参数值大于1表示放大图片,参数值小于1表示缩小图片。
返回值说明- matrix:dict,仿射变换需要的变换矩阵信息字典,其中“matrix_type”参数值请参考实际输入矩阵进行配置,具体参见hi_transform_matrix
- ret:int,错误码。
- 返回0表示成功。
- 返回非0表示失败,参见VPC图像处理返回码

父主题: VPC图像处理接口

在线提单