Image resizing API of the ImageProcessor class. Atlas inference product and Atlas 800I A2 inference product support asynchronous execution. The Image memory allocated using this API does not need to be managed by the user and is released internally. For details about the resizing effect, see Figure 1.
For details, see Resizing.
1
|
APP_ERROR ImageProcessor::Resize(const Image& inputImage, const Size& resize, Image& outputImage, const Interpolation interpolation, AscendStream& stream = AscendStream::DefaultStream()); |
|
Parameter |
Input/Output |
Description |
||
|---|---|---|---|---|
|
inputImage |
Input |
Image class before resizing. The Image class obtained by the Decode API and other VPC APIs can be directly used as inputs. If the user-defined Image class is used, set the original and aligned image widths and heights. |
||
|
resize |
Input |
Height and width for resizing |
||
|
interpolation |
Input |
Resizing mode of an input image:
The following algorithms are supported by the
The following algorithms are supported by the
Atlas inference product and Atlas 800I A2 inference product support the following algorithms (defaulted to 0 during synchronous execution):
|
||
|
outputImage |
Output |
Image class after resizing |
||
|
stream |
Input |
AscendStream type. The default value is AscendStream::DefaultStream(). When the parameter value is the default value, the API calling is a synchronous operation. In other cases, the API calling is an asynchronous operation. |
|
Data Structure |
Description |
|---|---|
|
APP_ERROR |
For details about the returned error codes, see APP_ERROR Description. |