MHTTrkToB:
--------------------------------------------------------------------------
Converts a "trk" data structure to a "b" matrix.
The bMeas or "b" matrix represents a stacked set of track-trees.
Each row is a different path through a track-tree
Each column is a different scan/sensor combination.
Each value in the matrix is a measurement index for that scan.
The first column of the "b" matrix has the object ID for each track.
Several tracks may have the same object ID. In this case, they
represent alternative sets of measurements that may be attributed to
the object.
Each of the remaining columns represents a different scan and sensor.
If there are multiple sensors, the matrix is organized by sensor.
The first set of columns are for the first sensor, the second set for
the second sensor, and so on. An example is provided below for clarity.
In this example, we have two scans, two sensors, and object IDs 5,6,7.
Each object has two different tracks.
ObjID Sens1/Scan1 Sens1/Scan2 Sens2/Scan1 Sens2/Scan2
5 1 1 2 1
5 2 0 1 0
6 1 3 3 1
6 1 0 1 2
7 1 3 1 1
7 1 0 2 3
The scans for sensor 1 are listed in the first two columns. The scans
for the next sensor are listed in the next two columns. Note that each
sensor could have a different number of scans.
The numbers 0,1,2,3 appear in the matrix. Each of these numbers is a
measurement index. Measurements taken during each scan are indexed
starting at 1. A value of 0 means the track has no measurement from
that sensor for that scan.
Type MHTTrkToB for a demo. Will draw the tree if there are no outputs.
--------------------------------------------------------------------------
Form:
[bMeas,bSens,bScan] = MHTTrkToB( trk )
--------------------------------------------------------------------------
------
Inputs
------
trk (:) Track data structure array
-------
Outputs
-------
bMeas (:,:) Measurement ID Matrix
bSens (:,:) Sensor ID Matrix
bScan (:,:) Scan ID Matrix
--------------------------------------------------------------------------
Children:
Common: Graphics/TreeDiagram
MHT: Graphics/MHTTreeDiagram
MHT: Utilities/MHTMatrixTreeConvert