Main Content

addTracker

Add tracker to tracking architecture

Since R2021a

Description

addTracker(ta,tracker) adds a tracker object tracker to the trackingArchitecture object ta. Use this syntax if the tracker object implements the sensorIndices object function. For example, trackerPHD implements the sensorIndices object function.

example

addTracker(ta,tracker,'SensorIndices',indices) specifies the indices of sensors that report detections to the tracker. Use this syntax if the tracker object does not implement the sensorIndices object function. For example, trackerGNN, trackerJPDA, and trackerTOMHT do not implement this object function.

example

addTracker(___,'ToOutput',tf) specifies if the output of the added tracker appears in the output of tracking architecture. Specify tf as true or false. The default value is true.

addTracker(___,'Name',name) enables you to specify the name of the added tracker. The specified name is shown in the outputs of the summary and show object functions.

s = addTracker(___) returns the summary of the tracking architecture after adding the tracker.

Examples

collapse all

Create a tracking architecture.

ta = trackingArchitecture;

Create a trackerGNN object. The tracker takes detection inputs from sensors 1 and 2. Add the tracker to the tracking architecture.

tracker1 = trackerGNN('TrackerIndex',1);
addTracker(ta,tracker1,'SensorIndices',[1,2]);

Create a trackerPHD object. The tracker takes detection inputs from sensors 3 and 4. Add the tracker to the tracking architecture and disable its direct output.

tracker2 = trackerPHD('TrackerIndex',2,'SensorConfigurations',...
    {trackingSensorConfiguration(3),trackingSensorConfiguration(4)});
addTracker(ta,tracker2,'ToOutput',false); % Disable output

Create a trackFuser object. The track fuser takes track inputs from the two trackers.

fuser = trackFuser('FuserIndex',3,'SourceConfigurations',...
    {fuserSourceConfiguration(1),fuserSourceConfiguration(2)});
addTrackFuser(ta,fuser);

Display the summary of the tracking architecture.

sum = summary(ta)
sum=3×4 table
         System          ArchitectureInputs       FuserInputs        ArchitectureOutput
    _________________    __________________    __________________    __________________

    {'T1:trackerGNN'}        {'1  2'  }        {'Not applicable'}       {[       1]}   
    {'T2:trackerPHD'}        {'3  4'  }        {'Not applicable'}       {0x0 double}   
    {'F3:trackFuser'}        {0x0 char}        {'1  2'          }       {[       2]}   

Show the tracking architecture.

show(ta)

Input Arguments

collapse all

Tracking architecture, specified as a trackingArchitecture object.

Multi-object tracker, specified as one of these tracker objects:

You can also use a customized tracker inheriting from the fusion.trackingArchitecture.Tracker class.

Sensor indices, specified as a vector of positive integers. The integer values must be valid sensor index values.

Example: [1 3]

Enable tracker output in the tracking architecture, specified as true or false.

Name of the added tracker, specified as a string scalar or a character vector.

Example: 'Tracker 1'

Output Arguments

collapse all

Tracking architecture summary, returned as a table. The number of rows of the table is equal to the total number of trackers and track fusers in the tracking architecture. The table contain these columns:

  • System — A description of the system organized as 'T' or 'F' for tracker or fuser, respectively, followed by the tracker or fuser index and the class of the system. For example, 'T1: trackerJPDA' is a tracker with index 1 and class of trackerJPDA.

  • ArchitectureInputs — The indices of inputs of the tracking architectures that report detections to the specific tracker or track fuser, shown as a cell containing a character vector. Each integer is an index of the architecture input.

  • FuserInputs — The indices of track inputs to the specific fuser in the tracking architecture, shown as a cell containing a character vector. Each integer is the index of a tracker or track fuser in the architecture.

  • ArchitectureOutputs — The output index of the specific tracker or track fuser, shown as an integer. Each integer is the index of an output in the architecture.

Version History

Introduced in R2021a