Delete existing track
Delete track in
Create a track using detections in a
tracker = multiObjectTracker
tracker = multiObjectTracker with properties: TrackerIndex: 0 FilterInitializationFcn: 'initcvkf' AssignmentThreshold: [30 Inf] MaxNumTracks: 200 MaxNumDetections: Inf MaxNumSensors: 20 OOSMHandling: 'Terminate' ConfirmationThreshold: [2 3] DeletionThreshold: [5 5] HasCostMatrixInput: false HasDetectableTrackIDsInput: false StateParameters: [1x1 struct] NumTracks: 0 NumConfirmedTracks: 0
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: [6x1 double] StateCovariance: [6x6 double] StateParameters: [1x1 struct] ObjectClassID: 0 ObjectClassProbabilities: 1 TrackLogic: 'History' TrackLogicState: [1 1 0 0 0] IsConfirmed: 1 IsCoasted: 0 IsSelfReported: 1 ObjectAttributes: [1x1 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)
tracker — Multi-object tracker
multiObjectTracker System object™
Multi-object tracker, specified as a
multiObjectTracker System object.
trackID — Track identifier
Track identifier, specified as a positive integer.
deleted — Indicate if track was successfully deleted
Indicate if the track was successfully deleted or not, returned as
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
Introduced in R2020a