Main Content

initcagmphd

Create constant acceleration gmphd filter

Description

phd = initcagmphd initializes a constant acceleration gmphd filter with zero components in the filter.

example

phd = initcagmphd(detections) initializes a constant acceleration gmphd filter based on information provided in object detections, detections. The function initializes a constant acceleration state with the same convention as constacc and cameas, [x; vx; ax; y; vy; ay; z; vz; az].

Note

This initialization function is not compatible with trackerGNN, trackerJPDA, and trackerTOMHT System objects.

Examples

collapse all

Consider a point target located at [1;2;3]. Create detection for the target using objectDetection.

detection = objectDetection(0,[1;2;3]);

Initialize a constant acceleration gmphd filter using initcagmphd.

phd = initcagmphd(detection);

Illustrate the initial state and the extent setup of the phd filter.

state = phd.States
state = 9×1

     1
     0
     0
     2
     0
     0
     3
     0
     0

extent = phd.HasExtent
extent = logical
   0

Consider an extended object located at [1;2;3]. The object's detections are uniformly distributed in x-, y-, and z-directions with dimensions of 1.2, 2.3, and 3.5, respectively. Generate 20 randomly distributed detections for the object using objectDetection.

detections = cell(20,1);
location = [1;2;3];
dimensions = [1.2;2.3;3.5];
rng(2019);
measurements = location + dimensions.*(-1 + 2*rand(3,20));
for i = 1:20
    detections{i} = objectDetection(0,measurements(:,i)); 
end

Initialize a constant acceleration gmphd filter using initcagmphd.

phd = initcagmphd(detections);

The initial state of the filter is same as the mean of the measurements.

state = phd.States
state = 9×1

    1.1034
         0
         0
    2.5597
         0
         0
    2.4861
         0
         0

mean_measure = mean(measurements,2)
mean_measure = 3×1

    1.1034
    2.5597
    2.4861

By default, the function sets the HasExtent property to true if the number of measurements is greater than 1.

extent = phd.HasExtent
extent = logical
   1

Input Arguments

collapse all

Object detections, specified as a cell array of objectDetection objects. You can create detections directly, or you can obtain detections from the outputs of sensor objects, such as radarSensor, monostaticRadarSensor, irSensor, and sonarSensor.

Example: detection = objectDetection(0,[1;4.5;3],'MeasurementNoise',[1.0 0 0; 0 2.0 0; 0 0 1.5])

Output Arguments

collapse all

Gaussian mixture PHD filter, returned as a gmphd object.

Algorithms

  • You can use initcagmphd as the FilterInitializationFcn property of trackingSensorConfiguration.

  • When detections are provided as input, the function adds one component to the density, which reflects the mean of the detections. When the function is called without any inputs, a filter is initialized with no components in the density.

  • The function uses the spread of measurements to specify the positional covariance.

  • The function configures the process noise of the filter by assuming a unit standard deviation for the acceleration change rate.

  • The function specifies a maximum of 500 components in the filter.

  • The function sets the HasExtent property of the filter to true if the number of input detections are greater than one.

Extended Capabilities

C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™.

Introduced in R2019b