Modifying bbox using RectParams

Based on test5, I’m trying to modify the NvOSD_RectParams in NvDsObjectMeta while OSD is running in CPU mode but unable to. Any help on what is wrong?

obj_meta = (NvDsObjectMeta *)(l_obj->data);

NvOSD_RectParams *rect_params = &(obj_meta->rect_params);
rect_params->has_bg_color = 1;
rect_params->bg_color.red = 0.0;
rect_params->bg_color.green = 0.0;
rect_params->bg_color.blue = 0.0;
rect_params->bg_color.alpha = 1.0;
[osd]
enable				= 1
border-width		= 1
text-size			= 15
text-color			= 1;1;1;1;
text-bg-color		= 0.3;0.3;0.3;1
font				= Arial
show-clock			= 0
clock-x-offset		= 800
clock-y-offset		= 820
clock-text-size		= 12
clock-color			= 1;0;0;0
process-mode		= 0
display-text        = 1
display-bbox        = 1

Hi,
Reproed your issue, and checking internally, thanks for your patience.
and please provide below info:

• Hardware Platform (Jetson / GPU)
• DeepStream Version
• JetPack Version (valid for Jetson only)
• TensorRT Version
• NVIDIA GPU Driver Version (valid for GPU only)

Hardware: Jetson Xavier NX
Deepstream: 5.0.1
JetPack: R32, Revision 4.4

@Amycao any idea when a fix will be available?

HI,
Please add this line in your code,
rect_params->border_width = 0;
solid rectangle color can be changed.
We’ll document the same for next release so that there’s no confusion.

1 Like