昇腾社区首页
中文
注册

vpc_get_rotation_matrix

产品支持情况

产品

是否支持

Atlas A3 训练系列产品/Atlas A3 推理系列产品

Atlas A2 训练系列产品/Atlas 800I A2 推理产品/A200I A2 Box 异构组件

Atlas 训练系列产品

x

Atlas 推理系列产品

x

Atlas 200I/500 A2 推理产品

Atlas 200/300/500 推理产品

x

功能说明

获取仿射变换需要的旋转矩阵。

函数原型

  • C函数原型
    1
    hi_s32 hi_mpi_vpc_get_rotation_matrix(hi_float_point center_point, hi_double angle, hi_double scale, hi_transform_matrix *matrix)
    
  • python函数
    1
    matrix, ret = acl.himpi.vpc_get_rotation_matrix(center_point, angle, scale)
    

参数说明

参数名

说明

center_point

dict,输入图像的旋转中心点字典,具体请参见hi_float_point

angle

float,旋转角度,正值表示逆时针旋转。

scale

float,缩放参数,“scale”参数值大于1表示放大图片,参数值小于1表示缩小图片。

返回值说明

返回值

说明

matrix

dict,仿射变换需要的变换矩阵信息字典,其中“matrix_type”参数值请参考实际输入矩阵进行配置,具体参见hi_transform_matrix

ret

int,错误码。