Create and manage tracks of multiple objects
Automated Driving Toolbox
The Multi-Object Tracker block initializes, confirms, predicts, corrects, and deletes the tracks of moving objects. Inputs to the multi-object tracker are detection reports generated by Radar Detection Generator and Vision Detection Generator blocks. 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, the multi-object tracker creates a new track.
A new track starts in a tentative state. If enough detections are assigned to a tentative track, its status changes to confirmed. 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 multi-object 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.
Detections
— Detection listDetection list, specified as a Simulink bus containing a MATLAB structure. See Getting Started with Buses (Simulink). The structure has the form:
Field | Description | Type |
---|---|---|
NumDetections | Number of detections | integer |
IsValidTime | False when updates are requested at times that are between block invocation intervals | Boolean |
Detections | Object detections | Array of object detection structures. The first
NumDetections of these
detections are actual detections. |
The definitions of the object detection structures are found in the Detections output port descriptions of the Radar Detection Generator and Vision Detection Generator blocks.
The object detection structure contains a
Time
field. The time tag of each object
detection must be less than or equal to the time of the current
invocation of the block. The time tag must also be greater than
the update time specified in the previous invocation of the
block.
Prediction Time
— Track update timeTrack update time, specified as a real scalar. The multi-object tracker updates all tracks to this time. Update time must always increase with each invocation of the block. Units are in seconds.
The object detection structure contains a
Time
field. The time tag of each object
detection must be less than or equal to the time of the current
invocation of the block. The time tag must also be greater than
the update time in the previous invocation of the block.
To enable this port, set Prediction time
source to Input
port
.
Cost Matrix
— Cost matrixCost matrix, specified as a real-valued Nt-by-Nd matrix, where Nt is the number of existing tracks and Nd is the number of current detections.
The rows of the cost matrix correspond to the existing tracks. The columns correspond to the detections. Tracks are ordered as they appear in the list of tracks in the All Tracks output port of the previous invocation of the block.
In the first update to the multi-object tracker, or if the track has
no previous tracks, assign the cost matrix a size of [0,
Nd]. The cost must be
calculated so that lower costs indicate a higher likelihood that the
multi-object tracker assigns a detection to a track. To prevent certain
detections from being assigned to certain tracks, use
Inf
.
To enable this port, select Enable cost matrix input.
Confirmed Tracks
— Confirmed tracksConfirmed tracks, returned as a Simulink bus containing a MATLAB structure. See Getting Started with Buses (Simulink).
This table shows the structure fields.
Field | Description |
---|---|
NumTracks | Number of tracks |
Tracks | Array of track structures of a length set by the Maximum number of
tracks parameter. Only the first NumTracks
of these are actual tracks. |
This table shows the fields of each track structure.
Field | Definition |
---|---|
TrackID | Unique track identifier. |
Time | Time at which the track is updated. Units are in seconds. |
Age | Number of updates since track initialization. |
State | Updated state vector. The state vector is specific to each type of Kalman filter. |
StateCovariance | Updated state covariance matrix. The covariance matrix is specific to each type of Kalman filter. |
IsConfirmed | Confirmation status. This field is true if the track is confirmed to be a
real target. |
IsCoasted | Coasting status. This field is true if the track is updated without a new
detection. |
ObjectClassID | Integer value representing the object classification. The value 0 represents an unknown classification. Nonzero classifications apply only to confirmed tracks. |
ObjectAttributes | Cell array of object attributes reported by the sensor making the detection. |
A track is confirmed if:
At least M detections are assigned to the track during the first N updates after track initialization. To specify the values M and N, use the M and N for the M-out-of-N confirmation parameter.
The detection initiating the track has an
ObjectClassID
greater than
zero.
Tentative Tracks
— Tentative tracksTentative tracks, returned as a Simulink bus containing a MATLAB structure. See Getting Started with Buses (Simulink). A track is tentative before it is confirmed.
This table shows the structure fields.
Field | Description |
---|---|
NumTracks | Number of tracks |
Tracks | Array of track structures of a length set by the Maximum number of
tracks parameter. Only the first NumTracks
of these are actual tracks. |
This table shows the fields of each track structure.
Field | Definition |
---|---|
TrackID | Unique track identifier. |
Time | Time at which the track is updated. Units are in seconds. |
Age | Number of updates since track initialization. |
State | Updated state vector. The state vector is specific to each type of Kalman filter. |
StateCovariance | Updated state covariance matrix. The covariance matrix is specific to each type of Kalman filter. |
IsConfirmed | Confirmation status. This field is true if the track is confirmed to be a
real target. |
IsCoasted | Coasting status. This field is true if the track is updated without a new
detection. |
ObjectClassID | Integer value representing the object classification. The value 0 represents an unknown classification. Nonzero classifications apply only to confirmed tracks. |
ObjectAttributes | Cell array of object attributes reported by the sensor making the detection. |
To enable this port, select Enable tentative tracks output.
All Tracks
— All tracksCombined list of confirmed and tentative tracks, returned as a Simulink bus containing a MATLAB structure. See Getting Started with Buses (Simulink).
This table shows the structure fields.
Field | Description |
---|---|
NumTracks | Number of tracks |
Tracks | Array of track structures of a length set by the Maximum number of
tracks parameter. Only the first NumTracks
of these are actual tracks. |
This table shows the fields of each track structure.
Field | Definition |
---|---|
TrackID | Unique track identifier. |
Time | Time at which the track is updated. Units are in seconds. |
Age | Number of updates since track initialization. |
State | Updated state vector. The state vector is specific to each type of Kalman filter. |
StateCovariance | Updated state covariance matrix. The covariance matrix is specific to each type of Kalman filter. |
IsConfirmed | Confirmation status. This field is true if the track is confirmed to be a
real target. |
IsCoasted | Coasting status. This field is true if the track is updated without a new
detection. |
ObjectClassID | Integer value representing the object classification. The value 0 represents an unknown classification. Nonzero classifications apply only to confirmed tracks. |
ObjectAttributes | Cell array of object attributes reported by the sensor making the detection. |
To enable this port, select Enable all tracks output.
Filter initialization function name
— Kalman filter initialization functioninitcvkf
(default) | function nameKalman filter initialization function, specified as a function name.
The toolbox provides several initialization functions. For an example of
an initialization function, see initcvekf
.
Threshold for assigning detections to tracks
— Detection assignment threshold30.0
(default) | positive real scalarDetection assignment threshold, specified as a positive real scalar. To assign a detection to a track, the detection's normalized distance from the track must be less than the assignment threshold. If some detections remain unassigned to tracks that you want them assigned to, then increase the threshold. If some detections are assigned to incorrect tracks, decrease the threshold.
M and N for the M-out-of-N confirmation
— Confirmation parameters for track creation[2,3]
(default) | two-element vector of positive integersConfirmation parameters for track creation, specified as a two-element
vector of positive integers, [M,N]
. A track is
confirmed when at least M
detections are assigned to
the track during the first N
updates after track
initialization. M
must be less than or equal to
N
.
When setting N
, consider the number of
times you want the tracker to update before it confirms a
track. For example, if a tracker updates every 0.05 seconds,
and you allow 0.5 seconds to make a confirmation decision,
set N
= 10.
When setting M
, take into account the
probability of object detection for the sensors. The
probability of detection depends on factors such as
occlusion or clutter. You can reduce M
when tracks fail to be confirmed or increase
M
when too many false detections are
assigned to tracks.
Example: [3,5]
Number of times a confirmed track is coasted
— Coasting threshold for track deletion5
(default) | positive integerCoasting threshold for track deletion, specified as a positive integer. A track coasts when no detections are assigned to the track after one or more prediction steps. If the number of coasting steps exceeds this threshold, the block deletes the track.
Maximum number of tracks
— Maximum number of tracks200
(default) | positive integerMaximum number of tracks that the block can process, specified as a positive integer.
Maximum number of sensors
— Maximum number of sensorsMaximum number of sensors that the block can process, specified as a
positive integer. This value should be greater than or equal to the
highest SensorIndex
value used in the
Detections input port.
Prediction time source
— Source for prediction timeInput port
(default) | Auto
Source for prediction time, specified as Input
port
or Auto
. Select
Input port
to input an update time by
using the Prediction Time input port. Otherwise,
the simulation clock managed by Simulink determines the update time.
Example: Auto
Source of output bus name
— Source of output bus nameAuto
(default) | Property
Source of output bus name, specified as Auto
or
Property
.
If you select Auto
, the block
automatically creates a bus name.
If you select Property
, specify the bus
name using the Specify an output bus
name parameter.
Specify an output bus name
— Name of output busTo enable this parameter, set the Source of output bus
name parameter to Property
.
Enable cost matrix input
— Enable input port for cost matrixSelect this check box to enable the input of a cost matrix by using the Cost Matrix input port.
Enable tentative tracks output
— Enable output port for tentative tracksSelect this check box to enable the output of tentative tracks by using the Tentative Tracks output port.
Enable all tracks output
— Enable output port for all tracksSelect this check box to enable the output of all the tracks by using the All Tracks output port.
Simulate using
— Type of simulation to runInterpreted execution
(default) | Code generation
Interpreted execution
— Simulate the model using the
MATLAB interpreter. This option shortens startup time. In Interpreted
execution
mode, you can debug the source code of the block.
Code generation
— Simulate the model using generated C/C++
code. The first time you run a simulation, Simulink generates C/C++ code for the block. The C code is reused for subsequent
simulations as long as the model does not change. This option requires additional startup
time.
Bird's-Eye
Scope | Detection
Concatenation | Radar Detection
Generator | Scenario
Reader | Vision Detection
Generator | multiObjectTracker
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
Select web siteYou can also select a web site from the following list:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.