DriveWorks SDK Reference

| 0.6.67 Release

Object

Detailed Description

Defines the Object module.

Data Structures

struct  dwObject
 
struct  dwObjectInPathAnalyzerIntersection
 Holds the information for one object intersection (lane + object). More...
 
struct  dwObjectInPathAnalyzerObjects
 Holds a list of intersections. More...
 
struct  dwObjectInPathAnalyzerParams
 Holds the initialization parameters for object in-path analyzer. More...
 
struct  dwObjectList
 A list of dwObject. More...
 

Macros

#define DW_OBJECT_MAX_CLASSES   32
 Maximum number of classes that a network can detect. More...
 

Typedefs

typedef struct dwObjectInPathAnalyzerObject * dwObjectInPathAnalyzerHandle_t
 Handle to an object lane analyzer. More...
 

Enumerations

enum  dwLaneType {
  DW_LANE_TYPE_LEFT = 0,
  DW_LANE_TYPE_EGO = 1,
  DW_LANE_TYPE_RIGHT = 2,
  DW_LANE_TYPE_OTHER = 3,
  DW_LANE_TYPE_MAX_COUNT = 4
}
 The type of lane. More...
 

Functions

DW_API_PUBLIC dwStatus dwObject_merge (dwObject *mergedObjects, size_t *numMergedObjects, size_t maxNumMergedObjects, const dwObject *const *objectLists, const size_t *numObjectsPerList, size_t numLists, float32_t thresholdIOU, float32_t maxMatchDistance, dwContextHandle_t ctx)
 Merges an object with another in any other list if the intersection over union is over the given threshold. More...
 
DW_API_PUBLIC dwStatus dwObjectInPathAnalyzer_getDefaultInitParams (dwObjectInPathAnalyzerParams *params)
 Get the default parameters. More...
 
DW_API_PUBLIC dwStatus dwObjectInPathAnalyzer_getObjectsInLane (dwObjectInPathAnalyzerObjects *objects, dwLaneType lane, dwObjectInPathAnalyzerHandle_t analyzer)
 Get the current intersections. More...
 
DW_API_PUBLIC dwStatus dwObjectInPathAnalyzer_initialize (dwObjectInPathAnalyzerHandle_t *analyzer, const dwObjectInPathAnalyzerParams *params, dwContextHandle_t context)
 Initializes an object in-path analyzer. More...
 
DW_API_PUBLIC dwStatus dwObjectInPathAnalyzer_processDeviceAsync (dwObjectInPathAnalyzerHandle_t analyzer)
 Process the intersections. More...
 
DW_API_PUBLIC dwStatus dwObjectInPathAnalyzer_processHost (dwObjectInPathAnalyzerHandle_t analyzer)
 Pull the information from the device to the host. More...
 
DW_API_PUBLIC dwStatus dwObjectInPathAnalyzer_release (dwObjectInPathAnalyzerHandle_t *analyzer)
 Releases the object in-path analyzer. More...
 
DW_API_PUBLIC dwStatus dwObjectInPathAnalyzer_reset (dwObjectInPathAnalyzerHandle_t analyzer)
 Clears the object in-path analyzer. More...
 
DW_API_PUBLIC dwStatus dwObjectInPathAnalyzer_setFreeSpace (const dwFreeSpaceDetection *detection, dwObjectInPathAnalyzerHandle_t analyzer)
 Sets the free space. More...
 
DW_API_PUBLIC dwStatus dwObjectInPathAnalyzer_setLanes (const dwLaneDetection *laneList, dwObjectInPathAnalyzerHandle_t analyzer)
 Sets the lanes. More...
 
DW_API_PUBLIC dwStatus dwObjectInPathAnalyzer_setObjects (const dwObject *objectList, uint32_t count, dwObjectInPathAnalyzerHandle_t analyzer)
 Sets the objects. More...
 
DW_API_PUBLIC dwStatus dwObjectInPathAnalyzer_setObjectTracks (const dwObjectList *objects, uint32_t count, dwObjectInPathAnalyzerHandle_t analyzer)
 Sets the object tracks. More...
 
DW_API_PUBLIC dwStatus dwObjectInPathAnalyzer_setTimesteps (float32_t timesteps, dwObjectInPathAnalyzerHandle_t analyzer)
 Sets the timesteps. More...
 

Data Structure Documentation

◆ dwObject

struct dwObject
Data Fields
float32_t bottomVisibility Whether object's bottom is fully visible or not.

The estimate is lower if the bottom part of the object is truncated or occluded.

dwBox2Df box Bounding box of the detected object.
dwBox2Df boxVariance Variance of bounding boxes of the members of the cluster.
uint32_t classId Class ID of the detected object.
float32_t confidence Confidence of the object.
float32_t horizontalVisibility Visibility flags Probability estimation between 0 (occluded) - 1 (visible), whether object's width is fully visible or not.

The estimate is lower if the left or right part of the object is truncated or occluded.

dwBool isConfirmed Is object confirmed? Not confirmed object needs to be tracked and maintained internally, but should not be displayed and used.
uint32_t lifetime Lifetime of the object in frames. The first time the object is detected, it is set to 1.
uint32_t numMembers Number of members of the object if the object is formed by other objects via clustering.
uint32_t numUndetectedFrames Number of frames since the object was detected last time.
uint32_t objectId Object ID. A within-class unique id assigned by dwObjectTracking module.
float32_t orientationYaw Yaw orientation of the object.

Radian angle (-PI - +PI) from lateral axis. e.g. car faces the same direction with the host car (the same way traffic): 0 e.g. car faces toward the camera (opposite traffic): +- PI e.g. car faces toward the right side: PI/2

dwTime_t timestamp Timestamp.
float32_t trackingConfidence Tracking confidence of the object.
dwVector3f velocity Velocity of the object in x, y image space coordinates and z in scale factor.

◆ dwObjectInPathAnalyzerIntersection

struct dwObjectInPathAnalyzerIntersection
Data Fields
float32_t intersectionAmount The intersection ratio of intersection pixel count / object total area.
uint32_t intersectionPixelCount The total number of pixels that intersected between the object and the lane.
dwLaneType lane The intersecting lane.
dwObject object The original dwObject that was intersected.
uint32_t objectAreaPixelCount The object area in pixels given segmented (or not) by freespace.

◆ dwObjectInPathAnalyzerObjects

struct dwObjectInPathAnalyzerObjects
Data Fields
uint32_t count The number of elements in the objects list.
dwLaneType lane The intersecting lane.
const
dwObjectInPathAnalyzerIntersection *
objects The array of intersection objects.

◆ dwObjectInPathAnalyzerParams

struct dwObjectInPathAnalyzerParams
Data Fields
dwCalibratedCameraHandle_t calibratedCamera Calibrated camera to use.

If it is set to DW_NULL_HANDLE, it will not be used.

dwTransformation cameraToRig Camera to rig matrix.
uint32_t imageHeight The height of the image.
uint32_t imageWidth The width of the image.
float32_t intersectionThreshold The threshold to count object as an acceptable intersection.

If normalizePixels is set to DW_TRUE, intersectionThreshold must be a number between 0 and 1.

dwBool normalizePixelCount Control whether or not the pixels are normalized by total object area.
dwBool useFreeSpace Use free space to calculate intersections.

◆ dwObjectList

struct dwObjectList
Data Fields
uint32_t count The number of objects in the array.
dwObject * objects Pointer to array of objects.

Macro Definition Documentation

◆ DW_OBJECT_MAX_CLASSES

#define DW_OBJECT_MAX_CLASSES   32

Maximum number of classes that a network can detect.

Definition at line 57 of file Object.h.

Typedef Documentation

◆ dwObjectInPathAnalyzerHandle_t

typedef struct dwObjectInPathAnalyzerObject* dwObjectInPathAnalyzerHandle_t

Handle to an object lane analyzer.

Definition at line 59 of file ObjectInPathAnalyzer.h.

Enumeration Type Documentation

◆ dwLaneType

enum dwLaneType

The type of lane.

Enumerator
DW_LANE_TYPE_LEFT 
DW_LANE_TYPE_EGO 
DW_LANE_TYPE_RIGHT 
DW_LANE_TYPE_OTHER 
DW_LANE_TYPE_MAX_COUNT 

Definition at line 88 of file ObjectInPathAnalyzer.h.

Function Documentation

◆ dwObject_merge()

DW_API_PUBLIC dwStatus dwObject_merge ( dwObject mergedObjects,
size_t *  numMergedObjects,
size_t  maxNumMergedObjects,
const dwObject *const *  objectLists,
const size_t *  numObjectsPerList,
size_t  numLists,
float32_t  thresholdIOU,
float32_t  maxMatchDistance,
dwContextHandle_t  ctx 
)

Merges an object with another in any other list if the intersection over union is over the given threshold.

Parameters
[out]mergedObjectsList where the merged objects from given lists are stored.
[out]numMergedObjectsNumber of merged objects.
[in]maxNumMergedObjectsMaximum number of merged objects that are allowed to store in mergedObjects.
[in]objectListsList of object lists to merge.
[in]numObjectsPerListList of number of objects per list.
[in]numListsNumber of lists.
[in]thresholdIOUMinimum amount of overlap between a tracked box and an added box such that the two boxes can be considered the same object. Overlap is defined as the intersection over the union (IOU).
[in]maxMatchDistanceMaximum distance around the closest tracked box to search for a candidate matching box. Distance here is defined as delta 1 - IOU. Within this margin, the box with the longest track history is preferred and is selected as the candidate matching box. The candidate still has to pass the minMatchOverlap test to be considered a positive match for the new box.
[in]ctxSpecifies the handle to the context.
Returns
DW_SUCCESS, DW_INVALID_HANDLE, DW_BAD_CAST, DW_INVALID_ARGUMENT

◆ dwObjectInPathAnalyzer_getDefaultInitParams()

DW_API_PUBLIC dwStatus dwObjectInPathAnalyzer_getDefaultInitParams ( dwObjectInPathAnalyzerParams params)

Get the default parameters.

Parameters
[out]paramsPointer to initialization params.
Returns
DW_INVALID_ARGUMENT DW_FAILURE DW_SUCCESS

◆ dwObjectInPathAnalyzer_getObjectsInLane()

DW_API_PUBLIC dwStatus dwObjectInPathAnalyzer_getObjectsInLane ( dwObjectInPathAnalyzerObjects objects,
dwLaneType  lane,
dwObjectInPathAnalyzerHandle_t  analyzer 
)

Get the current intersections.

Parameters
[out]objectsPointer to output results of the object in-path analyzer.
[in]laneThe lane for intersections.
[in]analyzerSpecifies the opaque handle.
Returns
DW_INVALID_ARGUMENT DW_GL_ERROR DW_FAILURE DW_SUCCESS

◆ dwObjectInPathAnalyzer_initialize()

DW_API_PUBLIC dwStatus dwObjectInPathAnalyzer_initialize ( dwObjectInPathAnalyzerHandle_t analyzer,
const dwObjectInPathAnalyzerParams params,
dwContextHandle_t  context 
)

Initializes an object in-path analyzer.

It must be initialized on a thread with a valid current OpenGL context.

Parameters
[out]analyzerA pointer to the opaque handle.
[in]paramsA pointer to the initialization parameters.
[in]contextSpecifies the opaque handle of a dwContext.
Returns
DW_INVALID_ARGUMENT DW_GL_ERROR DW_FAILURE DW_SUCCESS

◆ dwObjectInPathAnalyzer_processDeviceAsync()

DW_API_PUBLIC dwStatus dwObjectInPathAnalyzer_processDeviceAsync ( dwObjectInPathAnalyzerHandle_t  analyzer)

Process the intersections.

This method must be called prior to processHost.

Parameters
[in]analyzerSpecifies the opaque handle.
Returns
DW_INVALID_ARGUMENT DW_GL_ERROR DW_FAILURE DW_SUCCESS

◆ dwObjectInPathAnalyzer_processHost()

DW_API_PUBLIC dwStatus dwObjectInPathAnalyzer_processHost ( dwObjectInPathAnalyzerHandle_t  analyzer)

Pull the information from the device to the host.

This method must be called after to processDeviceAsync.

Parameters
[in]analyzerSpecifies the opaque handle.
Returns
DW_INVALID_ARGUMENT DW_GL_ERROR DW_FAILURE DW_SUCCESS

◆ dwObjectInPathAnalyzer_release()

DW_API_PUBLIC dwStatus dwObjectInPathAnalyzer_release ( dwObjectInPathAnalyzerHandle_t analyzer)

Releases the object in-path analyzer.

Parameters
[in]analyzerA pointer to the opaque handle.
Returns
DW_INVALID_ARGUMENT DW_FAILURE DW_SUCCESS

◆ dwObjectInPathAnalyzer_reset()

DW_API_PUBLIC dwStatus dwObjectInPathAnalyzer_reset ( dwObjectInPathAnalyzerHandle_t  analyzer)

Clears the object in-path analyzer.

Parameters
[in]analyzerSpecifies the opaque handle.
Returns
DW_INVALID_ARGUMENT DW_GL_ERROR DW_FAILURE DW_SUCCESS

◆ dwObjectInPathAnalyzer_setFreeSpace()

DW_API_PUBLIC dwStatus dwObjectInPathAnalyzer_setFreeSpace ( const dwFreeSpaceDetection detection,
dwObjectInPathAnalyzerHandle_t  analyzer 
)

Sets the free space.

This will copy the data. This must be called before processDeviceAsync.

Parameters
[in]detectionSpecifies the free space detection.
[in]analyzerSpecifies the opaque handle.
Returns
DW_INVALID_ARGUMENT DW_GL_ERROR DW_FAILURE DW_SUCCESS

◆ dwObjectInPathAnalyzer_setLanes()

DW_API_PUBLIC dwStatus dwObjectInPathAnalyzer_setLanes ( const dwLaneDetection laneList,
dwObjectInPathAnalyzerHandle_t  analyzer 
)

Sets the lanes.

This will copy the data. This must be called before processDeviceAsync.

Parameters
[in]laneListSpecifies the lane detection.
[in]analyzerSpecifies the opaque handle.
Returns
DW_INVALID_ARGUMENT DW_GL_ERROR DW_FAILURE DW_SUCCESS

◆ dwObjectInPathAnalyzer_setObjects()

DW_API_PUBLIC dwStatus dwObjectInPathAnalyzer_setObjects ( const dwObject objectList,
uint32_t  count,
dwObjectInPathAnalyzerHandle_t  analyzer 
)

Sets the objects.

This will copy the data. This must be called before processDeviceAsync.

Parameters
[in]objectListA list of objects.
[in]countTotal number of objects.
[in]analyzerSpecifies the opaque handle.
Returns
DW_INVALID_ARGUMENT DW_GL_ERROR DW_FAILURE DW_SUCCESS

◆ dwObjectInPathAnalyzer_setObjectTracks()

DW_API_PUBLIC dwStatus dwObjectInPathAnalyzer_setObjectTracks ( const dwObjectList objects,
uint32_t  count,
dwObjectInPathAnalyzerHandle_t  analyzer 
)

Sets the object tracks.

This will copy the data. This must be called before processDeviceAsync.

Parameters
[in]objectsA list of object lists, where each list represents an object track or history.
[in]countTotal count of lists.
[in]analyzerSpecifies the opaque handle.
Returns
DW_INVALID_ARGUMENT DW_GL_ERROR DW_FAILURE DW_SUCCESS

◆ dwObjectInPathAnalyzer_setTimesteps()

DW_API_PUBLIC dwStatus dwObjectInPathAnalyzer_setTimesteps ( float32_t  timesteps,
dwObjectInPathAnalyzerHandle_t  analyzer 
)

Sets the timesteps.

This will be used with velocity calculations for forward prediction. This must be called before processDeviceAsync.

Parameters
[in]timestepsThe amount of timesteps to adjust the pixel position based on velocity of the objects.
[in]analyzerSpecifies the opaque handle.
Returns
DW_INVALID_ARGUMENT DW_GL_ERROR DW_FAILURE DW_SUCCESS