NVIDIA DeepStream SDK API Reference

9.1 Release
sources/includes/nvdsmotmetafusion.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: Copyright (c) 2025-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 
34 #ifndef _NVMOTRACKERMETAFUSER_H_
35 #define _NVMOTRACKERMETAFUSER_H_
36 
37 #include <stdint.h>
38 #include <time.h>
39 
40 #include "nvbufsurface.h"
41 #include "nvds_tracker_meta.h"
42 #include <vector>
43 
44 #ifdef __cplusplus
45 extern "C"
46 {
47 #endif
48 
49 
50 typedef uint64_t NvMOTObjectId;
51 typedef uint32_t NvMOTFrameNum;
52 // <object id, <frame_num, offset in reid array>>
53 typedef std::map<NvMOTObjectId, std::map<NvMOTFrameNum, uint32_t>> NvMOTReidEmbeddingsList;
54 typedef std::map<NvMOTObjectId, NvMOTObjectId> NvMOTMFObjectIdMap;
55 
56 typedef struct _NvMOTMFConfig
57 {
59  uint32_t frameWidth;
60  uint32_t frameHeight;
69 
73 typedef enum
74 {
80 
87 typedef struct _NvMOTMFConfigResponse
88 {
101 
102 
103 typedef enum
104 {
108 } NvMOTMFStatus;
109 
114 {
118 
123 {
127  uint32_t chunkDuration;
135 
136 
140 struct NvMOTMFContext;
141 typedef struct NvMOTMFContext* NvMOTMFContextHandle;
142 
143 typedef struct _NvMOTMFQuery
144 {
148  uint32_t reidFeatureSize;
150  uint32_t reidHistorySize;
153 } NvMOTMFQuery;
154 
173  NvMOTMFContextHandle *pContextHandle,
174  NvMOTMFConfigResponse *pConfigResponse);
175 
183 void NvMOTMF_DeInit(NvMOTMFContextHandle contextHandle);
184 
198  NvMOTMFTrackedObjMeta *pVideoChunk,
199  NvMOTMFObjectIdMap &ipOpObjectIdMap);
200 
214  NvMOTMFTrackerFusedData *pTrackerMiscData, bool eos);
215 
226 
227  // end of API group
229 
230 #ifdef __cplusplus
231 }
232 #endif
233 
234 #endif
NvMOTMFQuery
struct _NvMOTMFQuery NvMOTMFQuery
_NvMOTMFConfigResponse::transformBatchStatus
NvMOTMFConfigStatus transformBatchStatus
Holds the transform batch configuration request status: summary status for all transforms.
Definition: sources/includes/nvdsmotmetafusion.h:95
_NvMOTMFConfigResponse
Holds a tracker's configuration status.
Definition: sources/includes/nvdsmotmetafusion.h:87
_NvDsTargetMiscDataStream
All misc targets data for a given stream.
Definition: sources/includes/nvds_tracker_meta.h:96
NvMOTMFTrackerFusedData
struct _NvMOTMFTrackerFusedData NvMOTMFTrackerFusedData
Tracker misc data.
_NvMOTMFConfig::customConfigFilePath
char * customConfigFilePath
A pointer to the pathname of the tracker's custom configuration file.
Definition: sources/includes/nvdsmotmetafusion.h:67
_NvMOTMFConfigResponse::miscConfigStatus
NvMOTMFConfigStatus miscConfigStatus
Holds the status of the miscellaneous configurations.
Definition: sources/includes/nvdsmotmetafusion.h:97
NvMOTMF_Init
NvMOTMFStatus NvMOTMF_Init(NvMOTMFConfig *pConfigIn, NvMOTMFContextHandle *pContextHandle, NvMOTMFConfigResponse *pConfigResponse)
Initializes the fusion context.
_NvMOTMFTrackedObjMeta::reidTensorChunk
NvDsReidTensorBatch reidTensorChunk
The whole chunk's reid embeddings in a sigle vector pointed to by "ptr_host".
Definition: sources/includes/nvdsmotmetafusion.h:131
NvMOTMFConfigResponse
struct _NvMOTMFConfigResponse NvMOTMFConfigResponse
Holds a tracker's configuration status.
NvMOTMFStatus
NvMOTMFStatus
Definition: sources/includes/nvdsmotmetafusion.h:103
NvMOTObjectId
uint64_t NvMOTObjectId
Definition: sources/includes/nvdsmotmetafusion.h:50
_NvMOTMFQuery::contextHandle
NvMOTMFContextHandle contextHandle
Hold the context handle.
Definition: sources/includes/nvdsmotmetafusion.h:152
_NvMOTMFTrackedObjMeta::reidEmbeddingsList
NvMOTReidEmbeddingsList reidEmbeddingsList
Offset of Reid Embeddings per object.
Definition: sources/includes/nvdsmotmetafusion.h:133
_NvMOTMFTrackedObjMeta::chunkDuration
uint32_t chunkDuration
Holds the duration of the chunk in number of frames.
Definition: sources/includes/nvdsmotmetafusion.h:127
NvMOTMFConfigStatus_Invalid
@ NvMOTMFConfigStatus_Invalid
Definition: sources/includes/nvdsmotmetafusion.h:77
_NvMOTMFTrackerFusedData::pFusedTracksStream
NvDsTargetMiscDataStream * pFusedTracksStream
Holds the history of terminated tracks.
Definition: sources/includes/nvdsmotmetafusion.h:116
NvMOTMF_Process
NvMOTMFStatus NvMOTMF_Process(NvMOTMFContextHandle contextHandle, NvMOTMFTrackedObjMeta *pVideoChunk, NvMOTMFObjectIdMap &ipOpObjectIdMap)
Processes a video chunk.
NvMOTMFTrackedObjMeta
struct _NvMOTMFTrackedObjMeta NvMOTMFTrackedObjMeta
Holds all the input metadata of a video chunk to be processed.
NvMOTFrameNum
uint32_t NvMOTFrameNum
Definition: sources/includes/nvdsmotmetafusion.h:51
nvbufsurface.h
_NvMOTMFTrackedObjMeta::tracklets
NvDsTargetMiscDataStream * tracklets
Tracklets per object.
Definition: sources/includes/nvdsmotmetafusion.h:129
NvMOTMFConfigStatus_Unsupported
@ NvMOTMFConfigStatus_Unsupported
Definition: sources/includes/nvdsmotmetafusion.h:78
NvMOTMFConfigStatus
NvMOTMFConfigStatus
Defines configuration request return codes.
Definition: sources/includes/nvdsmotmetafusion.h:73
NvMOTMFContextHandle
struct NvMOTMFContext * NvMOTMFContextHandle
Definition: sources/includes/nvdsmotmetafusion.h:141
NvMOTMFStatus_OK
@ NvMOTMFStatus_OK
Definition: sources/includes/nvdsmotmetafusion.h:105
_NvMOTMFTrackedObjMeta
Holds all the input metadata of a video chunk to be processed.
Definition: sources/includes/nvdsmotmetafusion.h:122
_NvMOTMFTrackedObjMeta::startFrameNumber
uint32_t startFrameNumber
Holds the relative frame number of the first frame in this video chunk w.r.t.
Definition: sources/includes/nvdsmotmetafusion.h:125
NvMOTMFStatus_Invalid_Path
@ NvMOTMFStatus_Invalid_Path
Definition: sources/includes/nvdsmotmetafusion.h:107
_NvMOTMFQuery
Definition: sources/includes/nvdsmotmetafusion.h:143
_NvMOTMFConfigResponse::customConfigStatus
NvMOTMFConfigStatus customConfigStatus
Holds the status of the custom configurations.
Definition: sources/includes/nvdsmotmetafusion.h:99
nvds_tracker_meta.h
_NvMOTMFConfig::maxVideoChunkLength
uint32_t maxVideoChunkLength
Holds the maximum possible length of a video chunk
Definition: sources/includes/nvdsmotmetafusion.h:62
NvMOTMFConfigStatus_Error
@ NvMOTMFConfigStatus_Error
Definition: sources/includes/nvdsmotmetafusion.h:76
_NvMOTMFConfigResponse::computeStatus
NvMOTMFConfigStatus computeStatus
Holds the compute target request status.
Definition: sources/includes/nvdsmotmetafusion.h:92
_NvMOTMFConfig::frameWidth
uint32_t frameWidth
Width and height of the video frame.
Definition: sources/includes/nvdsmotmetafusion.h:59
_NvMOTMFConfigResponse::summaryStatus
NvMOTMFConfigStatus summaryStatus
Holds the summary status of the entire configuration request.
Definition: sources/includes/nvdsmotmetafusion.h:90
NvMOTReidEmbeddingsList
std::map< NvMOTObjectId, std::map< NvMOTFrameNum, uint32_t > > NvMOTReidEmbeddingsList
Definition: sources/includes/nvdsmotmetafusion.h:53
_NvMOTMFQuery::maxTargetsPerStream
uint32_t maxTargetsPerStream
Holds maximum number of targets per stream.
Definition: sources/includes/nvdsmotmetafusion.h:146
_NvMOTMFQuery::reidHistorySize
uint32_t reidHistorySize
Reid history size.
Definition: sources/includes/nvdsmotmetafusion.h:150
NvMOTMFConfig
struct _NvMOTMFConfig NvMOTMFConfig
NvMOTMF_DeInit
void NvMOTMF_DeInit(NvMOTMFContextHandle contextHandle)
Deinitializes fusion context.
NvMOTMF_Query
NvMOTMFStatus NvMOTMF_Query(NvMOTMFQuery *pQuery)
Query metadata fusion lib capabilities and requirements.
_NvMOTMFConfig
Definition: sources/includes/nvdsmotmetafusion.h:56
_NvMOTMFConfig::customConfigFilePathSize
uint16_t customConfigFilePathSize
Holds the length of customConfigFilePath.
Definition: sources/includes/nvdsmotmetafusion.h:64
NvMOTMFStatus_Error
@ NvMOTMFStatus_Error
Definition: sources/includes/nvdsmotmetafusion.h:106
NvMOTMF_RetrieveFusedData
NvMOTMFStatus NvMOTMF_RetrieveFusedData(NvMOTMFContextHandle contextHandle, NvMOTMFTrackerFusedData *pTrackerMiscData, bool eos)
Retrieve the fused data.
_NvMOTMFQuery::reidFeatureSize
uint32_t reidFeatureSize
Reid feature size.
Definition: sources/includes/nvdsmotmetafusion.h:148
NvMOTMFConfigStatus_OK
@ NvMOTMFConfigStatus_OK
Definition: sources/includes/nvdsmotmetafusion.h:75
NvMOTMFObjectIdMap
std::map< NvMOTObjectId, NvMOTObjectId > NvMOTMFObjectIdMap
Definition: sources/includes/nvdsmotmetafusion.h:54
_NvDsReidTensorBatch
ReID tensor of the batch.
Definition: sources/includes/nvds_tracker_meta.h:128
_NvMOTMFTrackerFusedData
Tracker misc data.
Definition: sources/includes/nvdsmotmetafusion.h:113
_NvMOTMFConfig::frameHeight
uint32_t frameHeight
Definition: sources/includes/nvdsmotmetafusion.h:60