NVIDIA DeepStream SDK API Reference

9.2 Release
sources/libs/nvmultiobjecttracker/include/modules/NvMultiObjectTracker/localizer.hpp
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
3  * SPDX-License-Identifier: Apache-2.0
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  */
17 #ifndef NVMULTIOBJECTTRACKERLIB_NVTLOCALIZER_H
18 #define NVMULTIOBJECTTRACKERLIB_NVTLOCALIZER_H
19 
20 #include <map>
21 #include <set>
22 #include <memory>
23 
24 #include "modules/utility/dataTypes.hpp"
25 
26 #include "nvdstracker.h"
27 #include "nvds_tracker_meta.h"
28 
31 {
32 public:
35 
37  virtual ~IBatchLocalizer() {};
38 
40  virtual bool isInitialized() = 0;
41 
47  virtual void initialize(const NvMotDataTypes::Size srcImgSize, const size_t srcImgPitch) = 0;
48 
53  virtual void queryParams(NvMOTQuery &paramsQuery) = 0;
54 
60  virtual void update(
61  const std::map<NvMOTStreamId, NvMOTFrame*> &nvFramesInBatch, NvMOTTrackedObjBatch *&pTrackedObjectsBatch
62  ) = 0;
63 
69  virtual void outputPastFrameObjs(
70  const std::set<NvMOTStreamId> videoStreamIdList, NvDsTargetMiscDataBatch *&pPastFrameObjBatch
71  ) = 0;
72 
78  virtual void outputTerminatedObjs(
79  const std::set<NvMOTStreamId> videoStreamIdList, NvDsTargetMiscDataBatch *&pPastFrameObjBatch
80  ) = 0;
81 
87  virtual void outputShadowObj(
88  const std::set<NvMOTStreamId> videoStreamIdList, NvDsTargetMiscDataBatch *&pShadowTracksBatch
89  ) = 0;
90 
95  virtual void deleteRemovedStreamTrackers(const NvMOTStreamId videoStreamID) = 0;
96 
101  virtual void updateParams(const std::string &configStr) = 0;
102 
103 protected:
104 };
105 
106 #endif // NVMULTIOBJECTTRACKERLIB_NVTLOCALIZER_H
IBatchLocalizer::queryParams
virtual void queryParams(NvMOTQuery &paramsQuery)=0
Populate tracker capability and memory requirement fields.
IBatchLocalizer
Defines batched multi-stream tracker operations.
Definition: sources/libs/nvmultiobjecttracker/include/modules/NvMultiObjectTracker/localizer.hpp:30
IBatchLocalizer::update
virtual void update(const std::map< NvMOTStreamId, NvMOTFrame * > &nvFramesInBatch, NvMOTTrackedObjBatch *&pTrackedObjectsBatch)=0
Perform tracking.
IBatchLocalizer::deleteRemovedStreamTrackers
virtual void deleteRemovedStreamTrackers(const NvMOTStreamId videoStreamID)=0
Delete trackers and per-stream resources when a stream is removed.
IBatchLocalizer::outputTerminatedObjs
virtual void outputTerminatedObjs(const std::set< NvMOTStreamId > videoStreamIdList, NvDsTargetMiscDataBatch *&pPastFrameObjBatch)=0
Output complete frame history for terminated tracks and clear the buffer.
_NvMOTTrackedObjBatch
Holds a batch of lists of tracked objects.
Definition: includes/nvdstracker.h:375
IBatchLocalizer::initialize
virtual void initialize(const NvMotDataTypes::Size srcImgSize, const size_t srcImgPitch)=0
Initialize the batch localizer for the tracker input surface.
IBatchLocalizer::updateParams
virtual void updateParams(const std::string &configStr)=0
Apply supported runtime tracker configuration updates.
NvMOTStreamId
uint64_t NvMOTStreamId
Definition: includes/nvdstracker.h:53
IBatchLocalizer::outputPastFrameObjs
virtual void outputPastFrameObjs(const std::set< NvMOTStreamId > videoStreamIdList, NvDsTargetMiscDataBatch *&pPastFrameObjBatch)=0
Output past-frame tracking data and clear the corresponding buffers.
_NvMOTQuery
Holds the capabilities and requirements reported by the tracker library.
Definition: includes/nvdstracker.h:420
IBatchLocalizer::IBatchLocalizer
IBatchLocalizer()
Initialize the batch-localizer interface.
Definition: sources/libs/nvmultiobjecttracker/include/modules/NvMultiObjectTracker/localizer.hpp:34
_NvDsTargetMiscDataBatch
Batch of all streams of a given target misc output.
Definition: includes/nvds_tracker_meta.h:113
IBatchLocalizer::isInitialized
virtual bool isInitialized()=0
Report whether the batch localizer is initialized.
NvMotDataTypes::Size
Represents a two-dimensional integer size.
Definition: sources/libs/nvmultiobjecttracker/include/modules/utility/dataTypes.hpp:52
IBatchLocalizer::outputShadowObj
virtual void outputShadowObj(const std::set< NvMOTStreamId > videoStreamIdList, NvDsTargetMiscDataBatch *&pShadowTracksBatch)=0
Output the most recent frame for current shadow tracks and clear the buffer.
nvdstracker.h
IBatchLocalizer::~IBatchLocalizer
virtual ~IBatchLocalizer()
Release the batch-localizer interface.
Definition: sources/libs/nvmultiobjecttracker/include/modules/NvMultiObjectTracker/localizer.hpp:37