Kalman Filter implementation vector dimension

I want to implement Kalman filter with OF.
I want to do a general purpose sketch or class, so the input state vector could be 2, 4 o 10 dimensional. And I need matrix operations.
But in OF there are only ofVec2 and ofVec3.

How can I manage vector and matrix dimension bigger than 3?

Hello, i have adapted a kalman algorithm in 3d to a 1D and made a class (non openframeworks but it should work).
using the class and vector technic you can create an array of it. for the matrix part, well thats another thing…

Kalman.cpp (1.1 KB)
Kalman.h (1.2 KB)

1 Like

Thank you, in this day I made a similar things using Eigen library:

Another option that I found is use OpenCv Kalman Filter.

1 Like

hello Fabio, very nice.
Could you provide an example on your github ?

my Kalman was for an arduino use, so maybe it could be fine to provide a little example.

I would like to know what is your use of matrix ?

cheers