NvDsAnalyticsObjInfo > dirStatus is always NULL, and how to use NvDsAnalyticsObjInfo's lcStatus?

• Hardware Platform (Jetson / GPU)
T4
• DeepStream Version
5.1
• TensorRT Version
7.2.3
• NVIDIA GPU Driver Version (valid for GPU only)
460.32.03

Hello, I have a question.

This is my code.

for (l_obj = frame_meta->obj_meta_list; l_obj != NULL;
l_obj = l_obj->next) {
obj_meta = (NvDsObjectMeta *) (l_obj->data);
// Access attached user meta for each object
for (NvDsMetaList *l_user_meta = obj_meta->obj_user_meta_list; l_user_meta != NULL;
l_user_meta = l_user_meta->next) {
NvDsUserMeta *user_meta = (NvDsUserMeta *) (l_user_meta->data);
g_print (“nvdsanalytics_meta insert_qry user_meta->base_meta.meta_type : %d\n”, user_meta->base_meta.meta_type);
if(user_meta->base_meta.meta_type == NVDS_USER_OBJ_META_NVDSANALYTICS)
{
NvDsAnalyticsObjInfo * user_meta_data = (NvDsAnalyticsObjInfo *)user_meta->user_meta_data;
g_print (“nvdsanalytics_meta insert_qry user_meta_data->unique_id %d\n”, user_meta_data->unique_id);
g_print (“nvdsanalytics_meta insert_qry user_meta_data->dirStatus.length() %d\n”, user_meta_data->dirStatus.length());
if (user_meta_data->dirStatus.length()){
g_print (“nvdsanalytics_meta insert_qry object %lu moving in %s\n”, obj_meta->object_id, user_meta_data->dirStatus.c_str());
}
else {
g_print (“nvdsanalytics_meta insert_qry user_meta_data->dirStatus.length() is NULL!!!\n”);
}
}
}
}

there’s something wrong. why dirStatus is always got NULL value?
If NvDsAnalyticsObjInfo is NULL, how to get this?

and I have one more question.

how to use lcStatus ?
here’s define code.

/**

  • Holds a set of nvdsanalytics object level metadata.
    */

typedef struct
{
/** Holds the array of ROI labels in which object is present /
std::vector std::string roiStatus;
/
* Holds the array of OverCrowding labels in which object is present /
std::vector std::string ocStatus;
/
* Holds the array of line crossing labels which object has crossed /
std::vector std::string lcStatus;
/
* Holds the direction string for the tracked object /
std::string dirStatus;
/
* Holds unique identifier for nvdsanalytics instance */
guint unique_id;
} NvDsAnalyticsObjInfo;

If you got the reference or sample code, please share it to me.
thanks for read my article and help me.

  1. what’s the exact problem. could you provide more details
  2. If you really need to share your code with us, could you share it with the markdown format?
  1. what’s the exact problem. could you provide more details
    A > problem is… user_meta_data(NvDsAnalyticsObjInfo)->dirStatus is always NULL. how can I get this value?

  2. If you really need to share your code with us, could you share it with the markdown format?
    A> ok. I will soon. please wait.

I referenced this code.

and problem is…

I think it’s better to refer the original sample deepstream-nvdsanalytics-test , 1st, you need to confirm if this sample can work well, thn you need to check whether the config is correct compared with this sample