mxpi_opencvcentercrop
Function |
Crops the images in the image center. |
|---|---|
Synchronous/Asynchronous (Status) |
Asynchronous |
Constraints |
Currently, only the input data types UINT8 and FLOAT32 and the input image formats RGB888 and BGR888 are supported. |
Plugin Base Class (Factory) |
mxpi_opencvcentercrop |
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) |
Input: {"metadata/object"},{"image/yuv","image/rgb"} 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 |
dataSource |
Index of the input image data. The default value is the key of the metadata mounted to the output port of the upstream plugin. |
No |
Yes |
cropHeight |
Height of the cropped image. The default value is 0, and the value range is [0, 819200]. |
Yes |
Yes |
cropWidth |
Width of the cropped image. The default value is 0, and the value range is [0, 819200]. |
Yes |
Yes |
Pipeline sample:
"mxpi_opencvcentercrop0": {
"props": {
"cropHeight":"416",
"cropWidth":"416"
},
"factory": "mxpi_opencvcentercrop",
"next": "mxpi_modelinfer0"
},