OpenCV  2.4.13.7
Open Source Computer Vision
cv::KalmanFilter Class Reference

#include <tracking.hpp>

Public Member Functions

 KalmanFilter ()
 the default constructor More...
 
 KalmanFilter (int dynamParams, int measureParams, int controlParams=0, int type=CV_32F)
 the full constructor taking the dimensionality of the state, of the measurement and of the control vector More...
 
void init (int dynamParams, int measureParams, int controlParams=0, int type=CV_32F)
 re-initializes Kalman filter. The previous content is destroyed. More...
 
const Matpredict (const Mat &control=Mat())
 computes predicted state More...
 
const Matcorrect (const Mat &measurement)
 updates the predicted state from the measurement More...
 

Public Attributes

Mat statePre
 predicted state (x'(k)): x(k)=A*x(k-1)+B*u(k) More...
 
Mat statePost
 corrected state (x(k)): x(k)=x'(k)+K(k)*(z(k)-H*x'(k)) More...
 
Mat transitionMatrix
 state transition matrix (A) More...
 
Mat controlMatrix
 control matrix (B) (not used if there is no control) More...
 
Mat measurementMatrix
 measurement matrix (H) More...
 
Mat processNoiseCov
 process noise covariance matrix (Q) More...
 
Mat measurementNoiseCov
 measurement noise covariance matrix (R) More...
 
Mat errorCovPre
 priori error estimate covariance matrix (P'(k)): P'(k)=A*P(k-1)*At + Q)*/ More...
 
Mat gain
 Kalman gain matrix (K(k)): K(k)=P'(k)*Ht*inv(H*P'(k)*Ht+R) More...
 
Mat errorCovPost
 posteriori error estimate covariance matrix (P(k)): P(k)=(I-K(k)*H)*P'(k) More...
 
Mat temp1
 
Mat temp2
 
Mat temp3
 
Mat temp4
 
Mat temp5
 

Detailed Description

Kalman filter.

The class implements standard Kalman filter http://en.wikipedia.org/wiki/Kalman_filter. However, you can modify KalmanFilter::transitionMatrix, KalmanFilter::controlMatrix and KalmanFilter::measurementMatrix to get the extended Kalman filter functionality.

Constructor & Destructor Documentation

§ KalmanFilter() [1/2]

cv::KalmanFilter::KalmanFilter ( )

the default constructor

§ KalmanFilter() [2/2]

cv::KalmanFilter::KalmanFilter ( int  dynamParams,
int  measureParams,
int  controlParams = 0,
int  type = CV_32F 
)

the full constructor taking the dimensionality of the state, of the measurement and of the control vector

Member Function Documentation

§ correct()

const Mat& cv::KalmanFilter::correct ( const Mat measurement)

updates the predicted state from the measurement

§ init()

void cv::KalmanFilter::init ( int  dynamParams,
int  measureParams,
int  controlParams = 0,
int  type = CV_32F 
)

re-initializes Kalman filter. The previous content is destroyed.

§ predict()

const Mat& cv::KalmanFilter::predict ( const Mat control = Mat())

computes predicted state

Member Data Documentation

§ controlMatrix

Mat cv::KalmanFilter::controlMatrix

control matrix (B) (not used if there is no control)

§ errorCovPost

Mat cv::KalmanFilter::errorCovPost

posteriori error estimate covariance matrix (P(k)): P(k)=(I-K(k)*H)*P'(k)

§ errorCovPre

Mat cv::KalmanFilter::errorCovPre

priori error estimate covariance matrix (P'(k)): P'(k)=A*P(k-1)*At + Q)*/

§ gain

Mat cv::KalmanFilter::gain

Kalman gain matrix (K(k)): K(k)=P'(k)*Ht*inv(H*P'(k)*Ht+R)

§ measurementMatrix

Mat cv::KalmanFilter::measurementMatrix

measurement matrix (H)

§ measurementNoiseCov

Mat cv::KalmanFilter::measurementNoiseCov

measurement noise covariance matrix (R)

§ processNoiseCov

Mat cv::KalmanFilter::processNoiseCov

process noise covariance matrix (Q)

§ statePost

Mat cv::KalmanFilter::statePost

corrected state (x(k)): x(k)=x'(k)+K(k)*(z(k)-H*x'(k))

§ statePre

Mat cv::KalmanFilter::statePre

predicted state (x'(k)): x(k)=A*x(k-1)+B*u(k)

§ temp1

Mat cv::KalmanFilter::temp1

§ temp2

Mat cv::KalmanFilter::temp2

§ temp3

Mat cv::KalmanFilter::temp3

§ temp4

Mat cv::KalmanFilter::temp4

§ temp5

Mat cv::KalmanFilter::temp5

§ transitionMatrix

Mat cv::KalmanFilter::transitionMatrix

state transition matrix (A)


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