NVIDIA DeepStream SDK API Reference

6.4 Release
nvdstracker.h File Reference

Detailed Description

DeepStream object tracker API

Description: This file defines the DeepStream object tracker API.

Definition in file nvdstracker.h.

Go to the source code of this file.

Data Structures

struct  _NvMOTPerTransformBatchConfig
 Holds a configuration for batches for an input transform (a scaling/color conversion). More...
 
struct  _NvMOTMiscConfig
 Holds miscellaneous configurations. More...
 
struct  _NvMOTConfig
 Holds a tracker configuration. More...
 
struct  _NvMOTConfigResponse
 Holds a tracker's configuration status. More...
 
struct  _NvMOTRect
 Holds the definition of a rectangle. More...
 
struct  _NvMOTObjToTrack
 Holds information about an object to be tracked. More...
 
struct  _NvMOTObjToTrackList
 Holds a list of objects. More...
 
struct  _NvMOTFrame
 Holds a frame containing the image and objects to be tracked. More...
 
struct  _NvMOTTrackedObj
 Holds information about each tracked object. More...
 
struct  _NvMOTTrackedObjList
 Holds a list of tracked objects. More...
 
struct  _NvMOTTrackedObjBatch
 Holds a batch of lists of tracked objects. More...
 
struct  _NvMOTTrackerMiscData
 Tracker misc data. More...
 
struct  _NvMOTProcessParams
 Holds parameters for processing a batch. More...
 
struct  _NvMOTQuery
 

Macros

#define NVMOT_MAX_TRANSFORMS   4
 
#define NVMOTCOMP_GPU   0x01
 Compute target flags. More...
 
#define NVMOTCOMP_CPU   0x02
 Defines the "CPU" compute target flag. More...
 
#define NVMOTCOMP_PVA   0x04
 Defines the "PVA" compute target flag. More...
 
#define NVMOTCOMP_ANY   0xff
 Defines a compute target flag for "any target.". More...
 
#define NVMOTCOMP_DEFAULT   NVMOTCOMP_ANY
 Defines the compute target flag for the default target. More...
 

Typedefs

typedef uint64_t NvMOTStreamId
 
typedef uint8_t NvMOTCompute
 
typedef struct _NvMOTPerTransformBatchConfig NvMOTPerTransformBatchConfig
 Holds a configuration for batches for an input transform (a scaling/color conversion). More...
 
typedef struct _NvMOTMiscConfig NvMOTMiscConfig
 Holds miscellaneous configurations. More...
 
typedef struct _NvMOTConfig NvMOTConfig
 Holds a tracker configuration. More...
 
typedef struct _NvMOTConfigResponse NvMOTConfigResponse
 Holds a tracker's configuration status. More...
 
typedef struct _NvMOTRect NvMOTRect
 Holds the definition of a rectangle. More...
 
typedef struct _NvMOTObjToTrack NvMOTObjToTrack
 Holds information about an object to be tracked. More...
 
typedef struct _NvMOTObjToTrackList NvMOTObjToTrackList
 Holds a list of objects. More...
 
typedef struct _NvMOTFrame NvMOTFrame
 Holds a frame containing the image and objects to be tracked. More...
 
typedef struct _NvMOTTrackedObj NvMOTTrackedObj
 Holds information about each tracked object. More...
 
typedef struct _NvMOTTrackedObjList NvMOTTrackedObjList
 Holds a list of tracked objects. More...
 
typedef struct _NvMOTTrackedObjBatch NvMOTTrackedObjBatch
 Holds a batch of lists of tracked objects. More...
 
typedef struct _NvMOTTrackerMiscData NvMOTTrackerMiscData
 Tracker misc data. More...
 
typedef struct _NvMOTProcessParams NvMOTProcessParams
 Holds parameters for processing a batch. More...
 
typedef struct _NvMOTQuery NvMOTQuery
 
typedef struct NvMOTContext * NvMOTContextHandle
 

Enumerations

enum  NvMOTConfigStatus {
  NvMOTConfigStatus_OK,
  NvMOTConfigStatus_Error,
  NvMOTConfigStatus_Invalid,
  NvMOTConfigStatus_Unsupported
}
 Defines configuration request return codes. More...
 
enum  NvMOTBatchMode {
  NvMOTBatchMode_Error = 0,
  NvMOTBatchMode_Batch = 1 << 0,
  NvMOTBatchMode_NonBatch = 1 << 1,
  NvMOTBatchMode_MaxValue = 3
}
 
enum  NvMOTStatus {
  NvMOTStatus_OK,
  NvMOTStatus_Error,
  NvMOTStatus_Invalid_Path
}
 Defines generic status codes for tracking operations. More...
 

Functions

NvMOTStatus NvMOT_Init (NvMOTConfig *pConfigIn, NvMOTContextHandle *pContextHandle, NvMOTConfigResponse *pConfigResponse)
 Initializes a tracking context for a batch of one or more image streams. More...
 
void NvMOT_DeInit (NvMOTContextHandle contextHandle)
 Deinitializes a stream context. More...
 
NvMOTStatus NvMOT_Process (NvMOTContextHandle contextHandle, NvMOTProcessParams *pParams, NvMOTTrackedObjBatch *pTrackedObjectsBatch)
 Processes a batch. More...
 
NvMOTStatus NvMOT_RetrieveMiscData (NvMOTContextHandle contextHandle, NvMOTProcessParams *pParams, NvMOTTrackerMiscData *pTrackerMiscData)
 Process the past-frame data in the low-level tracker lib and retrieve. More...
 
NvMOTStatus NvMOT_Query (uint16_t customConfigFilePathSize, char *pCustomConfigFilePath, NvMOTQuery *pQuery)
 Query tracker lib capabilities and requirements. More...
 
NvMOTStatus NvMOT_RemoveStreams (NvMOTContextHandle contextHandle, NvMOTStreamId streamIdMask)
 Removes streams from a batch. More...
 

Typedef Documentation

◆ NvMOTCompute

typedef uint8_t NvMOTCompute

Definition at line 62 of file nvdstracker.h.

◆ NvMOTConfig

typedef struct _NvMOTConfig NvMOTConfig

Holds a tracker configuration.

Holds configuration options for the tracker, applied to the whole context.

Note
This structure must be deep-copied to be passed to a component that is to use it persistently.

◆ NvMOTConfigResponse

Holds a tracker's configuration status.

Holds the status of a configuration request; includes both summary and per-configuration status.

◆ NvMOTContextHandle

typedef struct NvMOTContext* NvMOTContextHandle

Definition at line 418 of file nvdstracker.h.

◆ NvMOTFrame

typedef struct _NvMOTFrame NvMOTFrame

Holds a frame containing the image and objects to be tracked.

Note
numBuffers is supposed to be less than or equal to numTransforms in NvMOTConfig.
The metadata in the NvBufSurfaceParams structures which bufferList points to must be checked with the parameters specified in perTransformBatchConfig in NvMOTConfig.

◆ NvMOTMiscConfig

Holds miscellaneous configurations.

◆ NvMOTObjToTrack

Holds information about an object to be tracked.

NvMOT creates an instance of this structure for each tracked object.

◆ NvMOTObjToTrackList

Holds a list of objects.

◆ NvMOTPerTransformBatchConfig

Holds a configuration for batches for an input transform (a scaling/color conversion).

◆ NvMOTProcessParams

Holds parameters for processing a batch.

See also
NvMOTProcessFrame.

◆ NvMOTQuery

typedef struct _NvMOTQuery NvMOTQuery

◆ NvMOTRect

typedef struct _NvMOTRect NvMOTRect

Holds the definition of a rectangle.

◆ NvMOTTrackedObj

Holds information about each tracked object.

◆ NvMOTTrackedObjBatch

Holds a batch of lists of tracked objects.

◆ NvMOTTrackedObjList

Holds a list of tracked objects.

◆ NvMOTTrackerMiscData

Tracker misc data.

Enumeration Type Documentation

◆ NvMOTBatchMode

Enumerator
NvMOTBatchMode_Error 

Unsupported batch mode.

At least either batch or non-batch should be supported.

NvMOTBatchMode_Batch 

Batch processing mode.

NvMOTBatchMode_NonBatch 

Non-batch processing mode.

NvMOTBatchMode_MaxValue 

Max value of the enum.

All bits are 1.

Definition at line 144 of file nvdstracker.h.

◆ NvMOTConfigStatus

Defines configuration request return codes.

Enumerator
NvMOTConfigStatus_OK 
NvMOTConfigStatus_Error 
NvMOTConfigStatus_Invalid 
NvMOTConfigStatus_Unsupported 

Definition at line 136 of file nvdstracker.h.

◆ NvMOTStatus

Defines generic status codes for tracking operations.

Enumerator
NvMOTStatus_OK 
NvMOTStatus_Error 
NvMOTStatus_Invalid_Path 

Definition at line 180 of file nvdstracker.h.

Function Documentation

◆ NvMOT_DeInit()

void NvMOT_DeInit ( NvMOTContextHandle  contextHandle)

Deinitializes a stream context.

The specified context is retired and may not be used again.

Parameters
contextHandleThe handle for the stream context to be retired.

◆ NvMOT_Init()

NvMOTStatus NvMOT_Init ( NvMOTConfig pConfigIn,
NvMOTContextHandle pContextHandle,
NvMOTConfigResponse pConfigResponse 
)

Initializes a tracking context for a batch of one or more image streams.

If successful, the context is configured as specified by pConfigIn.

Parameters
[in]pConfigInA pointer to to a structure specifying the configuration.
[out]pContextHandleA pointer to a handle for the stream context. The stream context is created and owned by the tracker. The returned context handle must be included in all subsequent calls for the specified stream.
[out]pConfigResponseA pointer to a structure that describes the operation's status.
Returns
The outcome of the initialization attempt.

◆ NvMOT_Process()

NvMOTStatus NvMOT_Process ( NvMOTContextHandle  contextHandle,
NvMOTProcessParams pParams,
NvMOTTrackedObjBatch pTrackedObjectsBatch 
)

Processes a batch.

Given a context and a batch of frames, processes the batch as the current frames in their respective streams. Once processed, each frame becomes part of the history and the previous frame in its stream.

Parameters
[in]contextHandleA context handle obtained from NvMOTInit().
[in]pParamsA pointer to parameters for the batch to be processed.
[out]pTrackedObjectsBatchA pointer to a batch of lists of tracked object slots to be filled by the tracker. The batch is allocated by the client. Bounding boxes are scaled to the resolution of the first input image transform buffer.
Returns
The status of batch processing.

◆ NvMOT_Query()

NvMOTStatus NvMOT_Query ( uint16_t  customConfigFilePathSize,
char *  pCustomConfigFilePath,
NvMOTQuery pQuery 
)

Query tracker lib capabilities and requirements.

Answer query for this tracker lib's capabilities and requirements. The tracker's custom config file is provided for optional consultation.

Parameters
[in]customConfigFilePathSizeLength of the custom configuration file's pathname.
[in]pCustomConfigFilePathA pointer to the custom configuration file's pathname.
[out]pQueryA pointer to a query structure to be filled by the tracker.
Returns
Status of the query.

◆ NvMOT_RemoveStreams()

NvMOTStatus NvMOT_RemoveStreams ( NvMOTContextHandle  contextHandle,
NvMOTStreamId  streamIdMask 
)

Removes streams from a batch.

An optional function used in batch processing mode only. It notifies the tracker library that a stream has been removed, and will not be present in future batches. Any per-stream resources associated with the removed stream may be freed at this time.

This function may be called only when all processing is quiesced.

Parameters
[in]contextHandleThe context handle obtained from NvMOTInit().
[in]streamIdMaskA mask for finding streams to remove. The function reports removal of all streams where (streamId & streamIdMask) == streamIdMask.
Returns
Status of stream removal.

◆ NvMOT_RetrieveMiscData()

NvMOTStatus NvMOT_RetrieveMiscData ( NvMOTContextHandle  contextHandle,
NvMOTProcessParams pParams,
NvMOTTrackerMiscData pTrackerMiscData 
)

Process the past-frame data in the low-level tracker lib and retrieve.

Given a context and batch of frame(s), process the past-frame data of each tracked object stored in the low-level tracker lib , put it into the past-frame data strcture, and retrieve it

Parameters
[in]pContextThe context handle obtained from NvMOTInit()
[in]pParamsPointer to parameters for the batch of frames with the available stream ID
[out]pTrackerMiscDataMisc data from low level tracker to store in user meta
Returns
Status of batch processing