mxpi_imageresize
Function |
Resizes the decoded YUV and RGB images with the specified width and height. YUV_420 supports both 4 KB and 8 KB images. Other types of YUV images, such as YUV422 and YUV444, support only 4 KB images. The RGB format can be RGB888 or BGR888. |
|---|---|
Synchronous/Asynchronous (Status) |
Asynchronous |
Constraints |
|
Plugin Base Class (Factory) |
mxpi_imageresize |
Input/Output |
Input: buffer (data type: MxpiBuffer) and metadata (data type: MxpiVisionList) Output: buffer (data type: MxpiBuffer) and metadata (data type: MxpiVisionList) |
Port Format (Caps) |
Static input: {"image/yuv","metadata/object","image/rgb"} Static output: {"image/yuv","image/rgb"} |
Property |
For details, see Table 1. |
Property Name |
Description |
Mandatory or Not |
Modifiable or Not |
|---|---|---|---|
deviceId |
Ascend device ID, which is specified by the deviceId property in the stream_config field. You do not need to set the ID. |
No |
Yes |
removeParentData |
Whether to remove the original buffer data. The default value is no. |
Yes |
Yes |
parentName |
Index of the input data (generally the name of the upstream element). The function is the same as that of dataSource. dataSource is recommended because parentName will be deleted in later versions. |
Do not use it. |
Yes |
dataSource |
Index of the input data (generally the name of the upstream element). The default value is the key value of the output port of the upstream plugin. |
Recommended |
Yes |
resizeHeight |
|
No |
Yes |
resizeWidth |
|
No |
Yes |
maxDimension |
Maximum length of the resized image in Fast R-CNN resizing mode |
No |
Yes |
minDimension |
Minimum length of the resized image in Fast R-CNN resizing mode |
No |
Yes |
resizeType |
Resizing mode:
|
No |
Yes |
scaleValue |
Resizer_KeepAspectRatio_Long: resizes the maximum edge to a specified value. Resizer_KeepAspectRatio_Short: resizes the minimum edge to a specified value. |
Yes |
Yes |
RGBValue |
Padding color value. Enter the R, G, and B values in sequence. By default, the padding color is not set, and the default background color of DVPP is used. Only Ascend is supported. |
No |
Yes |
interpolation |
Interpolation mode of the resize plugin. The default value is 0. The following algorithms are supported by the Atlas 200/300/500 inference product:
The following algorithms are supported by the Atlas inference products:
|
No |
Yes |
cvProcessor |
Processing mode. For details about the differences, see Before You Start.
|
No |
Yes |
paddingType |
Padding mode:
|
No |
Yes |
paddingHeight |
Height of the padded image, which must be greater than the height of the scaled image. (This property takes effect only in OpenCV processing.) |
No |
Yes |
paddingWidth |
Width of the padded image, which must be greater than the width of the scaled image. (This property takes effect only in OpenCV processing.) |
No |
Yes |
paddingColorB |
Color blue of the padded image. The value can be a floating point number ranging from 0 to 255. Only OpenCV is supported. |
No |
Yes |
paddingColorG |
Color green of the padded image. The value can be a floating point number ranging from 0 to 255. Only OpenCV is supported. |
No |
Yes |
paddingColorR |
Color red of the padded image. The value can be a floating point number ranging from 0 to 255. Only OpenCV is supported. |
No |
Yes |