dlstreamer/pipeline-server

Is there any way to save jpg image with inferenced bounding box for record_frames sample?

lightlu opened this issue · 3 comments

The gstreamer element jpegenc save each frame to jpg image naming by frame id for samples/record_frames. Is it possible to save the image with inferenced bounding box? Thank you

(1) add gvawatermark as gvawatermark ! videoconvert ! jpegenc
(2) move " ! tee name=t ! queue" behind gvadetect

patch_pipeline_bb

@lightlu Thanks for sharing the solution.

@lightlu Note that this change to the pipeline exacerbates an existing timing issue that we hadn't noticed before. metapublish can create an mqtt message before the corresponding frame has been written so that imread() can fail causing imshow() to throw due to loading a null image. A simple workaround is to wait for the frame to be written before reading it.