How to save object to jpg file in Deepstream-test5-app

Hi everyone, in deepstream-test5-app i want to save object and put this path to payload for generate
thank
and this is old my post How to custom Json message sent to kafka server

• Hardware Platform (Jetson / GPU)
• DeepStream Version
• JetPack Version (valid for Jetson only)
• TensorRT Version
• NVIDIA GPU Driver Version (valid for GPU only)
• Issue Type( questions, new requirements, bugs)
• How to reproduce the issue ? (This is for bugs. Including which sample app is using, the configuration files content, the command line used and other details for reproducing)
• Requirement details( This is for new requirement. Including the module name-for which plugin or for which sample application, the function description)

1 Like

• Hardware Platform Jetson
• DeepStream Version 5.0
• JetPack Version 4.4.1
• TensorRT 7.1.3
• Issue Type: new requirements
• Requirement details: How to save object to image in deepstream-test5-app

sorry, i am lost. i has update information

Please refer to the sample codes deepstream-image-meta-test. The image is generated in pgie_src_pad_buffer_probe() and saved as image file in osd_sink_pad_buffer_probe().

i had refer to deepstream-image-meta-test but no image saved, this is my gstnvmsgconv.c (23.2 KB) save image code from line 478 to 512

This is a plugin, you just implemented reading image data from the user meta part. Where did you generate mage and put the image data into user meta?

Please refer to the sample codes deepstream-image-meta-test. The image is generated in pgie_src_pad_buffer_probe() and saved as image file in osd_sink_pad_buffer_probe().

1 Like

i has read funcion pgie_src_pad_buffer_probe() but i don’t now how to appy it to
gst_nvmsgconv_transform_ip(), can you help me

You can implement your own specific app, to generate image user meta in pgie_src_pad_buffer_probe() with nvinfer plugin and use your customized nvmsgconv plugin to handle the image user meta.

please suggest to me how to work with pgie_src_pad_buffer_probe() in nvinfer plugin

The better way is to use pgie_src_pad_buffer_probe() in application with nvinfer src pad.

deepstream-image-meta-test is already the sample.

so difficult with pgie_src_pad_buffer_probe() in deepstream-test5-app-main.c and gstnvmsgconv.c, So different way i can get image at gstdsexample.cpp, are you think sgtnvmsgconv.c can get image like gstdsexample

can you give me an example code for save image in deepstream-test5-app flow your way, thanks so much

@Fiona.Chen @DaneLLL, please help me

You may refer to Encoding jpeg image after OSD causes segfault

deepstream-test5 is a dynamic pipeline app, it is very hard to insert image saving into deepstream-test5 because there is limitation with nvds_obj_enc_create_context() interface.

1 Like

if get image at OSD i think so difficult to get image path for custom payload to json message broker

It is a sample. You need to find the correct place to put pgie_src_pad_buffer_probe() according to your actual pipeline.

1 Like

how about Gstdsexample can apply to Gstnvmsgconv for save image. In Gstdsexample i had save image work well.
Can i use Gstdsexample in Gstnvmsgconv like a lib ?

The dsexample can be a sample for you to modify gstnvmsgconv

1 Like