PC: RTX 2070 Super
Deepstream: 6.4
Driver Version: 535.154.05
Docker image: deepstream:6.4-gc-triton-devel
I am working on the sample app deepstream-nvdsanalytics-test in C++ for deepstream 6.4. I can compile and use the app correctly.
My use case is as below
- If roi filtering is enabled for the stream, I would like to process objects inside the ROI with function X.
- If roi filtering is disabled for the stream, I would like to process all objects with function X
However my issue is that, within this probe function, if an object does not contain any usermeta NVDS_USER_OBJ_META_NVDSANALYTICS, there is no way to know, if this is because the object is outside the ROI or if roi filtering is disabled for this stream.
Thus my question, is there any way to know if roi filtering is active or not per stream during probe.
for (l_obj = frame_meta->obj_meta_list; l_obj != NULL; )
{
obj_meta = (NvDsObjectMeta *)(l_obj->data);
NvDsMetaList *obj_next = l_obj->next;
bool is_in_roi=false;
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);
if(user_meta->base_meta.meta_type == NVDS_USER_OBJ_META_NVDSANALYTICS)
{
NvDsAnalyticsObjInfo * user_meta_data = (NvDsAnalyticsObjInfo *)user_meta->user_meta_data;
if(user_meta_data->roiStatus.size()>0){
is_in_roi = true;
}
}
}
if(is_in_roi){
// Process objects with function X
}
l_obj = obj_next;
}
[roi-filtering-stream-0]
enable=1
roi-RF=50;500;1870;500;1870;1030;50;1030
inverse-roi=0
class-id=-1