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.
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.
Is there an example in the samples to illustrate modifying rect_params, border_color, bg_color, especially with Jetson hardware. what configs need to be applied/modified .
Example imagedata-multistream has access to the buffers, and does rect drawing but this is on a np array and is not what I’m looking for.
There are plenty of examples where they access the text_params but from what ive seen I cant find examples for changing obj colours
Hi @Andrew_Smith
Please make a new topic for your issue. This topic reports an issue and we have fixed in in DS5.0 GA. Your usecase might be a new issue and for clearness, we suggest start a new topic.
Hi,
It is suggested in this comment. Please set the property in nvdsosd:
process-mode : Rect and text draw process mode
flags: readable, writable, changeable only in NULL or READY state
Enum "GstNvDsOsdMode" Default: 2, "HW_MODE"
(0): CPU_MODE - CPU_MODE
(1): GPU_MODE - GPU_MODE, yet to be implemented for Tegra
(2): HW_MODE - HW_MODE. Only for Tegra. For rectdraw only.
Thank you. I have tested, and CPU mode works for me as expected.
However I noticed one thing. I have H264 FullHD source stream at 25 fps rate. When I use VIC mode I get fps down to 22 (due to lack of some resources) in gstreamer pipeline, but when I change to CPU mode (and this is the only change), I get 25 fps, and no performance issues. Is this expected?
To be more accurate, I run ds inference on the stream, and modify meta in pad handler before nvosd item.