---
title: hi_mpi_vpc_get_rotation_matrix
description: "获取仿射变换需要的旋转矩阵。"
url: https://www.hiascend.com/document/detail/zh/Atlas200IDKA2DeveloperKit/latest/Application%20Development%20Guide/aadgc/aclcppdevg_03_1005.html
sourcePath: /source/zh/Atlas200IDKA2DeveloperKit/23.0.RC2/Application Development Guide/aadgc/aclcppdevg_03_1005.html
indexId: 40a41a88969bff1b96d4ec320ab21553afa897c61d27ea0a68cb76c3af7ecd86105
---
# hi_mpi_vpc_get_rotation_matrix

#### 函数功能

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


#### 函数原型

hi_s32 hi_mpi_vpc_get_rotation_matrix(hi_float_point center_point, hi_double angle, hi_double scale, hi_transform_matrix *matrix)


#### 参数说明

| 参数名 | 输入/输出 | 说明 |
| --- | --- | --- |
| center\_point | 输入 | 输入图像的旋转中心点。 |
| angle | 输入 | 旋转角度，正值表示逆时针旋转。 |
| scale | 输入 | 缩放参数。 scale参数值大于1表示放大图片，参数值小于1表示缩小图片。 |
| matrix | 输出 | 仿射变换的旋转矩阵。 |


#### 返回值说明

- 0：成功
- 非0：失败，  VPC图像处理返回码
