OpenCV Q&A Forum - RSS feedhttp://answers.opencv.org/questions/OpenCV answersenCopyright <a href="http://www.opencv.org">OpenCV foundation</a>, 2012-2018.Mon, 06 Nov 2017 21:08:45 -0600Kalman filter matriceshttp://answers.opencv.org/question/177744/kalman-filter-matrices/ Hi,
I'm working with a kalman filter but I can't figure out or can't find documentation about the different matrices. I'm wondering what the values of the next matrices must be:
setIdentity(KF.measurementMatrix);
setIdentity(KF.processNoiseCov, Scalar::all(1e-5));
setIdentity(KF.measurementNoiseCov, Scalar::all(1e-1));
setIdentity(KF.errorCovPost, Scalar::all(1));
Thanks!Mon, 06 Nov 2017 10:14:40 -0600http://answers.opencv.org/question/177744/kalman-filter-matrices/Comment by LBerger for <p>Hi,</p>
<p>I'm working with a kalman filter but I can't figure out or can't find documentation about the different matrices. I'm wondering what the values of the next matrices must be:</p>
<pre><code>setIdentity(KF.measurementMatrix);
setIdentity(KF.processNoiseCov, Scalar::all(1e-5));
setIdentity(KF.measurementNoiseCov, Scalar::all(1e-1));
setIdentity(KF.errorCovPost, Scalar::all(1));
</code></pre>
<p>Thanks!</p>
http://answers.opencv.org/question/177744/kalman-filter-matrices/?comment=177767#post-id-177767You can find an example [here](http://answers.opencv.org/question/71937/kalman-filter-question/) or [here](https://docs.opencv.org/master/d1/da2/kalman_8cpp-example.html#_a7)Mon, 06 Nov 2017 14:37:20 -0600http://answers.opencv.org/question/177744/kalman-filter-matrices/?comment=177767#post-id-177767Answer by Tetragramm for <p>Hi,</p>
<p>I'm working with a kalman filter but I can't figure out or can't find documentation about the different matrices. I'm wondering what the values of the next matrices must be:</p>
<pre><code>setIdentity(KF.measurementMatrix);
setIdentity(KF.processNoiseCov, Scalar::all(1e-5));
setIdentity(KF.measurementNoiseCov, Scalar::all(1e-1));
setIdentity(KF.errorCovPost, Scalar::all(1));
</code></pre>
<p>Thanks!</p>
http://answers.opencv.org/question/177744/kalman-filter-matrices/?answer=177787#post-id-177787The mapping between the [wikipedia](https://en.wikipedia.org/wiki/Kalman_filter) notation and OpenCV matrix names is as follows:
- measurementMatrix == H_k
- processNoiseCov == Q_k
- measurementNoiseCov == R_k
- errorCovPost == P_k|k
- statePost == x_k|k
- transitionMatrix == F_k
- controlMatrix (rarely used) == B_k
The values to put in those matrices is, of course, highly dependent on what you're actually doing, and not something we can tell you.Mon, 06 Nov 2017 21:08:45 -0600http://answers.opencv.org/question/177744/kalman-filter-matrices/?answer=177787#post-id-177787