Kalman filter class.
More...
#include <opencv2/video/tracking.hpp>
|
| KalmanFilter () |
|
| KalmanFilter (int dynamParams, int measureParams, int controlParams=0, int type=CV_32F) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More...
|
|
const Mat & | correct (const Mat &measurement) |
| Updates the predicted state from the measurement. More...
|
|
void | init (int dynamParams, int measureParams, int controlParams=0, int type=CV_32F) |
| Re-initializes Kalman filter. More...
|
|
const Mat & | predict (const Mat &control=Mat()) |
| Computes a predicted state. More...
|
|
Kalman filter class.
The class implements a standard Kalman filter http://en.wikipedia.org/wiki/Kalman_filter, [104] . However, you can modify transitionMatrix, controlMatrix, and measurementMatrix to get an extended Kalman filter functionality.
- Note
- In C API when CvKalman* kalmanFilter structure is not needed anymore, it should be released with cvReleaseKalman(&kalmanFilter)
- Examples:
- samples/cpp/kalman.cpp.
◆ KalmanFilter() [1/2]
cv::KalmanFilter::KalmanFilter |
( |
| ) |
|
◆ KalmanFilter() [2/2]
cv::KalmanFilter::KalmanFilter |
( |
int |
dynamParams, |
|
|
int |
measureParams, |
|
|
int |
controlParams = 0 , |
|
|
int |
type = CV_32F |
|
) |
| |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
- Parameters
-
dynamParams | Dimensionality of the state. |
measureParams | Dimensionality of the measurement. |
controlParams | Dimensionality of the control vector. |
type | Type of the created matrices that should be CV_32F or CV_64F. |
◆ correct()
const Mat& cv::KalmanFilter::correct |
( |
const Mat & |
measurement | ) |
|
Updates the predicted state from the measurement.
- Parameters
-
measurement | The measured system parameters |
- Examples:
- samples/cpp/kalman.cpp.
◆ 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.
- Parameters
-
dynamParams | Dimensionality of the state. |
measureParams | Dimensionality of the measurement. |
controlParams | Dimensionality of the control vector. |
type | Type of the created matrices that should be CV_32F or CV_64F. |
◆ predict()
const Mat& cv::KalmanFilter::predict |
( |
const Mat & |
control = Mat() | ) |
|
◆ controlMatrix
Mat cv::KalmanFilter::controlMatrix |
control matrix (B) (not used if there is no control)
◆ errorCovPost
Mat cv::KalmanFilter::errorCovPost |
◆ 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 |
◆ measurementNoiseCov
Mat cv::KalmanFilter::measurementNoiseCov |
◆ processNoiseCov
Mat cv::KalmanFilter::processNoiseCov |
◆ statePost
Mat cv::KalmanFilter::statePost |
◆ 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 |
The documentation for this class was generated from the following file:
- opencv2/video/tracking.hpp