How to get roi-rf coordinates from Nvdsanalytics

Please provide complete information as applicable to your setup.

• Hardware Platform (Jetson / GPU) dGPU
• DeepStream Version 5.0.1
• JetPack Version (valid for Jetson only)
• TensorRT Version
• NVIDIA GPU Driver Version (valid for GPU only) 440.118
• Issue Type( questions, new requirements, bugs)
• How to reproduce the issue ? (This is for bugs. Including which sample app is using, the configuration files content, the command line used and other details for reproducing)
• Requirement details( This is for new requirement. Including the module name-for which plugin or for which sample application, the function description)

I want to check if an object is within ROI-RF coordinates or not.

Is there a way to get the ROI-RF coordinate from the nvdsanalytics config-file

1 Like

deepstream-occupancy-analytics
you can refer to this sample app

The given link does not help. I need to get the coordinates of the ROI-RF or a means to know that the object-id is in the ROI.
In the example it just gives the meta-data on a frame level not per object something like what can be achieved for Direction.

1 Like

yes, this sample not use ROI, but it can teach you how use

NVDS_USER_OBJ_META_NVDSANALYTICS

you can try with:

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->dirStatus.length()){
                            g_print ("object %lu moving in %s\n", obj_meta->object_id, user_meta_data->dirStatus.c_str());
                        }
                    }
                }

This one gives the dirStatus which is already evident from the nvdsanalytics example.

I am interested in finding out if a particular object is with the ROI-RF as defined in the config file.
Is there a mechanism to get access to the ROI-RF coordinates as defined in the config file. I can write a custom logic to find if a point is with ROI… I just need the coordinates.