How to do a picture OSD in TX2?

Hi,

I want to overlay a picture in video raw data.
I find the osd api in the TX2 MMAPI, but there only have the text OSD api(nvosd_put_text)and rectangle OSD api(nvosd_draw_rectangles) . How to do a picture osd?

Regards.

Hi zcs,

How does your video raw data render to monitor? osd only supports draw text and rectangles.

Hi, WayneWWW

Thanks for your reply.
The video raw data do not render to monitor, just encode and send to network.

Hi zcs,

You could try use cuda for overlaying the picture. Please take a look at other MMAPI sample related to cuda.

Hi, WayneWWW

Is the text OSD api and rectangle OSD api work by cuda?

I believe you will use the OpenGL or Vulkan APIs to render the overlay, with your video being one of the available resources for the graphics.
I e, the most flexible pipeline (allowing you to use arbitrary OpenGL rendering) would be:
capture -> raw data -> texture buffer object -> OpenGL rendering -> framebuffer object -> encoding -> network

OpenGL and Vulkan can of course do arbitrarily fancy graphics, depending on the skill and artist resources availble to design and implement the OSD.
You can also use this for video effects, anything from simple wipes and fades to advanced 3D effects. If you’re building a UI that’s supposed to feel polished for end users, then this may be useful, too.

Hi zcs,

OSD api is not work by cuda. What I meant is similar to snarky that you could use other API to overlay your picture on the video and then encode.

Thanks! I see.

Hi WayneWWW,

can you please tell me how to draw osd text on yuv422 image captured by v4l2 video device? can we do that by passing v4l2 buf or yuv image to nvosd_put_text without using dmabuf?

Hi shivlal12345
Current osd text only works on RGBA image.

https://devtalk.nvidia.com/default/topic/1021210/unable-to-display-text-using-nvosd_put_text-/