ResizedImageInfo
Function
This data structure is added to record the resizing mode during model pre-processing in an image task, which is used for coordinate restoration during model post-processing.
Structure Definition
class ResizedImageInfo {
public:
ResizedImageInfo() {}
ResizedImageInfo(uint32_t wResize, uint32_t hResize, uint32_t wOriginal, uint32_t hOriginal, ResizeType rType,
float kARScaling) : widthResize(wResize), heightResize(hResize), widthOriginal(wOriginal),
heightOriginal(hOriginal), resizeType(rType), keepAspectRatioScaling(kARScaling) {}
uint32_t widthResize = 0;
uint32_t heightResize = 0;
uint32_t widthOriginal = 0;
uint32_t heightOriginal = 0;
ResizeType resizeType = RESIZER_STRETCHING;
float keepAspectRatioScaling = 0;
};
Parameter Description
Parameter |
Description |
|---|---|
widthResize |
Width of the resized image, that is, the input width of the model |
heightResize |
Height of the resized image, that is, the input height of the model |
widthOriginal |
Image width prior to resizing |
heightOriginal |
Image height prior to resizing |
resizeType |
Image resizing mode (enumeration)
|
keepAspectRatioScaling |
Proportional resizing ratio. This parameter is valid only for proportional resizing. |
Parent topic: Data Structure