How to draw circles on deepstream with python bindings?

• Hardware Platform (Jetson / GPU)
Jetson Xavier NX
• DeepStream Version
DeepStream 6.0
• JetPack Version (valid for Jetson only)
• TensorRT Version

I am trying to draw centroid marker on the display from DeepStream with python bindings. I assume pyds.NvOSD_CircleParams class can be used for the purpose. However I am not sure how to use this in the program… Could anyone show me a sample code for drawing?

Similar way to getting display_meta from batch_meta as the way in, then getting circle_params from display_meta, and then you can set the circle-related parameters as defined in pyds.NvOSD_CircleParams class.

@yingliu Thank you very much. I tried with the code,

for ppl_location in ppl_locations:
    display_meta.circle_params.xc = ppl_location[0]
    display_meta.circle_params.yc = ppl_location[1]
    display_meta.circle_params.radius = 10
    display_meta.circle_params.circle_color.set(1.0, 1.0, 1.0, 1.0)

and got an error: AttributeError: “list” object has no attribute ‘xc’

I am sorry for asking this very beginner thing, but I am pleased if you point out what is wrong with my code.

You can refer the way to access text parameter from, seems you missed step 2 as below:

py_nvosd_text_params = display_meta.text_params[0]
py_nvosd_text_params.x_offset = 10

@yingliu thank you so much for your advice. I succeeded in drawing!

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