Plot opaque polygon and control opaqueness in osd_sink_pad_buffer_probe

Please provide complete information as applicable to your setup.

**• Hardware Platform (Jetson / GPU)**Orin
• DeepStream Version7.1
**• JetPack Version (valid for Jetson only)**6.1
I can plot polygon using the following code. Polygon is drawn using multiple lines. I can control line parameters only. How can I plot a polygon with opaqueness in it?

NvOSD_LineParams *line_params = &display_meta->line_params[0];
      line_params->x1 = 10;
      line_params->y1 = 10;
      line_params->x2 = 100;
      line_params->y2 = 200;
      line_params->line_width = 2;
      line_params->line_color.red = 0.0;
      line_params->line_color.green = 0.0;
      line_params->line_color.blue = 1.0;
      line_params->line_color.alpha = 1.0;

      line_params = &display_meta->line_params[1];
      line_params->x1 = 100;
      line_params->y1 = 200;
      line_params->x2 = 400;
      line_params->y2 = 500;
      line_params->line_width = 2;
      line_params->line_color.red = 0.0;
      line_params->line_color.green = 0.0;
      line_params->line_color.blue = 1.0;
      line_params->line_color.alpha = 1.0;

      line_params = &display_meta->line_params[2];
      line_params->x1 = 400;
      line_params->y1 = 500;
      line_params->x2 = 600;
      line_params->y2 = 600;
      line_params->line_width = 2;
      line_params->line_color.red = 0.0;
      line_params->line_color.green = 0.0;
      line_params->line_color.blue = 1.0;
      line_params->line_color.alpha = 1.0;

      line_params = &display_meta->line_params[3];
      line_params->x1 = 600;
      line_params->y1 = 600;
      line_params->x2 = 10;
      line_params->y2 = 10;
      line_params->line_width = 2;
      line_params->line_color.red = 0.0;
      line_params->line_color.green = 0.0;
      line_params->line_color.blue = 1.0;
      line_params->line_color.alpha = 1.0;

      display_meta->num_lines = 4;
    nvds_add_display_meta_to_frame(frame_meta, display_meta);

You can control the opaqueness by the line_params->line_color.alpha parameter.

That changes line color opaque only. I like to opaque whole area inside polygon.

We don’t support this feature now. Can you describe your needs in detail? We will consider whether to add it in the future release.

It is like in other video analytics software. For restricted areas, now we can plot only polygons in deepstream. If we can plot polygons with different opaquicity covering the whole area in the polygon, it is better for the user to visualize.

For your scenario, if you are using a instance segmetation or segmentation model, we can support that. But if you manually draw the polygons and then want to change the transparency, we don’t support that now.

Yes what I like to have in deepstream is that we draw polygon manually to show users as restricted zones in display images. So we want polygons with transparency for better presentation. It will be good to have in future updates.