mxpi_imagedecoder
Function |
Decodes images. Currently, only the JPG, JPEG, and BMP formats are supported. NOTE:
Restrictions on the JPG and JPEG input image format:
|
|---|---|
Synchronous/Asynchronous (Status) |
Asynchronous |
Constraints |
|
Plugin Base Class (Factory) |
mxpi_imagedecoder |
Input/Output |
Input: buffer (data type: MxpiBuffer) Output: buffer (data type: MxpiBuffer) and metadata (data type: MxpiVisionList and MxpiObjectList) |
Port Format (Caps) |
Static input: {"image/jpeg"} Dynamic output: {"image/yuv","metadata/object","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 |
imageFormat |
Format of the image to be decoded. The default format is JPG. The Ascend mode supports JPEG, JPG, and BMP, while the OpenCV mode supports JPG, JPEG, BMP, and other formats. |
Yes |
Yes |
cvProcessor |
Processing mode. For details about the differences, see Before You Start.
|
No |
Yes |
outputDataFormat |
When the OpenCV mode is used and the input image format is bmp, the output image data type can only be BGR or RGB.
|
No |
Yes |
dataType |
Type of the decoded data. The default value is uint8. It can also be set to float32, which is valid for the OpenCV processing method. |
No |
Yes |
formatAdaptation |
CSC function, which decodes images into BGR888 format. The value is a string. The default value is off. Set this parameter to on when enabling the CSC function. (Currently, this function is supported only on the Atlas inference products. The resolution of the input image must range from 32 x 32 to 4096 x 4096.) |
No |
Yes |