%% Display and Set Tracking Filter Properties in Multi-Object Tracker
% Create a multiObjectTracker System object™ using a constant-acceleration, linear Kalman filter for all tracks.

tracker = multiObjectTracker('FilterInitializationFcn',@initcakf, ...
    'ConfirmationParameters',[4 5],'DeletionThreshold',[9 9]);

%
% Create two detections and generate tracks for these detections.

detection1 = objectDetection(1.0,[10; 10]);
detection2 = objectDetection(1.0,[1000; 1000]);
[~,tracks] = tracker([detection1 detection2],1.1)

% Get filter property values for the first track. Display the process noise values.

values = getTrackFilterProperties(tracker,1,'MeasurementNoise','ProcessNoise','MotionModel');
values{2}

%
% Set new values for this property by doubling the process noise for the first track. Display the updated process noise values.

setTrackFilterProperties(tracker,1,'ProcessNoise',2*values{2});
values = getTrackFilterProperties(tracker,1,'ProcessNoise');
values{1}

% Copyright 2012 The MathWorks, Inc.