---
title: hi_mpi_vpc_get_affine_lut
description: 根据输入、输出图片中的像素位置坐标点，获取仿射变换像素位置重映射表。同步接口。
url: "https://www.hiascend.com/document/detail/zh/Atlas200IDKA2DeveloperKit/23.0.RC2/Application%20Development%20Guide/aadgc/aclcppdevg_03_0989.html"
---

# hi_mpi_vpc_get_affine_lut

#### 函数功能

根据输入、输出图片中的像素位置坐标点，获取仿射变换像素位置重映射表。同步接口。


#### 函数原型

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


#### 参数说明

| 参数名 | 输入/输出 | 说明 |
| --- | --- | --- |
| point\_pair\_info | 输入 | 三对输入、输出图片中的像素点坐标信息，每对中分别包含一个输入图片像素点坐标、一个输出图片像素点坐标。 |
| interpolation | 输入 | 缩放算法。 支持如下缩放算法： 0：业界通用的Bilinear算法（与OpenCV算法的计算过程类似） 1：业界通用的Nearest neighbor 算法（与OpenCV算法的计算过程类似） |
| remap\_lut | 输入&输出 | 仿射变换像素位置重映射表信息。 在hi\_remap\_lut结构体内： lut参数作为输入时，需由用户提前申请该内存，内存大小lut\_size可调用hi\_mpi\_vpc\_get\_lut\_mem\_size接口获取。 lut参数作为输出时，在成功调用本接口后，用户可从该内存中获取仿射变换LUT表信息。 |


#### 返回值说明

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