ImagePreProcessInfo
Function
Records the region of interest (ROI) during model pre-processing in an image task, which is used for coordinate restoration during model post-processing.
Structure Definition
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;
};
Parameter Description
Parameter |
Description |
|---|---|
imageWidth |
Image width |
imageHeight |
Image height |
originalWidth |
Width of the original image |
originalHeight |
Height of the original image |
xRatio |
Scaling ratio in the x direction |
xBias |
Offset in the x direction |
yRatio |
Scaling ratio in the y direction |
yBias |
Offset in the y direction |
x0Valid |
Horizontal coordinate in the upper left corner of the active region in the image |
y0Valid |
Vertical coordinate in the upper left corner of the active region in the image |
x1Valid |
Horizontal coordinate in the lower right corner of the active region in the image |
y1Valid |
Vertical coordinate in the lower right corner of the active region in the image |