Maximum Drawing reached 30 items?

I am trying to overlay a 8x8 grid of data onto the image post NN, but I hit the hard limit of 30 items when drawing rectangles. Image processing is kind of outside my realm of knowledge, is there a way to get around that 30 item limit? The sensor data will update very slowly so I dont need to refresh it often. I’ve tried using different layers, but I honestly have no idea what I’m doing! Any help would be appreciated.

Is there a better way to do this than rectangles? I really need to visualize this data for Demo purposes.

Hi @angus1357,

Have you taken a look at this link? VideoStreamOverlay Class – Realtek IoT/Wi-Fi MCU Solutions

Right now from what I see, it supports drawing of rectangles. For other shapes you will need to use the drawPoint() API, in which you will need to have the coordinates of the shape.

I will check whether it is possible to use layers to increase the number of objects being drawn. Will let you know once I have tested it.

Thank you.

Thank you, that would be amazing! I have no issues drawing what I need on the screen other than the 30 item cap.

Kelvin,

Do we have an update on this?

Hi @angus1357,

I have tried the latest SDK version and it seemed like there is some bug with using layers for OSD at the moment.

We will look into this issue when we have the capacity to do so. For now it is true that for layer 0 (default layer), maximum drawing is 30 items.

Will update again if we found a fix to this issue.

If you got time, can you try older versions of the SDK (such as 4.0.5), and see if you are able to use layers for OSD and draw more than 30 objects with different layers.

Thanks for your patience.

Hi @angus1357 ,

You may draw more than 30 items on 1 channel.

There are a total of 6 layers for you to use. Each layer can draw up to a total of 30 items. (Refer to VideoStreamOverlay.h)
image

You will need to create bitmap and update the drawing for each layer.
OSD.createBitmap(CHANNEL, OSDLAYER0);
OSD.createBitmap(CHANNEL, OSDLAYER1);

OSD.update(CHANNEL, OSDLAYER0);
OSD.update(CHANNEL, OSDLAYER1);

You may refer to this ino for reference to draw more than 30 items using different layers.
VideoOnly_OSD.zip (1.3 KB)

Was this recently updated, do I need to pull a new library somewhere? Originally the only layer that displayed was layer 0 because I attempted to use the other layers before posting.

Hi @angus1357,

Actually it wasn’t really a bug, just that when I tested this 2 months ago, I missed calling one of the APIs to update the different layers. You can refer to the example provided by Pammy and use the latest SDK version.

Thank you.

Perfect, thank you for the example! Topic can close, its fixed.