iLab Neuromorphic Robotics Toolkit  0.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
nrt::KalmanFilter Class Reference

#include <nrt/ImageProc/Filtering/KalmanFilter.H>

implementation of a 2nd order linear Kalman Filter

This class can be used for tracking. The state vector is second order, i.e. it maintains location, speed, and accelaration to generate predictions.

Definition at line 51 of file KalmanFilter.H.

Public Member Functions

 KalmanFilter ()
 default constructor - need to call init before the filter can be used
 
 KalmanFilter (float initialM, float pNoise=DEF_PNOISE, float mNoise=DEF_MNOISE, float timeStep=DEF_TSTEP)
 constructor that initializes the filter More...
 
void init (float initialM, float pNoise=DEF_PNOISE, float mNoise=DEF_MNOISE, float timeStep=DEF_TSTEP)
 initialize the filter More...
 
float getEstimate () const
 returns a prediction for the next value
 
float getEstimate (float measurement) const
 returns a prediction for the next value given a measurement
 
float getSpeed () const
 returns the speed (second entry in the state vector)
 
float getCost (float measurement) const
 returns the cost for associating measurement with this Kalman tracker
 
float update ()
 update the filter for the next time step without a measurement (skipped value)
 
float update (float measurement)
 update the filter for the next time step with a measurement
 
Eigen::Vector3f getStateVector () const
 returns the current state vector [x, v, a]
 
Eigen::Matrix3f getCovariances () const
 returns the covariance matrix P
 
bool isInitialized () const
 test whether the filter is initialized
 

Constructor & Destructor Documentation

nrt::KalmanFilter::KalmanFilter ( float  initialM,
float  pNoise = DEF_PNOISE,
float  mNoise = DEF_MNOISE,
float  timeStep = DEF_TSTEP 
)

constructor that initializes the filter

Parameters
initialM- the initial measurement used to jump start the filter
pNoise- std of the (Gaussian) proess noise
mNoise- std of the (Gaussian) measurement noise
timeStep- the time interval between measurements (default: 1)

Member Function Documentation

void nrt::KalmanFilter::init ( float  initialM,
float  pNoise = DEF_PNOISE,
float  mNoise = DEF_MNOISE,
float  timeStep = DEF_TSTEP 
)

initialize the filter

Parameters
initialM- the initial measurement used to jump start the filter
pNoise- std of the (Gaussian) process noise
mNoise- std of the (Gaussian) measurement noise
timeStep- the time interval between measurements (default: 1)

The documentation for this class was generated from the following file: