Sending the Output Results

metaDataPtr: pointer for transmitting data to the downstream plugin.

The operations are as follows:
std::shared_ptr<MxTools::MxpiObjectList> objectList =
std::static_pointer_cast<MxTools::MxpiObjectList>(metaDataPtr);
MxTools::MxpiObject* objectData = objectList->add_objectvec();
objectData->set_x0(objInfo.x0 + xOffset);
objectData->set_y0(objInfo.y0 + yOffset);
objectData->set_x1(objInfo.x1 + xOffset);
objectData->set_y1(objInfo.y1 + yOffset);

In the preceding code, objInfo is the frame coordinate calculated after post-processing, and xOffset and yOffset are the offset values of the object frame coordinate on the original image.

Post-processing is to output data to the pointer for transmitting data to the downstream plugin. For details about how to transmit data to the downstream plugin, see Sending the Output Results.