<p>So, what it seems you need to do is get pyKalman rather than using the opencv one. From my quick search, all that is available from opencv is what you mention:</p>

<pre><code>'KERNEL_SYMMETRICAL', 'KMEANS_PP_CENTERS', 'KMEANS_RANDOM_CENTERS', 'KMEANS_USE_INITIAL_LABELS', 'KNearest', 'KalmanFilter', 'KeyPoint', 'LEV_MARQ_CALC_J', 'LEV_MARQ_CHECK_ERR', 'LEV_MARQ_DONE', 'LEV_MARQ_STARTED', 'LMEDS', 'LUT', 'Laplacian', 'MAGIC_MASK',
</code></pre>

<p>You could also just implement your own defintion. </p>

<p>Please do read these:
<a href="http://filterpy.readthedocs.io/en/latest/kalman/KalmanFilter.html" rel="nofollow noreferrer">http://filterpy.readthedocs.io/en/latest/kalman/KalmanFilter.html</a>
<a href="https://arxiv.org/ftp/arxiv/papers/1204/1204.0375.pdf" rel="nofollow noreferrer">https://arxiv.org/ftp/arxiv/papers/1204/1204.0375.pdf</a>
<a href="https://stackoverflow.com/questions/29012038/is-there-any-example-of-cv2-kalmanfilter-implementation">Is there any example of cv2.KalmanFilter implementation?</a></p>

<p>Sorry I couldn't get your answer all sorted out.</p>

<p><strong>--EDIT--</strong></p>

<p>According to the documentation you may use:</p>

<p>cv2.KalmanFilter.correct(measurement) → retval</p>

<pre><code>import numpy as np
import cv2
import cv2.cv as cv

kalman = cv2.KalmanFilter(4,2)
X = np.array([[1,0,0,0],[0,1,0,0]],np.float32)
Y=kalman.correct(X)
</code></pre>

<p>The first problem I notice is that after the first line where the Kalman filter is defined, the filter as such is not shown in my variable explorer. The numpy array does show but it makes me wonder about the Kalman. </p>

<p>Further when I use Y=Kalman.correct(X) there is a problem with dimensions, but at least it is one step closer. I also find it odd that the documentation says I can define a CV_32F or CV_64F, as type in the KalmanFilter, but I just can't get it to work!!!</p>

<p>source:</p>

<p><a href="http://docs.opencv.org/2.4/modules/video/doc/motion_analysis_and_object_tracking.html?highlight=kalman%20python#cv.CreateKalman" rel="nofollow noreferrer">http://docs.opencv.org/2.4/modules/video/doc/motion_analysis_and_object_tracking.html?highlight=kalman%20python#cv.CreateKalman</a></p>
OpenCV's Kalman Filter lacks Matricies
<p>I have OpenCv 2.4.8 installed and, for the most part, working on Python 2.7 (I'm on Ubuntu).</p>

<p>Everything seems to be working fine with OpenCv. However, the following code</p>

<pre><code>import numpy as np
kalman = cv2.KalmanFilter(4,2)
kalman.measurementMatrix = np.array([[1,0,0,0],[0,1,0,0]],np.float32)
</code></pre>

<p>gives me this error:</p>

<blockquote>
  <p>AttributeError: 'cv2.KalmanFilter' object has no attribute
  'measurementMatrix'</p>
</blockquote>

<p>Indeed, <code>dir(kalman)</code> shows that only <code>correct()</code> and <code>predict()</code> are the only functions or variables that aren't built-in. No <code>transitionMatrix</code>, <code>processNoiseCov</code> or <code>measurementNoiseCov</code> are present.</p>

<p>Does anyone know what the problem here could be?</p>