How to add custom data in test5

• DeepStream Version: 5.1
Hi,
I use deepstream-test5 nvdsanalytic roi areas. I can get the num of objects displayed on every roi areas.
Now, I would like to add ‘time-counting’ message for every roi area, which counting time when threr is object in roi areas. And I also want this message displayed on every areas.

I want to know how to reach that ? could you give me some guide?

Hey customer, we will check internally.

Refer to ds test 1 application and fill in the information - refer function “osd_sink_pad_buffer_probe”. Instead of inserting this probe on sink pad of OSD, user needs to add it on sink pad of Tiler

“tiler_src_pad_buffer_probe” and “osd_sink_pad_buffer_probe” fill information on video stream, not on roi area.
I want to know where test5 fill information on each roi area

Did this still be an issue?

which counting time when threr is object in roi areas.

What do you mean counting time? overlay timestamps when there is object in roi areas?

I figured it out by writting code to parse analytic config file and analyze everything. But I meet another problem, here:

You can change line color by struct _NvOSD_LineParams field NvOSD_ColorParams line_color

https://docs.nvidia.com/metropolis/deepstream/sdk-api/OSD/Data_Structures_2/_NvOSD_LineParams.html
and refer to test1 sample function osd_sink_pad_buffer_probe for how to use NvOSD_TextParams

hi amycao, thanks for your reply. But I do not think these method can handle the analytics rois. Using struct _NvOSD_LineParams in “bbox_generated_probe_after_analytics()” is means to redrow the anlytic rois lines. these lines cover the original lines generated by analytics code (which is not opened).

I thought you rewrote analytic plugin, that’s why i suggest above.
lines and text from analytic plugin will fill to frame meta data NvDsDisplayMeta, so you can add probe on osd sink pad to iterate through each frame meta data, to modify the lines and text as you want.

acctully, I don’t know how to write analytic plugin, I had no idea about that. I asked in forum, but didn’t get proper answers.
so, I just wrote code to parse config file, create new structs to save rois’ information, and add these struct to struct AppCtx. In this way, I get rois coordinate at "bbox_generated_probe_after_analytics()”(test5).
Obviously, this is not a good way, can you show me how to use analytic plugin to do that ?especially about changing line colors and texts ?

I create a new topic, you may answer here:

If your main target is to change line colors and texts you can refer above comment 12#.