---
title: ImagePreProcessInfo
description: "用于记录图像类任务中模型前处理中的感兴趣（region of interest）区域，提供给模型后处理的坐标还原使用。"
url: https://www.hiascend.com/document/detail/zh/Atlas200IDKA2DeveloperKit/latest/Application%20Development%20Guide/msadg/mxvisionug_0198.html
sourcePath: /source/zh/Atlas200IDKA2DeveloperKit/23.0.RC2/Application Development Guide/msadg/mxvisionug_0198.html
indexId: cc6b320806d45045a5204c6dc053c7af264c8fbc26d8a4391426a7647319a86d102
---
# ImagePreProcessInfo

#### 功能

用于记录图像类任务中模型前处理中的感兴趣（region of interest）区域，提供给模型后处理的坐标还原使用。


#### 结构定义

```
class ImagePreProcessInfo {
public:
// image
uint32_t imageWidth = 0;           // memoryWidth
uint32_t imageHeight = 0;          // memoryHeight
uint32_t originalWidth = 0;           // originalWidth
uint32_t originalHeight = 0;          // originalHeight
// mapping parameters
float xRatio = 1.0;
float xBias = 0.0;
float yRatio = 1.0;
float yBias = 0.0;
// valid region
float x0Valid = 0.0;
float y0Valid = 0.0;
float x1Valid = 0.0;
float y1Valid = 0.0;
};
```


#### 参数说明

| 参数名 | 说明 |
| --- | --- |
| imageWidth | 图像宽。 |
| imageHeight | 图像高。 |
| originalWidth | 原图宽。 |
| originalHeight | 原图高。 |
| xRatio | x方向伸缩比。 |
| xBias | x方向偏置。 |
| yRatio | y方向伸缩比。 |
| yBias | y方向偏置。 |
| x0Valid | 图像中有效区域的左上角横坐标。 |
| y0Valid | 图像中有效区域的左上角纵坐标。 |
| x1Valid | 图像中有效区域的右下角横坐标。 |
| y1Valid | 图像中有效区域的右下角纵坐标。 |
