NVIDIA DeepStream SDK API Reference

5.0 Release

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
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  _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 _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  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_ProcessPast (NvMOTContextHandle contextHandle, NvMOTProcessParams *pParams, NvDsPastFrameObjBatch *pPastFrameObjBatch)
 Process the past-frame data in the low-level tracker lib and retrieve. More...
 
NvMOTStatus NvMOT_Query (uint16_t customConfigFilePathSize, char *pCustomConfigFilePath, NvMOTQuery *pQuery)
 Queries the tracker library's capabilities and requirements. More...
 
void NvMOT_RemoveStreams (NvMOTContextHandle contextHandle, NvMOTStreamId streamIdMask)
 Removes streams from a batch. More...
 

Typedef Documentation

typedef uint8_t NvMOTCompute

Definition at line 63 of file nvdstracker.h.

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.

Holds a tracker's configuration status.

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

typedef struct NvMOTContext* NvMOTContextHandle

Definition at line 342 of file nvdstracker.h.

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.

Holds miscellaneous configurations.

Holds information about an object to be tracked.

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

Holds a list of objects.

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

Holds parameters for processing a batch.

See also
NvMOTProcessFrame.
typedef struct _NvMOTQuery NvMOTQuery
typedef struct _NvMOTRect NvMOTRect

Holds the definition of a rectangle.

Holds information about each tracked object.

Holds a batch of lists of tracked objects.

Holds a list of tracked objects.

Enumeration Type Documentation

Defines configuration request return codes.

Enumerator
NvMOTConfigStatus_OK 
NvMOTConfigStatus_Error 
NvMOTConfigStatus_Invalid 
NvMOTConfigStatus_Unsupported 

Definition at line 135 of file nvdstracker.h.

Defines generic status codes for tracking operations.

Enumerator
NvMOTStatus_OK 
NvMOTStatus_Error 
NvMOTStatus_Invalid_Path 

Definition at line 167 of file nvdstracker.h.

Function Documentation

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.
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.
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.
NvMOTStatus NvMOT_ProcessPast ( NvMOTContextHandle  contextHandle,
NvMOTProcessParams pParams,
NvDsPastFrameObjBatch pPastFrameObjBatch 
)

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]pPastFrameObjBatchBatch of lists of tracked objects that are stored by the low-level tracker in the past frames 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 
)

Queries the tracker library's 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.
void 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.