NVIDIA DeepStream SDK API Reference

4.0 Release

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Groups
Object Tracker API

Detailed Description

Defines the DeepStream object tracker API.

Data Structures

struct  _NvMOTPerTransformBatchConfig
 Configuration for batches for each input transform (scaling/color conversion) More...
 
struct  _NvMOTMiscConfig
 Miscellaneous configurations. More...
 
struct  _NvMOTConfig
 Tracker configuration. More...
 
struct  _NvMOTConfigResponse
 Tracker configuration status. More...
 
struct  _NvMOTRect
 Rectangle. More...
 
struct  _NvMOTObjToTrack
 Information for each object to be tracked. More...
 
struct  _NvMOTObjToTrackList
 List of objects. More...
 
struct  _NvMOTFrame
 Frame containing the image and objects to be tracked. More...
 
struct  _NvMOTTrackedObj
 Information for each tracked object. More...
 
struct  _NvMOTTrackedObjList
 List of tracked objects. More...
 
struct  _NvMOTTrackedObjBatch
 Batch of lists of tracked objects. More...
 
struct  _NvMOTProcessParams
 Parameters for processing each batch. More...
 
struct  _NvMOTQuery
 

Macros

#define NVMOT_MAX_TRANSFORMS   4
 
#define NVMOTCOMP_GPU   0x01
 Compute target flags. More...
 
#define NVMOTCOMP_CPU   0x02
 
#define NVMOTCOMP_PVA   0x04
 
#define NVMOTCOMP_ANY   0xff
 
#define NVMOTCOMP_DEFAULT   NVMOTCOMP_ANY
 

Typedefs

typedef uint64_t NvMOTStreamId
 
typedef uint8_t NvMOTCompute
 
typedef struct
_NvMOTPerTransformBatchConfig 
NvMOTPerTransformBatchConfig
 Configuration for batches for each input transform (scaling/color conversion) More...
 
typedef struct _NvMOTMiscConfig NvMOTMiscConfig
 Miscellaneous configurations. More...
 
typedef struct _NvMOTConfig NvMOTConfig
 Tracker configuration. More...
 
typedef struct _NvMOTConfigResponse NvMOTConfigResponse
 Tracker configuration status. More...
 
typedef struct _NvMOTRect NvMOTRect
 Rectangle. More...
 
typedef struct _NvMOTObjToTrack NvMOTObjToTrack
 Information for each object to be tracked. More...
 
typedef struct _NvMOTObjToTrackList NvMOTObjToTrackList
 List of objects. More...
 
typedef struct _NvMOTFrame NvMOTFrame
 Frame containing the image and objects to be tracked. More...
 
typedef struct _NvMOTTrackedObj NvMOTTrackedObj
 Information for each tracked object. More...
 
typedef struct _NvMOTTrackedObjList NvMOTTrackedObjList
 List of tracked objects. More...
 
typedef struct
_NvMOTTrackedObjBatch 
NvMOTTrackedObjBatch
 Batch of lists of tracked objects. More...
 
typedef struct _NvMOTProcessParams NvMOTProcessParams
 Parameters for processing each batch. More...
 
typedef struct _NvMOTQuery NvMOTQuery
 
typedef struct NvMOTContext * NvMOTContextHandle
 

Enumerations

enum  NvMOTConfigStatus {
  NvMOTConfigStatus_OK,
  NvMOTConfigStatus_Error,
  NvMOTConfigStatus_Invalid,
  NvMOTConfigStatus_Unsupported
}
 Configuration request return status. More...
 
enum  NvMOTStatus {
  NvMOTStatus_OK,
  NvMOTStatus_Error,
  NvMOTStatus_Invalid_Path
}
 Generic status for tracking operations. More...
 

Functions

NvMOTStatus NvMOT_Init (NvMOTConfig *pConfigIn, NvMOTContextHandle *pContextHandle, NvMOTConfigResponse *pConfigResponse)
 Initialize tracking context for a batch. More...
 
void NvMOT_DeInit (NvMOTContextHandle contextHandle)
 De-initialize a stream context. More...
 
NvMOTStatus NvMOT_Process (NvMOTContextHandle contextHandle, NvMOTProcessParams *pParams, NvMOTTrackedObjBatch *pTrackedObjectsBatch)
 Process a batch. More...
 
NvMOTStatus NvMOT_Query (uint16_t customConfigFilePathSize, char *pCustomConfigFilePath, NvMOTQuery *pQuery)
 Query tracker lib capabilities and requirements. More...
 
void NvMOT_RemoveStreams (NvMOTContextHandle contextHandle, NvMOTStreamId streamIdMask)
 Optional handler for removing streams from a batch. More...
 

Macro Definition Documentation

#define NVMOT_MAX_TRANSFORMS   4

Definition at line 41 of file nvdstracker.h.

#define NVMOTCOMP_ANY   0xff

Definition at line 54 of file nvdstracker.h.

#define NVMOTCOMP_CPU   0x02

Definition at line 52 of file nvdstracker.h.

#define NVMOTCOMP_DEFAULT   NVMOTCOMP_ANY

Definition at line 55 of file nvdstracker.h.

#define NVMOTCOMP_GPU   0x01

Compute target flags.

Multiple targets can be selected, and the tracker will optimize across them. Combinations are allowed, e.g. NVTCOMP_GPU or NVTCOMP_PVA

Definition at line 51 of file nvdstracker.h.

#define NVMOTCOMP_PVA   0x04

Definition at line 53 of file nvdstracker.h.

Typedef Documentation

typedef uint8_t NvMOTCompute

Definition at line 56 of file nvdstracker.h.

typedef struct _NvMOTConfig NvMOTConfig

Tracker configuration.

Configuration options for the tracker, applied to the whole context.

Note
This config is supposed to be deep-copied when passed to be used persistently

Tracker configuration status.

Status of configuration request, both summary and per-config status.

typedef struct NvMOTContext* NvMOTContextHandle

Definition at line 255 of file nvdstracker.h.

typedef struct _NvMOTFrame NvMOTFrame

Frame containing the image and objects to be tracked.

Note
numBuffers in NvMOTFrame is supposed to be smaller or equal to numTransforms in NvMOTConfig
the metadata in NvBufSurfaceParams of each bufferList in NvMOTFrame should be checked with the params specified in perTransformBatchConfig in NvMOTConfig

Miscellaneous configurations.

Information for each object to be tracked.

List of objects.

Configuration for batches for each input transform (scaling/color conversion)

Parameters for processing each batch.

See NvMOTProcessFrame

typedef struct _NvMOTQuery NvMOTQuery
typedef struct _NvMOTRect NvMOTRect

Rectangle.

typedef uint64_t NvMOTStreamId

Definition at line 43 of file nvdstracker.h.

Information for each tracked object.

Batch of lists of tracked objects.

List of tracked objects.

Enumeration Type Documentation

Configuration request return status.

Enumerator
NvMOTConfigStatus_OK 
NvMOTConfigStatus_Error 
NvMOTConfigStatus_Invalid 
NvMOTConfigStatus_Unsupported 

Definition at line 107 of file nvdstracker.h.

Generic status for tracking operations.

Enumerator
NvMOTStatus_OK 
NvMOTStatus_Error 
NvMOTStatus_Invalid_Path 

Definition at line 132 of file nvdstracker.h.

Function Documentation

void NvMOT_DeInit ( NvMOTContextHandle  contextHandle)

De-initialize a stream context.

The specified context will be retired and never used again.

Parameters
contextHandleThe context handle for the stream context to be retired.
NvMOTStatus NvMOT_Init ( NvMOTConfig pConfigIn,
NvMOTContextHandle pContextHandle,
NvMOTConfigResponse pConfigResponse 
)

Initialize tracking context for a batch.

Initialize the tracking context for a batch of one or more image streams. If successful, the context is configured per the specified config requests. All future operations on the batch must contain the provided context pointer.

Parameters
[in]pConfigInA pointer to the requested configuration.
[out]pContextHandleA pointer to a stream context handle. The tracker allocates and owns the stream context. The returned context handle is to be included in all subsequent calls for the specified stream, until NvMOTDeInit is called on it.
[out]pConfigResponsePointer to configuration status
Returns
The status of the initialization attempt, one of NVTSTATUS_*.
NvMOTStatus NvMOT_Process ( NvMOTContextHandle  contextHandle,
NvMOTProcessParams pParams,
NvMOTTrackedObjBatch pTrackedObjectsBatch 
)

Process a batch.

Given a context and batch of frame(s), process the batch as the current frame(s) in their respective streams. Once processed, each frame becomes part of the history and 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. Allocated by the client. BBoxes are scaled to the resolution of the first input image transform buffer.
Returns
Status of batch processing
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]customConfigFilePathSizeSize of the config file path
[in]pCustomConfigFilePathPointer to the string containing custom config file path
[out]pQueryPointer to the query struct to be filled out by the tracker
Returns
Status of the query
void NvMOT_RemoveStreams ( NvMOTContextHandle  contextHandle,
NvMOTStreamId  streamIdMask 
)

Optional handler for removing streams from a batch.

Used in batch processing mode only. This call notifies the tracker lib that a stream is removed, and will not be present in future batches. If there are per-stream resources to be freed, this is an opportunity to do so. This will be called only when all processing is quiesced.

Parameters
[in]contextHandleThe context handle obtained from NvMOTInit().
[in]streamIdMaskA mask for finding streams to be removed. Remove all streams for which (streamId & streamIdMask) == streamIdMask.