The count information that should be displayed in the upper left corner in deepstream-test3 is not displayed!

  • deepstream-app version 6.1.0
  • DeepStreamSDK 6.1.0
  • CUDA Driver Version: 11.4
  • CUDA Runtime Version: 11.6
  • TensorRT Version: 8.2
  • cuDNN Version: 8.4
  • libNVWarp360 Version: 2.0.1d3
  1. Question:The count information that should be displayed in the upper left corner in deepstream-test3 is not displayed!!!
    2.Test:I printed the count in the console and it is there with this text message.
    3.Test:In the configuration file I have set display_text to 1 and the label is displayed correctly.
    Code:
        txt_params->display_text = g_malloc0 (MAX_DISPLAY_LEN);
        offset = snprintf(txt_params->display_text, MAX_DISPLAY_LEN, "Person = %d ", person_count);
        offset = snprintf(txt_params->display_text + offset , MAX_DISPLAY_LEN, "Vehicle = %d ", vehicle_count);
        **g_print ("Frame display_text = %s\n",**
**                 txt_params->display_text);//This does  work**

        /* Now set the offsets where the string should appear */
        txt_params->x_offset = 10;
        txt_params->y_offset = 12;

        /* Font , font-color and font-size */
        txt_params->font_params.font_name = "Serif";
        txt_params->font_params.font_size = 10;
        txt_params->font_params.font_color.red = 1.0;
        txt_params->font_params.font_color.green = 1.0;
        txt_params->font_params.font_color.blue = 1.0;
        txt_params->font_params.font_color.alpha = 1.0;

        /* Text background color */
        txt_params->set_bg_clr = 1;
        txt_params->text_bg_clr.red = 0.0;
        txt_params->text_bg_clr.green = 0.0;
        txt_params->text_bg_clr.blue = 0.0;
        txt_params->text_bg_clr.alpha = 1.0;
        **nvds_add_display_meta_to_frame(frame_meta, display_meta);**//This does not seem to work

By default deepstream-test3 disables OSD display. You can enable the display by setting “OSD_DISPLAY_TEXT” to 1 (current value is 0) and uncomment the code in function tiler_src_pad_buffer_probe.

Thanks for your reply.
I have sat the operation you said, but about the display of the count, it does not show.
This function “nvds_add_display_meta_to_frame(frame_meta, display_meta) “ does not work in deepstream-test3

Can you get the correct number printed onto standard output?

      g_print ("Frame Number = %d Number of objects = %d "
        "Vehicle Count = %d Person Count = %d\n",
        frame_meta->frame_num, num_rects, vehicle_count, person_count);

Frame Number = 187 Number of objects = 14 Vehicle Count = 5 Person Count = 9
Yes, the data acquisition is very accurate.

Please add num_labels setting and retest, thanks.

        NvOSD_TextParams *txt_params  = &display_meta->text_params;
        display_meta->num_labels = 1;  //Add this line and retest
        txt_params->display_text = g_malloc0 (MAX_DISPLAY_LEN);

Wow, it worked .
Thank you so much, what does this tag mean?

number of labels to be displayed, nvdsosd need this parameter when filling the display information.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.