Can not change background color of rect_params on Jetson Xavier Platform

• Hardware Platform Jetson Xavier
• DeepStream Version 5.0 Python bindings

Editing the deepstream-test1-app python, I want to change the background color to yellow:

while l_obj is not None:
            try:
                # Casting l_obj.data to pyds.NvDsObjectMeta
                #obj_meta=pyds.glist_get_nvds_object_meta(l_obj.data)
                obj_meta=pyds.NvDsObjectMeta.cast(l_obj.data)
            except StopIteration:
                break
            obj_counter[obj_meta.class_id] += 1
            obj_meta.rect_params.has_bg_color = 1
            obj_meta.rect_params.bg_color.set(1.0, 1.0, 0.0, 0.4)
            obj_meta.rect_params.border_color.set(1.0, 1.0, 0.0, 1.0)

            try: 
                l_obj=l_obj.next
            except StopIteration:
                break

but the result is

It’s seem the bg_color is always green even I change the any value of bg_color.
I tested with the same codes above on dGPU (1050). It’s work.
Bests,

Hi,
It looks specific to Jetson platforms. We will try to reproduce it.

hi,
We can reproduce it on Xavier/r32.4.2. Will investigate and update.

1 Like

Hi,
This will be fixed in next release.

Thank you, looking foward for next release.

Any update? When there will be the release with the fix?

Hi federico.frontali,

We will have the next in coming weeks, please wait for our announcement.

I have updated to DS5.0GA and I still cannot change the background color - no matter what settings its always green! Changing the border colors work fine.

I have just noticed that in 5.0GA you have made the OSD source available.

If I specifically override the default and set the process-mode for the OSD element to CPU then the background colors work.

If I leave the default, which is VIC for tegra - the background colours are always green regardless of what RGBA values are provided.

There is also a setting for hw-blend-color-attr. I don’t really understand what this is so some more information and an example would be really helpful.
It seems that when the process-mode is VIC that this property is read for background colours instead of the RGBA properties in rect_params.
The problem with hw-blend-color-attr is that its defined per class id which means it will show that background color whenever there is a detection no matter what. I lose the power of being able to control when to show the background color.

As an example - when an object is stationary I want to change the background color. This does not seem to be possible with the hw-blend-color-attr.

Hi,
We have verified in workng by setting osd property hw-blend-color-attr:

hw-blend-color-attr=0,1.0,1.0,0.0,0.3:1,0.0,1.0,1.0,0.3:2,0.0,0.0,1.0,0.3:3,0.0,1.0,0.0,0.3

Please give it a try.

Please explain how this property can be used to shade a box only on certain events from within a pad probe? It does not look like it can.

An example use case is this:

You have a region of interest and only want to shade bboxes that are inside the roi. I can do this via a pad probe and updating the values in rect_params - however it only works if process_mode is CPU.

Maybe the hw-blend-color-attr property should be added to NvOSD_RectParams so that it can be dynamically changed.

Hi,
If you would needs to update colors dynamically, CPU mode has to be used. VIC mode will require initialization of colors using the property(hw-blend-color-attr) at init time.