Ask Your Question

OutOfMemoryError in Kalman Filter

asked 2012-12-26 12:05:34 -0500

chafik gravatar image


I get OutOfMemoryError when I use : KalmanFilter KF(300000, 1, 0);

Is there any solution to make kalman filter support big state vector?


edit retag flag offensive close merge delete

2 answers

Sort by » oldest newest most voted

answered 2013-01-01 06:58:12 -0500

Kalman filter applicable for linear dynamic systems. It is X[i+1] = FX[i] + BU[i] + W in common. X is N-dimensional vector. F is NN matrix. See wiki for details. In your case N = 300 000 and F matrix has 300000300000 elements. The common Kalman filter is not applicable for dense systems of such size. If X is sparse, you need to use special implementation of Kalman filter for your purposes. In other case you need some thing else.

edit flag offensive delete link more

answered 2013-01-01 08:43:37 -0500

chafik gravatar image

Thanks, is there an implementation with opencv of kalman filter for dense systems?

edit flag offensive delete link more


OpenCV implements Kalman filter by Greg Welch and Gary Bishop “An Introduction to the Kalman Filter”, 1995.

Alexander Smorkalov gravatar imageAlexander Smorkalov ( 2013-01-01 13:10:03 -0500 )edit

Question Tools


Asked: 2012-12-26 12:05:34 -0500

Seen: 263 times

Last updated: Jan 01 '13