deepstream-app[fonts]

How do I add different colors/fonts for secondary classification /detection results?

display_meta->text_params[0].y_offset = 20;
  display_meta->text_params[0].x_offset = 20;
  display_meta->text_params[0].font_params.font_color = (NvOSD_ColorParams) {
  0, 1, 0, 1};
  display_meta->text_params[0].font_params.font_size =
      appCtx->config.osd_config.text_size * 1.5;
  display_meta->text_params[0].font_params.font_name = "Serif";
  display_meta->text_params[0].set_bg_clr = 1;
  display_meta->text_params[0].text_bg_clr = (NvOSD_ColorParams) {
  0, 0, 0, 1.0};

if(nvds_enable_latency_measurement) {
    g_mutex_lock (&appCtx->latency_lock);
    latency_info = &appCtx->latency_info[index];
    display_meta->num_labels++;
    display_meta->text_params[1].display_text = g_strdup_printf ("Latency: %lf",
        latency_info->latency);
    g_mutex_unlock (&appCtx->latency_lock);

    display_meta->text_params[1].y_offset = (display_meta->text_params[0].y_offset * 2 )+
      display_meta->text_params[0].font_params.font_size;
    display_meta->text_params[1].x_offset = 20;
    display_meta->text_params[1].font_params.font_color = (NvOSD_ColorParams) {
      0, 1, 0, 1};
    display_meta->text_params[1].font_params.font_size =
      appCtx->config.osd_config.text_size * 1.5;
    display_meta->text_params[1].font_params.font_name = "Arial";
    display_meta->text_params[1].set_bg_clr = 1;
    display_meta->text_params[1].text_bg_clr = (NvOSD_ColorParams) {
      0, 0, 0, 1.0};
  }

Hi,
Could you share how we can reproduce the issue you are facing? So that we can check and give suggestion. Maybe a patch on deepstream-test2 or enable dsexample in deepstream-app.

Hi,

fonts and color can be updated directly from the configure file.

https://docs.nvidia.com/metropolis/deepstream/4.0/dev-guide/index.html#page/DeepStream_Development_Guide%2Fdeepstream_app_config.3.2.html%23wwpID0EQHA

Key         Meaning                                                                   Type and Value ...

text-color  The color of the text that describes the objects, in RGBA format.         R;G;B;A Float,
                                                                                      0≤R,G,B,A≤1
font        Name of the font for text that describes the objects.               
            Enter the shell command fc-list to display the names of available fonts.  String

Thanks.

Hi Dane, Aasta,

How do we add next line “\n” to results from secondary classifiers

How can we put an const text on screen from various sources.

Hi,
On DS4.0.1, it is not supported. Please check the following post:
https://devtalk.nvidia.com/default/topic/1063763/deepstream-sdk/on-screen-display-of-counted-vehicles-/post/5386812/#5386812

The implementation shows number,car type,color type in a string with one color, along with one background color.