NVIDIA DeepStream SDK API Reference

8.0 Release
metadata.hpp
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: Copyright (c) 2024-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
3  * SPDX-License-Identifier: LicenseRef-NvidiaProprietary
4  *
5  * NVIDIA CORPORATION, its affiliates and licensors retain all intellectual
6  * property and proprietary rights in and to this material, related
7  * documentation and any modifications thereto. Any use, reproduction,
8  * disclosure or distribution of this material and related documentation
9  * without an express license agreement from NVIDIA CORPORATION or
10  * its affiliates is strictly prohibited.
11  */
12 
21 #ifndef NVIDIA_DEEPSTREAM_METADATA
22 #define NVIDIA_DEEPSTREAM_METADATA
23 
24 #include <functional>
25 #include <memory>
26 #include <string>
27 
28 #include "nvll_osd_struct.h"
29 #include "nvds_tracker_meta.h"
30 
31 namespace deepstream {
32 
33 #define USER_METADATA_START = (4096 + 4096 + 1)
34 
42 class Metadata {
43  public:
45  Metadata(void* data);
46 
48  virtual ~Metadata();
49 
51  virtual operator bool() { return data_ != nullptr; }
52 
53  protected:
54  void* data_; //> opaque data pointer
55 };
56 
64 template <typename T>
66  public:
68  AbstractIterator(const T& data) : data_(data) {}
69 
71  virtual ~AbstractIterator() {}
72 
74  T& operator*() { return data_; }
75 
77  T* operator->() { return &data_; }
78 
80  T& get() { return data_; }
81 
83  virtual AbstractIterator<T>& next() = 0;
84 
86  virtual bool done() = 0;
87 
89  virtual bool operator==(const AbstractIterator<T>& other) const = 0;
90 
92  bool operator!=(const AbstractIterator<T>& other) const {
93  return !(*this == other);
94  }
95 
96  protected:
97  T data_;
98 };
99 
101 class UserMetadata : public Metadata {
102  public:
103  typedef std::unique_ptr<AbstractIterator<UserMetadata>> Iterator;
104 
111  UserMetadata(void*);
113  virtual ~UserMetadata();
114 
116  virtual operator bool() override { return data_ != nullptr; }
117 
118  friend class BatchMetadata;
119  friend class FrameMetadata;
120 
121  protected:
122  void get_(void*&);
123 };
124 
126 class ClassifierMetadata : public Metadata {
127 public:
128  typedef std::unique_ptr<AbstractIterator<ClassifierMetadata>> Iterator;
129 
136  ClassifierMetadata(void* data = nullptr);
138  virtual ~ClassifierMetadata();
139 
141  unsigned int nLabels() const;
143  unsigned int uniqueComponentId() const;
145  std::string getLabel(unsigned int nth) const;
146 
147 };
148 
155 class ObjectMetadata : public Metadata {
156  public:
157  typedef std::unique_ptr<AbstractIterator<ObjectMetadata>> Iterator;
158 
165  ObjectMetadata(void* data = nullptr);
167  virtual ~ObjectMetadata();
168 
170  unsigned int uniqueComponentId() const;
171  void setUniqueComponentId(unsigned int);
173  unsigned int classId() const;
174  void setClassId(unsigned int);
176  unsigned long int objectId() const;
177  void setObjectId(unsigned long);
179  float confidence() const;
180  void setConfidence(float);
182  float trackerConfidence() const;
183  void setTrackerConfidence(float);
185  NvOSD_RectParams& rectParams() const;
186  void setRectParams(const NvOSD_RectParams&);
188  NvOSD_MaskParams& maskParams() const;
189  void setMaskParams(const NvOSD_MaskParams&);
191  NvOSD_TextParams& textParams() const;
192  void setTextParams(const NvOSD_TextParams&);
194  std::string label() const;
195  void setLabel(std::string);
197  NvBbox_Coords& nvBboxInfo() const;
198  void setNvBboxInfo(const NvBbox_Coords&);
199 
201  unsigned int iterate(const std::function<void(const ClassifierMetadata&)>& func) const;
204 
206  unsigned int iterate(const std::function<void(const UserMetadata&)>& func, int meta_type) const;
208  void initiateIterator(UserMetadata::Iterator&, int meta_type) const;
209 
210  friend class FrameMetadata;
211 };
212 
213 
214 class FrameMetadata;
223  public:
224  EventMessageUserMetadata(void* data=nullptr);
225  virtual ~EventMessageUserMetadata();
226 
228  void generate(
229  const ObjectMetadata&,
230  const FrameMetadata&,
231  const std::string sensor="N/A",
232  const std::string uri="N/A",
233  const std::vector<std::string>labels=std::vector<std::string>());
234 };
235 
242 class RoiMetadata : public Metadata {
243  public:
244  RoiMetadata(void* data=nullptr);
245  virtual ~RoiMetadata();
246 
248  NvOSD_RectParams& rectParams() const;
249 
252 
255 
257  unsigned int iterate(const std::function<void(const UserMetadata&)>& func, int meta_type) const;
259  void initiateIterator(UserMetadata::Iterator&, int meta_type) const;
260 
262  unsigned int iterate(const std::function<void(const ClassifierMetadata&)>& func) const;
265 };
266 
267 
273 class Tensor;
275  public:
276  TensorOutputUserMetadata(void* data=nullptr);
278  virtual ~TensorOutputUserMetadata();
279 
281  unsigned int uniqueId() const;
283  std::unordered_map<std::string, Tensor*> getLayers();
284 };
285 
295 public:
301  SegmentationUserMetadata(void* data=nullptr);
302 
305 
307  virtual ~SegmentationUserMetadata();
308 
310  unsigned int uniqueId() const;
311 
313  unsigned int getClasses() const;
314 
316  unsigned int getWidth() const;
317 
319  unsigned int getHeight() const;
320 
322  const int* getClassMap() const;
323 
325  const float* getClassProbabilitiesMap() const;
326 };
327 
334 template <class C, int N>
336  public:
337  UserMetadataTemplate(void* data=nullptr) : UserMetadata(data) {}
340 
341 
342  C& get() {
343  void* p = nullptr;
344  this->get_(p);
345  return *((C*)p);
346  }
347 
348  static void* copy(void* data, void* user_data) {
349  void* p = nullptr;
351  C*& src = (C*&) p;
352  C* dst = new C(*src);
353  return dst;
354  }
355 
356  static void free(void* data, void* user_data) {
357  void* p = nullptr;
359  C*& src = (C*&) p;
360  delete src;
361  p = nullptr;
362  }
363 };
364 
372 class DisplayMetadata : public Metadata {
373  public:
374  typedef std::unique_ptr<AbstractIterator<DisplayMetadata>> Iterator;
375 
382  DisplayMetadata(void* data = nullptr);
384  virtual ~DisplayMetadata();
385 
387  unsigned int nRects() const;
389  unsigned int nLabels() const;
391  unsigned int nLines() const;
393  unsigned int nArrows() const;
395  unsigned int nCircles() const;
396 
398  bool add(NvOSD_TextParams&);
400  bool add(NvOSD_RectParams&);
402  bool add(NvOSD_LineParams&);
404  bool add(NvOSD_ArrowParams&);
406  bool add(NvOSD_CircleParams&);
407 
408  friend class FrameMetadata;
409 };
410 
417 class FrameMetadata : public Metadata {
418  public:
419  typedef std::unique_ptr<AbstractIterator<FrameMetadata>> Iterator;
420 
427  FrameMetadata(void* data=nullptr);
429  virtual ~FrameMetadata();
430 
432  unsigned int iterate(const std::function<void(const ObjectMetadata&)>& func) const;
435 
437  unsigned int iterate(const std::function<void(const DisplayMetadata&)>& func) const;
440 
442  unsigned int iterate(const std::function<void(const UserMetadata&)>& func, int meta_type) const;
444  void initiateIterator(UserMetadata::Iterator&, int meta_type) const;
445 
447  unsigned int padIndex() const;
449  unsigned int batchId() const;
451  int frameNum() const;
453  unsigned int sourceId() const;
455  unsigned int sourceWidth() const;
457  unsigned int sourceHeight() const;
458 
460  unsigned int pipelineWidth() const;
462  unsigned int pipelineHeight() const;
463 
465  uint64_t bufferPTS() const;
467  uint64_t ntpTimestamp() const;
468 
470  void append(const DisplayMetadata&);
472  void append(const UserMetadata&);
474  void append(const ObjectMetadata&);
475 
476  friend class BatchMetadata;
477 };
478 
485  public:
486  PreprocessTensorMetadata(void* data=nullptr);
487  virtual ~PreprocessTensorMetadata();
488 
490  std::string getName() const;
491 
493  unsigned int getMetaId() const;
494 
496  Tensor* getTensor() const;
497 
498  operator bool() const {
499  return data_ != nullptr;
500  }
501 
502  protected:
503  void * data_;
504 };
505 
506 
513  public:
514  PreprocessBatchUserMetadata(void* data=nullptr);
517 
519  std::vector<unsigned int> getTargetUniqueIds() const;
520 
522  std::vector<RoiMetadata> getRois() const;
523 
526 
528  bool initPreprocessTensorMetadata(const std::string& name, unsigned int meta_id, unsigned int unique_id, Tensor* tensor);
529 };
530 
532  public:
533  ObjectVisibilityUserMetadata(void* data=nullptr);
534  ObjectVisibilityUserMetadata(const UserMetadata& user_meta);
536 
538  float getVisibility() const;
539 };
540 
542  public:
543  ObjectImageFootLocationUserMetadata(void* data=nullptr);
546 
548  std::pair<float, float> getImageFootLocation() const;
549 };
550 
552  public:
553  Object3DBBoxUserMetadata(void* data=nullptr);
554  Object3DBBoxUserMetadata(const UserMetadata& user_meta);
555  virtual ~Object3DBBoxUserMetadata();
556  NvDsObj3DBbox* get3DBbox() const;
557 };
558 
560  public:
561  TrackerPastFrameUserMetadata(void* data=nullptr);
562  TrackerPastFrameUserMetadata(const UserMetadata& user_meta);
565 };
566 
568 public:
574  AnalyticsObjInfo(void* data=nullptr);
575 
577  AnalyticsObjInfo(const UserMetadata& user_meta);
578 
580  virtual ~AnalyticsObjInfo();
581 
583  std::vector<std::string> getRoiStatus() const;
584 
586  std::vector<std::string> getOcStatus() const;
587 
589  std::vector<std::string> getLcStatus() const;
590 
592  std::string getDirStatus() const;
593 
595  unsigned int getUniqueId() const;
596 
598  std::string getObjStatus() const;
599 };
600 
602 public:
608  AnalyticsFrameMeta(void* data=nullptr);
609 
611  AnalyticsFrameMeta(const UserMetadata& user_meta);
612  virtual ~AnalyticsFrameMeta();
613 
617  std::unordered_map<std::string, bool> getOcStatus() const;
618 
622  std::unordered_map<std::string, uint32_t> getObjInROIcnt() const;
623 
627  std::unordered_map<std::string, uint64_t> getObjLCCurrCnt() const;
628 
632  std::unordered_map<std::string, uint64_t> getObjLCCumCnt() const;
633 
635  unsigned int getUniqueId() const;
636 
640  std::unordered_map<int, uint32_t> getObjCnt() const;
641 };
642 
652 class BatchMetadata : public Metadata {
653  public:
660  BatchMetadata(void *data = nullptr);
661 
663  virtual ~BatchMetadata();
664 
666  unsigned int iterate(const std::function<void(const FrameMetadata&)>& func) const;
669 
671  unsigned int iterate(const std::function<void(const UserMetadata&)>& func, int meta_type) const;
673  void initiateIterator(UserMetadata::Iterator&, int meta_type) const;
674 
676  bool acquire(DisplayMetadata&);
678  bool acquire(FrameMetadata&);
680  bool acquire(ObjectMetadata&);
686  template<class C, int N>
688  user_meta = acquireUserMetadata_(
690  );
691  return user_meta ? true : false;
692  }
693 
695  void append(const FrameMetadata&);
697  void append(const UserMetadata&);
698 
700  unsigned int nFrames() const;
701 
702  protected:
704  void* data, unsigned int type, void*(*copy)(void*, void*), void(*free)(void*, void*)
705  );
706 };
707 
708 
709 }
710 
711 #endif
deepstream::AbstractIterator::done
virtual bool done()=0
check if the end is reached
_NvOSD_LineParams
Holds the box parameters of a line to be overlayed.
Definition: nvll_osd_struct.h:181
deepstream::EventMessageUserMetadata::EventMessageUserMetadata
EventMessageUserMetadata(void *data=nullptr)
deepstream::AbstractIterator::operator==
virtual bool operator==(const AbstractIterator< T > &other) const =0
check if two iterator point to the same position
deepstream::PreprocessBatchUserMetadata::getTargetUniqueIds
std::vector< unsigned int > getTargetUniqueIds() const
@Brief Get the target unique ids
deepstream::ClassifierMetadata
Meta generated from a classifier.
Definition: metadata.hpp:126
_NvOSD_RectParams
Holds the box parameters of the box to be overlayed.
Definition: nvll_osd_struct.h:140
deepstream::ObjectMetadata::iterate
unsigned int iterate(const std::function< void(const ClassifierMetadata &)> &func) const
Iterate the classifier metadata within it.
deepstream::AnalyticsFrameMeta::getObjLCCumCnt
std::unordered_map< std::string, uint64_t > getObjLCCumCnt() const
Map of total cumulative count of Line crossing for configured lines, which can be accessed using key,...
_NvOSD_MaskParams
Holds the mask parameters of the segment to be overlayed.
Definition: nvll_osd_struct.h:170
deepstream::ObjectImageFootLocationUserMetadata::~ObjectImageFootLocationUserMetadata
virtual ~ObjectImageFootLocationUserMetadata()
deepstream::AnalyticsObjInfo::~AnalyticsObjInfo
virtual ~AnalyticsObjInfo()
Destructor for AnalyticsObjInfo.
deepstream::ObjectMetadata::Iterator
std::unique_ptr< AbstractIterator< ObjectMetadata > > Iterator
Definition: metadata.hpp:157
deepstream::ObjectVisibilityUserMetadata::getVisibility
float getVisibility() const
Get the visibility of the object.
deepstream::RoiMetadata::frameMetadata
FrameMetadata frameMetadata() const
Get the frame metadata.
deepstream::AnalyticsFrameMeta::getObjCnt
std::unordered_map< int, uint32_t > getObjCnt() const
Map of total count of objects for each class ID, which can be accessed using key, value pair; where k...
deepstream::AbstractIterator
metadata iterator template
Definition: metadata.hpp:65
deepstream::ObjectMetadata::objectId
unsigned long int objectId() const
Number to identify the object which is tracked in the scene.
deepstream::BatchMetadata::acquire
bool acquire(UserMetadataTemplate< C, N > &user_meta)
Initialize an empty user metadata through template.
Definition: metadata.hpp:687
deepstream::SegmentationUserMetadata::~SegmentationUserMetadata
virtual ~SegmentationUserMetadata()
Destructor for SegmentationUserMetadata.
deepstream::UserMetadataTemplate::UserMetadataTemplate
UserMetadataTemplate(void *data=nullptr)
Definition: metadata.hpp:337
deepstream::AbstractIterator::data_
T data_
Definition: metadata.hpp:97
deepstream::AnalyticsFrameMeta::AnalyticsFrameMeta
AnalyticsFrameMeta(void *data=nullptr)
Constructor for AnalyticsFrameMeta.
deepstream::AnalyticsFrameMeta::~AnalyticsFrameMeta
virtual ~AnalyticsFrameMeta()
deepstream::UserMetadata::UserMetadata
UserMetadata(void *)
Constructor through opaque data pointer.
deepstream::AnalyticsObjInfo::getRoiStatus
std::vector< std::string > getRoiStatus() const
Get the ROI status.
deepstream::DisplayMetadata::nRects
unsigned int nRects() const
Number of the rectangles.
deepstream::AbstractIterator::operator->
T * operator->()
Dereference the associated metadata as a pointer.
Definition: metadata.hpp:77
_NvOSD_CircleParams
Holds circle parameters to be overlayed.
Definition: nvll_osd_struct.h:224
deepstream::PreprocessTensorMetadata
Metadata for preprocessed tensor.
Definition: metadata.hpp:484
deepstream::TrackerPastFrameUserMetadata::TrackerPastFrameUserMetadata
TrackerPastFrameUserMetadata(void *data=nullptr)
deepstream::FrameMetadata::pipelineWidth
unsigned int pipelineWidth() const
Picture width of the pipeline.
deepstream::ObjectMetadata::setLabel
void setLabel(std::string)
deepstream::ObjectMetadata::setObjectId
void setObjectId(unsigned long)
deepstream::ObjectMetadata::maskParams
NvOSD_MaskParams & maskParams() const
Holds mask parameters for the object.
deepstream::RoiMetadata::initiateIterator
void initiateIterator(UserMetadata::Iterator &, int meta_type) const
Get the iterator for user metadata within it.
deepstream::DisplayMetadata::~DisplayMetadata
virtual ~DisplayMetadata()
Destructor.
deepstream::PreprocessBatchUserMetadata
User metadata for preprocess batch.
Definition: metadata.hpp:512
deepstream::ObjectMetadata::classId
unsigned int classId() const
Number to identify the class of the object.
deepstream::UserMetadataTemplate::get
C & get()
Definition: metadata.hpp:342
deepstream::ObjectMetadata::textParams
NvOSD_TextParams & textParams() const
Formated text description of the object, controlling osd display.
deepstream::PreprocessTensorMetadata::data_
void * data_
Definition: metadata.hpp:503
deepstream::FrameMetadata::sourceId
unsigned int sourceId() const
Identify the source of the frame, e.g.
deepstream::UserMetadata::~UserMetadata
virtual ~UserMetadata()
Destructor.
deepstream::TensorOutputUserMetadata::~TensorOutputUserMetadata
virtual ~TensorOutputUserMetadata()
deepstream::DisplayMetadata::nLabels
unsigned int nLabels() const
Number of the labels.
deepstream::TensorOutputUserMetadata::TensorOutputUserMetadata
TensorOutputUserMetadata(void *data=nullptr)
deepstream::DisplayMetadata::nCircles
unsigned int nCircles() const
Number of the circles.
deepstream::BatchMetadata::acquireUserMetadata_
UserMetadata acquireUserMetadata_(void *data, unsigned int type, void *(*copy)(void *, void *), void(*free)(void *, void *))
deepstream::ObjectMetadata::~ObjectMetadata
virtual ~ObjectMetadata()
Destructor.
deepstream::ObjectMetadata::uniqueComponentId
unsigned int uniqueComponentId() const
Number to identify the unique component that generates the metadata.
deepstream::AnalyticsObjInfo
Definition: metadata.hpp:567
deepstream::AnalyticsObjInfo::AnalyticsObjInfo
AnalyticsObjInfo(void *data=nullptr)
Constructor for AnalyticsObjInfo.
deepstream::TrackerPastFrameUserMetadata::~TrackerPastFrameUserMetadata
virtual ~TrackerPastFrameUserMetadata()
deepstream::EventMessageUserMetadata::~EventMessageUserMetadata
virtual ~EventMessageUserMetadata()
deepstream::AnalyticsFrameMeta::getObjLCCurrCnt
std::unordered_map< std::string, uint64_t > getObjLCCurrCnt() const
Map of total count of Line crossing in current frame for configured lines, which can be accessed usin...
deepstream::PreprocessTensorMetadata::PreprocessTensorMetadata
PreprocessTensorMetadata(void *data=nullptr)
deepstream::AbstractIterator::operator!=
bool operator!=(const AbstractIterator< T > &other) const
check if two iterator point to different position
Definition: metadata.hpp:92
deepstream::BatchMetadata::iterate
unsigned int iterate(const std::function< void(const FrameMetadata &)> &func) const
Iterate the frame metadata within it.
deepstream::ObjectMetadata::nvBboxInfo
NvBbox_Coords & nvBboxInfo() const
Bounding box of the object.
deepstream::ObjectMetadata::initiateIterator
void initiateIterator(ClassifierMetadata::Iterator &) const
Get the iterator for object metadata within it.
deepstream::ObjectImageFootLocationUserMetadata::ObjectImageFootLocationUserMetadata
ObjectImageFootLocationUserMetadata(void *data=nullptr)
deepstream::FrameMetadata::initiateIterator
void initiateIterator(ObjectMetadata::Iterator &) const
Get the iterator for object metadata within it.
_NvOSD_ArrowParams
Holds arrow parameters to be overlaid.
Definition: nvll_osd_struct.h:200
deepstream::DisplayMetadata::Iterator
std::unique_ptr< AbstractIterator< DisplayMetadata > > Iterator
Definition: metadata.hpp:374
deepstream::ObjectImageFootLocationUserMetadata
Definition: metadata.hpp:541
deepstream::FrameMetadata::sourceWidth
unsigned int sourceWidth() const
Picture width of the source.
deepstream::PreprocessTensorMetadata::getTensor
Tensor * getTensor() const
Get the tensor.
deepstream::DisplayMetadata::nArrows
unsigned int nArrows() const
Number of the arrows.
deepstream::EventMessageUserMetadata
User metadata for event message.
Definition: metadata.hpp:222
deepstream::Metadata
Metadata base class.
Definition: metadata.hpp:42
deepstream::AnalyticsObjInfo::getObjStatus
std::string getObjStatus() const
Get the object status.
deepstream::PreprocessBatchUserMetadata::getPreprocessTensorMetadata
PreprocessTensorMetadata getPreprocessTensorMetadata() const
Get the preprocess tensor metadata.
deepstream::PreprocessBatchUserMetadata::initPreprocessTensorMetadata
bool initPreprocessTensorMetadata(const std::string &name, unsigned int meta_id, unsigned int unique_id, Tensor *tensor)
Initialize a preprocess tensor metadata.
deepstream::UserMetadataTemplate
Template for customized user metadata.
Definition: metadata.hpp:335
deepstream::ObjectMetadata::setRectParams
void setRectParams(const NvOSD_RectParams &)
deepstream::FrameMetadata::FrameMetadata
FrameMetadata(void *data=nullptr)
Constructor through opaque data pointer.
deepstream::FrameMetadata::append
void append(const DisplayMetadata &)
Append display metadata to the frame.
deepstream::AbstractIterator::~AbstractIterator
virtual ~AbstractIterator()
Destructor.
Definition: metadata.hpp:71
deepstream::ObjectMetadata
Object metadata.
Definition: metadata.hpp:155
deepstream::TensorOutputUserMetadata::getLayers
std::unordered_map< std::string, Tensor * > getLayers()
get tensor output layers
deepstream::AnalyticsFrameMeta::getObjInROIcnt
std::unordered_map< std::string, uint32_t > getObjInROIcnt() const
Map of total count of valid objects in ROI for configured ROIs, which can be accessed using key,...
deepstream::ClassifierMetadata::~ClassifierMetadata
virtual ~ClassifierMetadata()
Destructor.
deepstream::RoiMetadata::objectMetadata
ObjectMetadata objectMetadata() const
Get the object metadata.
deepstream::RoiMetadata::iterate
unsigned int iterate(const std::function< void(const UserMetadata &)> &func, int meta_type) const
Iterate the user metadata within it.
deepstream::SegmentationUserMetadata::getClassProbabilitiesMap
const float * getClassProbabilitiesMap() const
Get the class probabilities map for the segmentation.
deepstream::TensorOutputUserMetadata
Definition: metadata.hpp:274
deepstream
Definition: buffer.hpp:33
deepstream::PreprocessBatchUserMetadata::~PreprocessBatchUserMetadata
virtual ~PreprocessBatchUserMetadata()
deepstream::ClassifierMetadata::nLabels
unsigned int nLabels() const
Number of the lables generated by the classifier.
deepstream::PreprocessBatchUserMetadata::PreprocessBatchUserMetadata
PreprocessBatchUserMetadata(void *data=nullptr)
deepstream::Metadata::~Metadata
virtual ~Metadata()
Destructor.
deepstream::TrackerPastFrameUserMetadata
Definition: metadata.hpp:559
deepstream::ObjectMetadata::setUniqueComponentId
void setUniqueComponentId(unsigned int)
deepstream::BatchMetadata::initiateIterator
void initiateIterator(FrameMetadata::Iterator &) const
Get the iterator for frame metadata within it.
deepstream::FrameMetadata::padIndex
unsigned int padIndex() const
Index of the pad from which the frame is generated.
deepstream::SegmentationUserMetadata::getClassMap
const int * getClassMap() const
Get the class map for the segmentation.
deepstream::AnalyticsFrameMeta
Definition: metadata.hpp:601
deepstream::DisplayMetadata::DisplayMetadata
DisplayMetadata(void *data=nullptr)
Constructor through opaque data pointer.
deepstream::BatchMetadata
Holds information about a formed batch containingframes from different sources.
Definition: metadata.hpp:652
deepstream::FrameMetadata::~FrameMetadata
virtual ~FrameMetadata()
Destructor.
deepstream::Metadata::Metadata
Metadata(void *data)
Constructor through an opqaue pinter.
deepstream::AbstractIterator::operator*
T & operator*()
Dereference the associated metadata.
Definition: metadata.hpp:74
deepstream::PreprocessTensorMetadata::getName
std::string getName() const
Get the name of the tensor.
deepstream::ObjectVisibilityUserMetadata::ObjectVisibilityUserMetadata
ObjectVisibilityUserMetadata(void *data=nullptr)
deepstream::BatchMetadata::~BatchMetadata
virtual ~BatchMetadata()
Destructor.
deepstream::ObjectMetadata::ObjectMetadata
ObjectMetadata(void *data=nullptr)
Constructor through opaque data pointer.
deepstream::AnalyticsObjInfo::getUniqueId
unsigned int getUniqueId() const
Get the unique identifier for this metadata.
deepstream::FrameMetadata::Iterator
std::unique_ptr< AbstractIterator< FrameMetadata > > Iterator
Definition: metadata.hpp:419
deepstream::SegmentationUserMetadata
A class to handle user metadata for segmentation.
Definition: metadata.hpp:294
deepstream::AnalyticsObjInfo::getDirStatus
std::string getDirStatus() const
Get the direction status.
deepstream::UserMetadata
Base class of user defined metadata.
Definition: metadata.hpp:101
deepstream::FrameMetadata::batchId
unsigned int batchId() const
Location the frame in the batch.
deepstream::BatchMetadata::append
void append(const FrameMetadata &)
Append a frame metadata to the batch.
deepstream::UserMetadataTemplate::copy
static void * copy(void *data, void *user_data)
Definition: metadata.hpp:348
deepstream::AbstractIterator::AbstractIterator
AbstractIterator(const T &data)
Construct an iterator for an iterable metadata.
Definition: metadata.hpp:68
deepstream::DisplayMetadata
Metadata for overlay display on a frame.
Definition: metadata.hpp:372
deepstream::UserMetadataTemplate::~UserMetadataTemplate
virtual ~UserMetadataTemplate()
Definition: metadata.hpp:339
deepstream::RoiMetadata::RoiMetadata
RoiMetadata(void *data=nullptr)
deepstream::ObjectVisibilityUserMetadata::~ObjectVisibilityUserMetadata
virtual ~ObjectVisibilityUserMetadata()
deepstream::FrameMetadata::ntpTimestamp
uint64_t ntpTimestamp() const
Holds the ntp timestamp.
deepstream::ObjectMetadata::setTextParams
void setTextParams(const NvOSD_TextParams &)
deepstream::SegmentationUserMetadata::SegmentationUserMetadata
SegmentationUserMetadata(void *data=nullptr)
Constructor for SegmentationUserMetadata.
deepstream::ObjectMetadata::label
std::string label() const
A string to describe the object class.
deepstream::ClassifierMetadata::uniqueComponentId
unsigned int uniqueComponentId() const
Identifying the unique component that generates the metadata.
deepstream::UserMetadataTemplate::UserMetadataTemplate
UserMetadataTemplate(const UserMetadata &other)
Definition: metadata.hpp:338
deepstream::ObjectMetadata::setNvBboxInfo
void setNvBboxInfo(const NvBbox_Coords &)
deepstream::PreprocessTensorMetadata::getMetaId
unsigned int getMetaId() const
Get the meta id of the tensor.
deepstream::ObjectImageFootLocationUserMetadata::getImageFootLocation
std::pair< float, float > getImageFootLocation() const
Get the image foot location of the object.
deepstream::SegmentationUserMetadata::getClasses
unsigned int getClasses() const
Get the number of classes in the segmentation.
_NvOSD_TextParams
Holds parameters of text to be overlayed.
Definition: nvll_osd_struct.h:115
deepstream::FrameMetadata::frameNum
int frameNum() const
Frame number.
deepstream::FrameMetadata::bufferPTS
uint64_t bufferPTS() const
Holds the presentation timestamp (PTS) of the frame.
deepstream::BatchMetadata::nFrames
unsigned int nFrames() const
Number of frames in the batch.
deepstream::Tensor
Definition: service-maker/includes/tensor.hpp:49
deepstream::AnalyticsObjInfo::getLcStatus
std::vector< std::string > getLcStatus() const
Get the line crossing status.
deepstream::RoiMetadata::~RoiMetadata
virtual ~RoiMetadata()
deepstream::AnalyticsFrameMeta::getUniqueId
unsigned int getUniqueId() const
Get the unique identifier for this metadata.
deepstream::SegmentationUserMetadata::uniqueId
unsigned int uniqueId() const
Get the unique identifier for this metadata.
deepstream::AnalyticsFrameMeta::getOcStatus
std::unordered_map< std::string, bool > getOcStatus() const
Map of boolean status of overcrowding for configured ROIs, which can be accessed using key,...
deepstream::ObjectVisibilityUserMetadata
Definition: metadata.hpp:531
_NvDsTargetMiscDataBatch
Batch of all streams of a given target misc output.
Definition: nvds_tracker_meta.h:105
deepstream::TrackerPastFrameUserMetadata::getTrackerMiscDataBatch
NvDsTargetMiscDataBatch * getTrackerMiscDataBatch() const
deepstream::Object3DBBoxUserMetadata::get3DBbox
NvDsObj3DBbox * get3DBbox() const
deepstream::ClassifierMetadata::Iterator
std::unique_ptr< AbstractIterator< ClassifierMetadata > > Iterator
Definition: metadata.hpp:128
deepstream::EventMessageUserMetadata::generate
void generate(const ObjectMetadata &, const FrameMetadata &, const std::string sensor="N/A", const std::string uri="N/A", const std::vector< std::string >labels=std::vector< std::string >())
generate an event by attaching an object
_NvDsObj3DBbox
Holds 3D bbox information for an object.
Definition: nvds_tracker_meta.h:169
deepstream::UserMetadata::get_
void get_(void *&)
deepstream::Metadata::data_
void * data_
Definition: metadata.hpp:54
deepstream::PreprocessBatchUserMetadata::getRois
std::vector< RoiMetadata > getRois() const
Get the roi list.
deepstream::RoiMetadata::rectParams
NvOSD_RectParams & rectParams() const
Get the region of interest.
deepstream::PreprocessTensorMetadata::~PreprocessTensorMetadata
virtual ~PreprocessTensorMetadata()
deepstream::Object3DBBoxUserMetadata::~Object3DBBoxUserMetadata
virtual ~Object3DBBoxUserMetadata()
deepstream::ObjectMetadata::setClassId
void setClassId(unsigned int)
deepstream::ClassifierMetadata::getLabel
std::string getLabel(unsigned int nth) const
Get the nth label.
deepstream::UserMetadataTemplate::free
static void free(void *data, void *user_data)
Definition: metadata.hpp:356
nvll_osd_struct.h
nvds_tracker_meta.h
deepstream::ClassifierMetadata::ClassifierMetadata
ClassifierMetadata(void *data=nullptr)
Constructor through opaque data pointer.
deepstream::AbstractIterator::get
T & get()
Directly access the associated metadata.
Definition: metadata.hpp:80
deepstream::FrameMetadata::pipelineHeight
unsigned int pipelineHeight() const
Picture height of the pipeline.
deepstream::ObjectMetadata::trackerConfidence
float trackerConfidence() const
Confidence level from tracker.
deepstream::FrameMetadata::iterate
unsigned int iterate(const std::function< void(const ObjectMetadata &)> &func) const
Iterate the object metadata within it.
deepstream::DisplayMetadata::nLines
unsigned int nLines() const
Number of the lines.
deepstream::SegmentationUserMetadata::getWidth
unsigned int getWidth() const
Get the width of the segmentation map.
deepstream::SegmentationUserMetadata::getHeight
unsigned int getHeight() const
Get the height of the segmentation map.
deepstream::Object3DBBoxUserMetadata
Definition: metadata.hpp:551
deepstream::BatchMetadata::acquire
bool acquire(DisplayMetadata &)
Initialize an empty display metadata.
deepstream::TensorOutputUserMetadata::uniqueId
unsigned int uniqueId() const
id for inference instance
deepstream::Object3DBBoxUserMetadata::Object3DBBoxUserMetadata
Object3DBBoxUserMetadata(void *data=nullptr)
deepstream::ObjectMetadata::confidence
float confidence() const
Confidence level.
deepstream::ObjectMetadata::rectParams
NvOSD_RectParams & rectParams() const
Bounding box of the object.
_NvBbox_Coords
Holds unclipped bounding box coordinates of the object.
Definition: nvll_osd_struct.h:66
deepstream::ObjectMetadata::setConfidence
void setConfidence(float)
deepstream::RoiMetadata
ROI metadata.
Definition: metadata.hpp:242
deepstream::AbstractIterator::next
virtual AbstractIterator< T > & next()=0
advances the iterator to access the next data
deepstream::AnalyticsObjInfo::getOcStatus
std::vector< std::string > getOcStatus() const
Get the overcrowding status.
deepstream::ObjectMetadata::setTrackerConfidence
void setTrackerConfidence(float)
deepstream::FrameMetadata
Holds information for a single frame.
Definition: metadata.hpp:417
deepstream::FrameMetadata::sourceHeight
unsigned int sourceHeight() const
Picture height of the source.
deepstream::UserMetadata::Iterator
std::unique_ptr< AbstractIterator< UserMetadata > > Iterator
Definition: metadata.hpp:103
deepstream::ObjectMetadata::setMaskParams
void setMaskParams(const NvOSD_MaskParams &)
deepstream::BatchMetadata::BatchMetadata
BatchMetadata(void *data=nullptr)
Constructor through opaque data pointer.
deepstream::DisplayMetadata::add
bool add(NvOSD_TextParams &)
Add a text label.