Main Content

initializeTrack

Initialize new track

Since R2020a

Description

trackID = initializeTrack(tracker,track) initializes a new track in the PHD tracker. The tracker must be updated at least once before initializing a track. If the track is initialized successfully, the tracker or fuser assigns the output trackID to the track, set the UpdateTime of the track equal to the last step time in the tracker, and synchronizes the data in the input track to the initialized track.

A warning is issued if the tracker or track fuser already maintains the maximum number of tracks specified by the MaxNumTracks property of the PHD tracker. In this case, the trackID is returned as 0, which indicates a failure to initialize the track.

Note

You can only use this syntax if the internal probability hypothesis density filter of the PHD tracker is gmphd. If the internal filter is ggiwphd, use the second syntax.

trackID = initializeTrack(tracker,track,filter) initializes a new track in the PHD tracker using a specified probability hypothesis density filter, filter.

Note

  • If the internal probability hypothesis density filter used in the tracker is a ggiwphd filter, you must use this syntax instead of the first syntax.

example

Examples

collapse all

Create a PHD tracker after setting up the tracking sensor configuration. Update the tracker with ten detections. The tracker maintains one track.

configuration = trackingSensorConfiguration(1);
configuration.ClutterDensity = 1e-7;
configuration.IsValidTime = true;
tracker = trackerPHD('SensorConfigurations',configuration);

dt = 0.1;
for i = 1:10
    detections = objectDetection(i*dt,[5;-5;0] + 0.2*randn(3,1));
    tracker(detections,i*dt);
end

As seen from the NumTracks property, the tracker now maintains one track.

tracker
tracker = 
  trackerPHD with properties:

                    TrackerIndex: 0
            SensorConfigurations: {[1x1 trackingSensorConfiguration]}
                 PartitioningFcn: 'partitionDetections'
                   MaxNumSensors: 20
                    MaxNumTracks: 1000
                MaxNumComponents: 1000

             AssignmentThreshold: 25
                       BirthRate: 1.0000e-03
                       DeathRate: 1.0000e-06

             ExtractionThreshold: 0.5000
           ConfirmationThreshold: 0.8000
               DeletionThreshold: 1.0000e-03
                MergingThreshold: 25
              LabelingThresholds: [1.1000 1 0.8000]

                 StateParameters: [1x1 struct]
    HasSensorConfigurationsInput: false
                       NumTracks: 1
              NumConfirmedTracks: 1

Create a new track using the objectTrack object.

newTrack = objectTrack();

Initialize a track in the PHD tracker using the newly created track.

trackID = initializeTrack(tracker,newTrack,ggiwphd)
trackID = uint32

2

As seen from the NumTracks property, the tracker now maintains two tracks.

tracker
tracker = 
  trackerPHD with properties:

                    TrackerIndex: 0
            SensorConfigurations: {[1x1 trackingSensorConfiguration]}
                 PartitioningFcn: 'partitionDetections'
                   MaxNumSensors: 20
                    MaxNumTracks: 1000
                MaxNumComponents: 1000

             AssignmentThreshold: 25
                       BirthRate: 1.0000e-03
                       DeathRate: 1.0000e-06

             ExtractionThreshold: 0.5000
           ConfirmationThreshold: 0.8000
               DeletionThreshold: 1.0000e-03
                MergingThreshold: 25
              LabelingThresholds: [1.1000 1 0.8000]

                 StateParameters: [1x1 struct]
    HasSensorConfigurationsInput: false
                       NumTracks: 2
              NumConfirmedTracks: 2

Input Arguments

collapse all

Probability hypothesis density tracker, specified as a trackerPHD object.

New track to be initialized, specified as an objectTrack object or a structure. If specified as a structure, the name, variable type, and data size of the fields of the structure must be the same as the name, variable type, and data size of the corresponding properties of the objectTrack object.

Data Types: struct | object

Probability hypothesis density filter, specified as a gmphd or ggiwphd object.

Output Arguments

collapse all

Track identifier, returned as a nonnegative integer. trackID is returned as 0 if the track is not initialized successfully.

Example: 2

Extended Capabilities

C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™.

Version History

Introduced in R2020a

See Also