How to display cropped images on screen (nveglglessink or nvoverlaysink)?

Please provide complete information as applicable to your setup.

• Hardware Platform (Jetson / GPU): GeForce RTX 3090
• DeepStream Version: 5.1
• TensorRT Version: 7.2
• NVIDIA GPU Driver Version (valid for GPU only): 460.80
• Issue Type( questions, new requirements, bugs): question

I want to display cropped objects with metadata attached by multiple nvinfers (detector and a series of classifiers) on the screen. An illustration of what I want to display is:

How do I go about doing it?

I have looked at 2 samples: deepstream-image-meta-test and deepstream-opencv-test

As far as I know, there are 2 ways to crop image of detected objects:

  • deepstream-image-meta-test uses the “nvds_obj_enc_start_encode” API detailed in the “nvds_obj_encode.h” header file and I know that cropped images are attached as user-metadata (NVDS_CROP_IMAGE_META).

  • deepstream-opencv-test uses dsexample plugin, this plugin can be modified to do the cropping as answered here, it was mentioned that “For watching the cropped images, it may not be done in dsexample but in sink(nveglglessink or nvoverlaysink). If your object is fixed 320x240, it should be possible to initialize the sink in 320x240 and show only the object.”

My understanding is, in order to do what I want, I have to:

  1. crop image of detected objects
  2. attach cropped images as user-metadata
  3. what next?

Task 1 and 2 can be done by using nvds_obj_enc_start_encode or modifying dsexample, but I’m not sure what to do after that in order to display cropped images to the screen?

Current plugins can not display the cropped object images in the way you want. We do not have such compositor.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.