Before using the mxpi_opencvosd plugin, you need to use the OSD-related model files. Execute the operators/opencvosd/generate_osd_om.sh script in the installation directory of Vision SDK to generate the required model files. Multiple mxpi_opencvosd instances can be created for a single pipeline.
|
Function |
Calls basic OSD functions to draw basic units, such as frames, words, lines, and circles, on images. |
|---|---|
|
Synchronous/Asynchronous (Status) |
Synchronous |
|
Constraints |
|
|
Plugin Base Class (Factory) |
mxpi_opencvosd |
|
Input/Output |
|
|
Port Format (Caps) |
|
|
Property |
For details, see Table 1. |
|
Property Name |
Description |
Mandatory or Not |
Modifiable or Not |
|---|---|---|---|
|
dataSourceImage |
Buffer index name of input port 0. The default value is the key of the metadata corresponding to the output port 0 of the upstream plugin. |
No |
Yes |
|
dataSourceOsd |
Buffer index name of input port 1. The default value is the key of the metadata corresponding to the output port 1 of the upstream plugin. |
No |
Yes |
Call the basic OSD function buffer (MxpiOsdInstancesList) to draw basic units, such as frames, words, lines, and circles, on the input image (MxpiVisionList) and output the buffer to the downstream plugin.

Pipeline sample:
"mxpi_opencvosd0":{
"props":{
"dataSourceImage":"mxpi_channelimagesstitcher0_0",
"dataSourceOsd":"mxpi_channelosdcoordsconverter0"
},
"factory":"mxpi_opencvosd",
"next":"queue10"
},