Create constant turn-rate rectangular target
initializes a constant turn-rate rectangular target
phd = initctrectgmphd(
gmphd filter based on information provided in object detections,
detections. The data type of the filter is the same as the data type
of measurement in the detections.
The function initializes a constant turn-rate rectangular state with the same convention
W]. See Algorithms for the meaning of these
This initialization function is not compatible with
Initialize gmphd for Rectangular Target
Load detections generated by a rectangular target and the corresponding truth.
Initialize the filter using detections.
phd = initctrectgmphd(detections);
Display the estimated state and the truth state.
estState = phd.States
estState = 7×1 -0.0688 49.2233 0 0 0 3.3942 0.9871
truthState = 7×1 0 50.0000 0 30.0000 0 4.7000 1.8000
detections — Object detections
cell array of
Object detections, specified as a cell array of
objectDetection objects. You can create
directly, or you can obtain
detections from the outputs of sensor
objects, such as
detection = objectDetection(0,[1;4.5;3],'MeasurementNoise',[1.0 0
0; 0 2.0 0; 0 0 1.5])
dataType — Data type
Data type of variables used in the filter, specified as
double-precision. When specified as
the initialized filter does not use any double-precision
You can use
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 length and width of the rectangle.
The function configures the process noise of the filter by assuming a unit acceleration and a unit yaw-acceleration standard deviation.
The function specifies a maximum of 500 components in the filter.
The function configures the covariance of the state using a unit covariance in observed dimensions.
Rectangular Target State
The rectangular target state contains [x; y; s;θ; ω; L; W]:
Position of the rectangle center in x direction
Position of the rectangle center in y direction
Speed in the heading direction
Orientation angle of the rectangle with respect to x direction
Length of the rectangle
Width of the rectangle
C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™.
Version HistoryIntroduced in R2019b
R2022b: Specify data type of initialized filter object
You can use the new data type input argument to specify data type in the filter as single-precision or double-precision.