This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.


Create constant velocity tracking alpha-beta filter from detection report


abf = initcvabf(detection)



abf = initcvabf(detection) initializes a constant velocity alpha-beta filter for object tracking based on information provided in detection.


collapse all

Create an objectDetection with a position measurement at x=1, y=3 and a measurement noise of [1 0.2; 0.2 2];

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

Use initcvabf to create a trackingABF filter initialized at the provided position and using the measurement noise defined above.

ABF = initcvabf(detection);

Check the values of the state and measurement noise. Verify that the filter state, ABF.State, has the same position components as the Detection.Measurement. Verify that the filter measurement noise, ABF.MeasurementNoise, is the same as the Detection.MeasurementNoise values.

ans =


ans =

    1.0000    0.2000
    0.2000    2.0000

Input Arguments

collapse all

Detection report, specified as an Object Detections object.

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

Constant velocity alpha-beta tracking filter for object tracking, returned as a trackingABF object.


  • The function computes the process noise matrix assuming a unit acceleration standard deviation.

  • You can use this function as the FilterInitializationFcn property of trackerTOMHT and trackerGNN System objects.

Extended Capabilities

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

Introduced in R2018b