---
title: acl.himpi.vpc_get_rotation_matrix
description: "| c函数原型 | hi\\_s32 hi\\_mpi\\_vpc\\_get\\_rotation\\_matrix(hi\\_float\\_point center\\_point, hi\\_double angle, hi\\_double scale, hi\\_transform\\_matrix \\*matrix) |"
url: "https://www.hiascend.com/document/detail/zh/Atlas200IDKA2DeveloperKit/23.0.RC2/Application%20Development%20Guide/aadgp/aclpythondevg_01_0454.html"
---

# 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图像处理返回码。 |
