Multi-Object Tracker
Create and manage tracks of multiple objects
- Library:
Automated Driving Toolbox
Description
TheMulti-Object Trackerblock initializes, confirms, predicts, corrects, and deletes the tracks of moving objects. Inputs to the multi-object tracker are detection reports generated byDriving Radar Data GeneratorandVision Detection Generator块。多目标跟踪器接受检测s 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 atentativestate. If enough detections are assigned to a tentative track, its status changes toconfirmed。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.
Ports
Input
Detections
— Detection list
万博1manbetx®bus containing MATLAB®structure
Detection list, specified as a Simulink bus containing a MATLAB structure. SeeGroup Signal Lines into Virtual Buses(Simulink)。The structure has the form:
Field | Description | Type |
---|---|---|
NumDetections |
Number of detections | integer |
IsValidTime |
falses当有时在块调用间隔之间要求更新时 | Boolean |
Detections |
Object detections | 对象检测结构的数组。首先NumDetections of these detections are actual detections. |
The definitions of the object detection structures are found in theDetectionsoutput port descriptions of theDriving Radar Data GeneratorandVision Detection Generator块。
Note
The object detection structure contains aTime
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
- 跟踪更新时间
real scalar
Track 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.
Note
The object detection structure contains aTime
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.
Dependencies
To enable this port, setPrediction time sourcetoInput port
。
Cost Matrix
— Cost matrix
real-valuedNt-by-Ndmatrix
Cost matrix, specified as a real-valuedNt-by-Nd矩阵,哪里Ntis the number of existing tracks andNdis 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 theAll Tracksoutput 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, useinf
。
Dependencies
要启用此端口,请选择Enable cost matrix input。
Detectable Track IDs
— Detectable track IDs
real-valuedM-by-1 vector | real-valuedM-by-2 matrix
Detectable track IDs, specified as a real-valuedM-b-1矢量或M-by-2 matrix. Detectable tracks are tracks that the sensors expect to detect. The first column of the matrix contains a list of track IDs that the sensors report as detectable. The optional second column contains the detection probability for the track.
Tracks whose identifiers are not included inDetectable Track IDsare considered undetectable. The track deletion logic does not count the lack of detection as a "missed detection" for track deletion purposes.
If this port is not enabled, the tracker assumes all tracks to be detectable at each invocation of the block.
Dependencies
To enable this port, in thePort Settingtab, selectEnable detectable track IDs Input。
State Parameters
— Track state parameters
Simulink bus containing MATLAB structure
跟踪状态参数, specified as a Simulink bus containing a MATLAB structure. The structure has the form:
Field | Description |
---|---|
NumParameters |
Number of non-default state parameters, specified as a nonnegative integer |
Parameters |
Array of state parameter structures |
The block uses the value of theParameters
field for theStateParameters
field of the generated tracks. You can use these parameters to define the reference frame in which the track is reported or other desirable attributes of the generated tracks.
For example, you can use the following structure to define a rectangular reference frame whose origin position is at[10 10 0]
仪表,其起源速度是[2 -2 0]
meters per second with respect to the scenario frame.
字段名称 | Value |
---|---|
Frame |
"Rectangular" |
Position |
[10 10 0] |
速度 |
[2 -2 0] |
Dependencies
To enable this port, in the跟踪器配置tab, select theUpdate track state parameters with timeparameter.
Output
确认的曲目
— Confirmed tracks
Simulink bus containing MATLAB structure
Confirmed tracks, returned as a Simulink bus containing a MATLAB structure. SeeCreate Nonvirtual 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最大轨道数量parameter. Only the firstNumTracks of these are actual tracks. |
This table shows the fields of each track structure.
Field | Definition |
---|---|
TrackID |
Unique track identifier used to distinguish multiple tracks. |
BranchID |
Unique track branch identifier used to distinguish multiple track branches. |
SourceIndex |
Unique source index used to distinguish tracking sources in a multiple tracker environment. |
UpdateTime |
曲目更新的时间。单位在几秒钟内。 |
Age |
赛道更新的次数。 |
State |
Value of state vector at the update time. |
StateCovariance |
Uncertainty covariance matrix. |
ObjectClassID |
代表对象分类的整数值。价值0 代表未知分类。非零分类仅适用于已确认的轨道。 |
TrackLogic |
Confirmation and deletion logic type. This value is always'History' for radar sensors, to indicate history-based logic. |
TrackLogicState |
轨道逻辑类型的当前状态,返回为1乘Klogical array.Kis the number of latest track logical states recorded. In the array, |
IsConfirmed |
Confirmation status. This field istrue if the track is confirmed to be a real target. |
IsCoasted |
Coasting status. This field istrue if the track is updated without a new detection. |
IsSelfReported |
指示跟踪器是否报告了轨道。该字段用于轨道融合环境中。它被返回为 |
objectattributes |
Additional information about the track. |
For more details about these fields, seeobjectTrack
。
如果以下方式确认轨道
At leastMdetections are assigned to the track during the firstNupdates after track initialization. To specify the valuesMandN, use theM and N for the M-out-of-N confirmationparameter.
The detection initiating the track has an
ObjectClassID
greater than zero.
Tentative Tracks
— Tentative tracks
Simulink bus containing MATLAB structure
Tentative tracks, returned as a Simulink bus containing a MATLAB structure. SeeCreate Nonvirtual 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最大轨道数量parameter. Only the firstNumTracks of these are actual tracks. |
This table shows the fields of each track structure.
Field | Definition |
---|---|
TrackID |
Unique track identifier used to distinguish multiple tracks. |
BranchID |
Unique track branch identifier used to distinguish multiple track branches. |
SourceIndex |
Unique source index used to distinguish tracking sources in a multiple tracker environment. |
UpdateTime |
曲目更新的时间。单位在几秒钟内。 |
Age |
赛道更新的次数。 |
State |
Value of state vector at the update time. |
StateCovariance |
Uncertainty covariance matrix. |
ObjectClassID |
代表对象分类的整数值。价值0 代表未知分类。非零分类仅适用于已确认的轨道。 |
TrackLogic |
Confirmation and deletion logic type. This value is always'History' for radar sensors, to indicate history-based logic. |
TrackLogicState |
轨道逻辑类型的当前状态,返回为1乘Klogical array.Kis the number of latest track logical states recorded. In the array, |
IsConfirmed |
Confirmation status. This field istrue if the track is confirmed to be a real target. |
IsCoasted |
Coasting status. This field istrue if the track is updated without a new detection. |
IsSelfReported |
指示跟踪器是否报告了轨道。该字段用于轨道融合环境中。它被返回为 |
objectattributes |
Additional information about the track. |
For more details about these fields, seeobjectTrack
。
Dependencies
要启用此端口,请选择Enable tentative tracks output。
All Tracks
— All tracks
Simulink bus containing MATLAB structure
Combined list of confirmed and tentative tracks, returned as a Simulink bus containing a MATLAB structure. SeeCreate Nonvirtual 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最大轨道数量parameter. Only the firstNumTracks of these are actual tracks. |
This table shows the fields of each track structure.
Field | Definition |
---|---|
TrackID |
Unique track identifier used to distinguish multiple tracks. |
BranchID |
Unique track branch identifier used to distinguish multiple track branches. |
SourceIndex |
Unique source index used to distinguish tracking sources in a multiple tracker environment. |
UpdateTime |
曲目更新的时间。单位在几秒钟内。 |
Age |
赛道更新的次数。 |
State |
Value of state vector at the update time. |
StateCovariance |
Uncertainty covariance matrix. |
ObjectClassID |
代表对象分类的整数值。价值0 代表未知分类。非零分类仅适用于已确认的轨道。 |
TrackLogic |
Confirmation and deletion logic type. This value is always'History' for radar sensors, to indicate history-based logic. |
TrackLogicState |
轨道逻辑类型的当前状态,返回为1乘Klogical array.Kis the number of latest track logical states recorded. In the array, |
IsConfirmed |
Confirmation status. This field istrue if the track is confirmed to be a real target. |
IsCoasted |
Coasting status. This field istrue if the track is updated without a new detection. |
IsSelfReported |
指示跟踪器是否报告了轨道。该字段用于轨道融合环境中。它被返回为 |
objectattributes |
Additional information about the track. |
For more details about these fields, seeobjectTrack
。
Dependencies
要启用此端口,请选择Enable all tracks output。
Parameters
Tracker Management
Tracker identifier
— Unique tracker identifier
0
(默认)|nonnegative integer
Unique tracker identifier, specified as a nonnegative integer. This parameter is used as theSourceIndex
in the outputs, and distinguishes tracks that come from different trackers in a multiple-tracker system. You must specify this property as a positive integer to use the track outputs as inputs to a track fuser.
Example:1
Filter initialization function name
- 卡尔曼过滤器初始化功能
initcvkf
(默认)|function name
Kalman filter initialization function, specified as a function name. The toolbox provides several initialization functions. For an example of an initialization function, seeinitcvekf
。
Threshold for assigning detections to tracks
— Detection assignment threshold
30.0
(默认)|positive real scalar
检测分配阈值,指定为正真实标量。要将检测分配到轨道,检测到距轨道的归一化距离必须小于分配阈值。如果某些检测仍然与要分配给的轨道未分配,请增加阈值。如果将某些检测分配给不正确的轨道,请降低阈值。
M and N for the M-out-of-N confirmation
— Confirmation parameters for track creation
[2,3]
(默认)|two-element vector of positive integers
Confirmation parameters for track creation, specified as a two-element vector of positive integers,[M,N]
。A track is confirmed when at leastM
detections are assigned to the track during the firstN
updates after track initialization.M
must be less than or equal toN
。
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, setN
= 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 reduceM
when tracks fail to be confirmed or increaseM
when too many false detections are assigned to tracks.
Example:[3,5]
P and R for the P-out-of-R deletion
— Track deletion threshold
[5 5]
(默认)|积极整数的真实价值1 x-2矢量
Track deletion threshold for history logic, specified as a real-valued 1-by-2 vector of positive integers[P R]
。If a confirmed track is not assigned to any detectionP
times in the lastR
tracker updates, then the track is deleted.
最大轨道数量
- 最大轨道数量
200
(默认)|positive integer
最大轨道数量that the block can process, specified as a positive integer.
Maximum number of sensors
- 传感器数量的最大数量
20 (default) | positive integer
Maximum number of sensors that the block can process, specified as a positive integer. This value should be greater than or equal to the highestSensorIndex
value used in theDetectionsinput port.
Out-of-sequence measurements handling
— Out-of-sequence measurements handling
Terminate
(默认)|neglect
Out-of-sequence measurements handling, specified asTerminate
orneglect
。每个检测都有与之相关的时间戳,td, and the tracker block has it own timestamp,tt, which is updated in each invocation. The tracker block considers a measurement as an OOSM iftd<tt。
When the parameter is specified as:
Terminate
— The block stops running when it encounters any out-of-sequence measurements.Neglect
— The block neglects any out-of-sequence measurements and continue to run.
跟踪状态参数
— Parameters of track state reference frame
结构|结构数组
Specify the parameters of the track state reference frame as a structure or a structure array. The block passes the value of this parameter to theStateParameters
field of the generated tracks. You can use these parameters to define the reference frame in which the track is reported or other desirable attributes of the generated tracks.
For example, you can use the following structure to define a rectangular reference frame whose origin position is at[10 10 0]
仪表,其起源速度是[2 -2 0]
meters per second with respect to the scenario frame.
字段名称 | Value |
---|---|
Frame |
"Rectangular" |
Position |
[10 10 0] |
速度 |
[2 -2 0] |
You can update the track state parameters through theState Parametersinput port by selecting theUpdate track state parameters with timeparameter.
Data Types:struct
Update track state parameters with time
——更新parame跟踪状态ters with time
off
(默认)|on
选择this parameter to enable the input port for track state parameters through theState Parametersinput port.
Inputs and Outputs
Prediction time source
— Source for prediction time
Input port
(默认)|Auto
Source for prediction time, specified asInput port
orAuto
。选择Input port
to input an update time by using thePrediction Timeinput port. Otherwise, the simulation clock managed by Simulink determines the update time.
Example:Auto
Enable cost matrix input
— Enable input port for cost matrix
off
(默认)|on
选择此复选框以启用使用成本矩阵的输入Cost Matrixinput port.
Enable detectable track IDs input
— Enable detectable track IDs input
off
(默认)|on
选择this check box to enable theDetectable Track IDsinput port.
Source of output bus name
— Source of output bus name
Auto
(默认)|Property
输出总线名称的来源,指定为Auto
orProperty
。
If you select
Auto
, the block automatically creates a bus name.If you select
Property
, specify the bus name using theSpecify an output bus nameparameter.
Specify an output bus name
- 输出总线的名称
没有默认值
Dependencies
To enable this parameter, set theSource of output bus nameparameter toProperty
。
Enable tentative tracks output
— Enable output port for tentative tracks
off
(默认)|on
选择this check box to enable the output of tentative tracks by using theTentative Tracksoutput port.
Enable all tracks output
— Enable output port for all tracks
off
(默认)|on
选择this check box to enable the output of all the tracks by using theAll Tracksoutput port.
Simulate using
— Type of simulation to run
Interpreted execution
(默认)|代码生成
Interpreted execution
— Simulate the model using the MATLAB interpreter. This option shortens startup time. InInterpreted execution
mode, you can debug the source code of the block.代码生成
— 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.
Extended Capabilities
C/C++ Code Generation
Generate C and C++ code using Simulink® Coder™.
When the filter initialization function specified in the block returns a
trackingEKF
ortrackingUKF
(Sensor Fusion and Tracking Toolbox)object, the block supports static memory allocation code generation.In code generation, if the detection inputs are specified in
double
precision, then theNumTracks
field of the track outputs is returned as adouble
variable. If the detection inputs are specified insingle
precision, then theNumTracks
field of the track outputs is returned as auint32
variable.
Version History
See Also
Apps
Blocks
Objects
MATLAB Command
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.
选择a Web Site
选择一个网站翻译内容的地方available and see local events and offers. Based on your location, we recommend that you select:。
You can also select a web site from the following list:
How to Get Best Site Performance
选择the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- AméricaLatina(Español)
- Canada(English)
- United States(English)
Europe
- Belgium(English)
- 丹麦(English)
- Deutschland(Deutsch)
- España(Español)
- Finland(English)
- France(Français)
- Ireland(English)
- Italia(Italiano)
- Luxembourg(English)
- Netherlands(English)
- Norway(English)
- Österreich(Deutsch)
- Portugal(English)
- Sweden(English)
- Switzerland
- United Kingdom(English)