getTrackFilterProperties

Obtain filter properties of track from multi-object tracker

Description

example

values = getTrackFilterProperties(tracker,trackID,property) returns the tracking filter property values for a specific track within a multi-object tracker. trackID is the ID of that specific track.

example

values = getTrackFilterProperties(tracker,trackID,property1,...,propertyN) returns multiple property values. You can specify the properties in any order.

Examples

collapse all

Create a multiObjectTracker System object™ using a constant-acceleration, linear Kalman filter for all tracks.

tracker = multiObjectTracker('FilterInitializationFcn',@initcakf, ...
    'ConfirmationParameters',[4 5],'NumCoastingUpdates',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)
tracks=2×9 struct
    TrackID
    Time
    Age
    State
    StateCovariance
    IsConfirmed
    IsCoasted
    ObjectClassID
    ObjectAttributes

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

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

    0.0000    0.0005    0.0050         0         0         0
    0.0005    0.0100    0.1000         0         0         0
    0.0050    0.1000    1.0000         0         0         0
         0         0         0    0.0000    0.0005    0.0050
         0         0         0    0.0005    0.0100    0.1000
         0         0         0    0.0050    0.1000    1.0000

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}
ans = 6×6

    0.0001    0.0010    0.0100         0         0         0
    0.0010    0.0200    0.2000         0         0         0
    0.0100    0.2000    2.0000         0         0         0
         0         0         0    0.0001    0.0010    0.0100
         0         0         0    0.0010    0.0200    0.2000
         0         0         0    0.0100    0.2000    2.0000

Input Arguments

collapse all

Multi-object tracker, specified as a multiObjectTracker System object.

Track ID, specified as a positive integer. trackID must be a valid track in tracker.

Tracking filter property to return values for, specified as a character vector or string scalar. property must be a valid property of the tracking filter used by tracker. Valid tracking filters are trackingKF, trackingEKF, and trackingUKF.

You can specify additional properties in any order.

Example: 'MeasurementNoise','ProcessNoise'

Data Types: char | string

Output Arguments

collapse all

Tracking filter property values, returned as a cell array. Each element in the cell array corresponds to the values of a specified property. getTrackFilterProperties returns the values in the same order in which you specified the corresponding properties.

Introduced in R2017a