DeepStream 5.1, Nano Jetson Dev Kit
I’m trying to draw a “fence” to the nv_osd using python. Let’s consider I’m at this line:
I’m now going to add this code after Line 116 (after the print):
pv_nosd_rect_params = display_meta.rect_params pv_nosd_rect_params.left = 200 pv_nosd_rect_params.top = 0 pv_nosd_rect_params.width = 100 pv_nosd_rect_params.height = 480 pv_nosd_rect_params.border_width = 2 pv_nosd_rect_params.border_color.red = 0.0 pv_nosd_rect_params.border_color.green = 1.0 pv_nosd_rect_params.border_color.blue = 0.0 pv_nosd_rect_params.border_color.alpha = 1.0 pv_nosd_rect_params.has_bg_color = 1 pv_nosd_rect_params.bg_color.red = 0.0 pv_nosd_rect_params.bg_color.green = 0.0 pv_nosd_rect_params.bg_color.blue = 1.0 pv_nosd_rect_params.bg_color.alpha = 0.5 display_meta.num_rects = 1
The display shown is like so, which is good, except that the background color of the box is green (alpha change is recognised):
Things are getting completely weird, if I change the
width parameter to 10:
Now it seems, that the background is not recognising the width of the bounding box and applies an (estimated) width of 20 px in addition to the wrong color.