I am using deepstream_app.c and added a probe at analytics_done_buf_probe to save images.
Currently, I can save the frame image, but I need to save the image with bounding boxes drawn on it.
Please suggest the simplest way to draw and save bounding boxes on the image.
How to Reproduce the Issue:
Use the DeepStream sample application (deepstream-app).
Modify deepstream_app.c to add a probe at analytics_done_buf_probe.
Save images from the probe.
Need help on how to include bounding boxes while saving the image.
Expected Result:
Saved images should include bounding boxes for all detected objects.
I think if your probe is after the OSD and drawing is enabled for OSD then you should have the images with bboxes drawn already. Can try to put it at the srcpad of nvdsosd and see
I think this reply is the correct answer. For deepstream-app, consider modifying all_bbox_generated_cb in deepstream_app.c, refer to this code snippet.
You may need to add nvstreamdemux in the configuration file. For deepstream, all streams will be batched for inference. If you need to use nvstreamdemux to split the batch into streams
If there is no nvtracker in the pipeline,obj_meta->object_id should be UNTRACKED_OBJECT_ID (0xFFFFFFFFFFFFFFFF), not 0.
Please refer to the following function in deepstream_app.c calling process
/**
* Probe function to get results after all inferences(Primary + Secondary)
* are done. This will be just before OSD or sink (in case OSD is disabled).
*/
static GstPadProbeReturn
gie_processing_done_buf_prob (GstPad * pad, GstPadProbeInfo * info,
gpointer u_data)
{
GstBuffer *buf = (GstBuffer *) info->data;
NvDsInstanceBin *bin = (NvDsInstanceBin *) u_data;
guint index = bin->index;
AppCtx *appCtx = bin->appCtx;
if (gst_buffer_is_writable (buf))
process_buffer (buf, appCtx, index);
return GST_PAD_PROBE_OK;
}
There is no update from you for a period, assuming this is not an issue anymore. Hence we are closing this topic. If need further support, please open a new one. Thanks.