Plotting rectangle on image in Deepstream

I am facing this issue for more than 3-4 months and still don’t have way to solve the issue.
No engineer from Deepstream group can give me proper suggestion.

I have a few posts regarding this issue.
Still issue is not solved yet.

Basically I like to plot rectangle on image display.
For example, I have illegal parking detection. Vehicle detection gie gives me bounding box. Using those boxes, I have one more layer of illegal parking detection. The illegal parking detection is implemented in gst-dsexample plugin.
After detection, I need to highlight the vehicle. My requirement is very meaningful.

But so far no engineer from Deepstream can pin point me what api to use.

In the attached image, green boxes are vehicle detection gie draws boxes.
After illegal parking detection in gst-dsexample, I need to highlight, this car is illegally parked car (like yellow box drawn manually).
How can I draw box in deepstream?

I used Opencv to draw box, but Opencv has moemory leak in Deepstream to draw boxes.

Suppose DS samples can draw BB. If you want to change BB, can you check display_meta->rect_params? Please refer below source code.


Yes thanks I can change color like the following.

for (l_obj = frame_meta->obj_meta_list; l_obj != NULL; l_obj = l_obj->next) {
            obj_meta = (NvDsObjectMeta *) (l_obj->data);
            if (obj_meta->class_id == PGIE_CLASS_ID_VEHICLE) {
                obj_meta-> = 0.0;
                obj_meta-> = 1.0;
                obj_meta-> = 0.0;
                obj_meta->rect_params.border_color.alpha = 1.0;
                obj_meta->rect_params.border_width = 15;
            if (obj_meta->class_id == PGIE_CLASS_ID_PERSON) {
1 Like

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