deleteTrack

Delete existing track

Description

example

deleted = delteTrack(obj,trackID) deletes the track specified by trackID in the tracker or track fuser object, obj.

Examples

collapse all

Create a track using detections in a GNN tracker.

tracker = trackerGNN;
detection1 = objectDetection(0,[1;1;1]);
detection2 = objectDetection(1,[1.1;1.2;1.1]);
tracker(detection1,0);
tracker(detection2,1)
ans = 
  objectTrack with properties:

             TrackID: 1
            BranchID: 0
         SourceIndex: 0
          UpdateTime: 1
                 Age: 2
               State: [6×1 double]
     StateCovariance: [6×6 double]
     StateParameters: [1×1 struct]
       ObjectClassID: 0
          TrackLogic: 'History'
     TrackLogicState: [1 1 0 0 0]
         IsConfirmed: 1
           IsCoasted: 0
      IsSelfReported: 1
    ObjectAttributes: [1×1 struct]

Delete the first track.

deleted1 = deleteTrack(tracker,1)
deleted1 = logical
   1

Uncomment the following to delete a nonexistent track. A warning will be issued.

% deleted2 = deleteTrack(tracker,2)

Input Arguments

collapse all

Tracker or fuser object, specified as a trackerTOMHT, trackerJPDA, trackerGNN\, trackerPHD, or trackFuser object.

Track identifier, specified as a positive integer.

Example: 21

Output Arguments

collapse all

Indicate if the track was successfully deleted or not, returned as 1 or 0. If the track specified by the trackID input existed and was successfully deleted, it returns as 1. If the track did not exist, a warning is issued and it returns as 0.

Introduced in R2019b