/* * Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved. * * NVIDIA Corporation and its licensors retain all intellectual property * and proprietary rights in and to this software, related documentation * and any modifications thereto. Any use, reproduction, disclosure or * distribution of this software and related documentation without an express * license agreement from NVIDIA Corporation is strictly prohibited. * */ /** * @file * Defines analytics metadata * * @b Description: This file defines metadata concerning nvdsanalytics plugin. */ /** * @defgroup NvDsMetaApi Metadata APIs * * This section describes types and functions of Metadata APIs * programming interface. * */ #ifndef _NVDS_ANALYTICS_META_H_ #define _NVDS_ANALYTICS_META_H_ #include #include #include #ifdef __cplusplus extern "C" { #endif /** * @defgroup ee_analytics_group Analytics Metadata * Defines metadata concerning nvdsanalytics plugin. * @ingroup NvDsMetaApi * @{ */ #define NVDS_USER_FRAME_META_NVDSANALYTICS (nvds_get_user_meta_type((gchar*)"NVIDIA.DSANALYTICSFRAME.USER_META")) #define NVDS_USER_OBJ_META_NVDSANALYTICS (nvds_get_user_meta_type((gchar*)"NVIDIA.DSANALYTICSOBJ.USER_META")) /** * Holds a set of nvdsanalytics object level metadata. */ typedef struct { /** Holds the array of ROI labels in which object is present */ std::vector roiStatus; /** Holds the array of OverCrowding labels in which object is present */ std::vector ocStatus; /** Holds the array of line crossing labels which object has crossed */ std::vector lcStatus; /** Holds the direction string for the tracked object */ std::string dirStatus; /** Holds unique identifier for nvdsanalytics instance */ guint unique_id; } NvDsAnalyticsObjInfo; /** * Holds a set of nvdsanalytics framelevel metadata. */ typedef struct { /** Holds a map of boolean status of overcrowding for configured ROIs, * which can be accessed using key, value pair; where key is the ROI label */ std::unordered_map ocStatus; /** Holds a map of total count of valid objects in ROI for configured ROIs, * which can be accessed using key, value pair; where key is the ROI label */ std::unordered_map objInROIcnt; /** Holds a map of total count of Line crossing in current frame for configured lines, * which can be accessed using key, value pair; where key is the line crossing label */ std::unordered_map objLCCurrCnt; /** Holds a map of total cumulative count of Line crossing for configured lines, * can be accessed using key, value pair; where key is the line crossing label */ std::unordered_map objLCCumCnt; /** Holds unique identifier for nvdsanalytics instance */ guint unique_id; /** Holds a map of total count of objects for each class ID, * can be accessed using key, value pair; where key is class ID */ std::unordered_map objCnt; } NvDsAnalyticsFrameMeta; #ifdef __cplusplus } #endif #endif /** @} */