multiObjectTracker
Track objects using GNN assignment
Description
The multiObjectTracker
System object™ initializes, confirms, predicts, corrects, and deletes the tracks of moving
objects. Inputs to the multi-object tracker are detection reports generated by an objectDetection
object, drivingRadarDataGenerator
object, or visionDetectionGenerator
object. The multi-object tracker accepts detections from
multiple sensors and assigns them to tracks using a global nearest neighbor (GNN) criterion.
Each detection is assigned to a separate track. If the detection cannot be assigned to any
track, based on the AssignmentThreshold
property, the tracker creates a new track. The tracks are
returned in a structure array.
A new track starts in a tentative state. If enough detections are
assigned to a tentative track, its status changes to confirmed. If the
detection is a known classification (the ObjectClassID
field of the
returned track is nonzero), that track can be confirmed immediately. For details on the
multi-object tracker properties used to confirm tracks, see Algorithms.
When a track is confirmed, the multi-object tracker considers that track to represent a physical object. If detections are not added to the track within a specifiable number of updates, the track is deleted.
The tracker also estimates the state vector and state vector covariance matrix for each track using a Kalman filter. These state vectors are used to predict a track's location in each frame and determine the likelihood of each detection being assigned to each track.
To track objects using a multi-object tracker:
Create the
multiObjectTracker
object and set its properties.Call the object with arguments, as if it were a function.
To learn more about how System objects work, see What Are System Objects?
Creation
Description
creates a
tracker
= multiObjectTrackermultiObjectTracker
System object with default property values.
sets properties for the multi-object tracker using
one or more name-value pairs. For example,
tracker
= multiObjectTracker(Name,Value
)multiObjectTracker('FilterInitializationFcn',@initcvukf,'MaxNumTracks',100)
creates a multi-object tracker that uses a constant-velocity, unscented Kalman filter and
maintains a maximum of 100 tracks. Enclose each property name in quotes.
Properties
Usage
To update tracks, call the created multi-object tracker with arguments, as if it were a
function (described here). Alternatively, update tracks by using the updateTracks
function, specifying the multi-object tracker as an input
argument.
Syntax
Description
creates, updates, and deletes tracks in the multi-object tracker and returns details about
the confirmed tracks. Updates are based on the specified list of
confirmedTracks
= tracker(detections
,time
)detections
, and all tracks are updated to the specified
time
. Each element in the returned
confirmedTracks
corresponds to a single track.
[
also returns confirmedTracks
,tentativeTracks
] = tracker(detections
,time
)tentativeTracks
containing details about the tentative
tracks.
[
also returns confirmedTracks
,tentativeTracks
,allTracks
] = tracker(detections
,time
)allTracks
containing details about all the confirmed and
tentative tracks. The tracks are returned in the order by which the tracker internally
maintains them. You can use this output to help you calculate the cost matrix, an optional
input argument.
[___] = tracker(
specifies a cost matrix, returning any of the outputs from preceding syntaxes.detections
,time
,costMatrix
)
To specify a cost matrix, set the HasCostMatrixInput
property of the multiObjectTracker
System object to true
.
[___] = tracker(___,
also specifies a list of expected detectable tracks given by
detectableTrackIDs
)detectableTrackIDs
. This argument can be used with any of the
previous input syntaxes.
To enable this syntax, set the HasDetectableTrackIDsInput
property to true
.
Input Arguments
Output Arguments
Object Functions
To use an object function, specify the
System object as the first input argument. For
example, to release system resources of a System object named obj
, use
this syntax:
release(obj)
Examples
Algorithms
When you pass detections into a multi-object tracker, the System object:
Attempts to assign the input detections to existing tracks, based on the
AssignmentThreshold
property of the multi-object tracker.Creates new tracks from unassigned detections.
Updates already assigned tracks and possibly confirms them, based on the
ConfirmationThreshold
property of the tracker.Deletes tracks that have no assigned detections, based on the
DeletionThreshold
property of the tracker.