%% Initialize Track in multiObjectTracker
% Create a multi-object tracker and update the tracker with detections at t=0 and t=1second.

tracker = multiObjectTracker
detection1 = objectDetection(0,[1;1;1]);
detection2 = objectDetection(1,[1.1;1.2;1.1]);
tracker(detection1,0);
currentTrack = tracker(detection2,1);

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

tracker

% Create a new track using the objectTrack object.

newTrack = objectTrack()

% Initialize a track in the GNN tracker object using the newly created track.

trackID = initializeTrack(tracker,newTrack)

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

tracker

% Copyright 2019 The MathWorks, Inc.