When I try to predict Kalman,
k = cv2.KalmanFilter(2,1,0) c = np.array([(0.0),(0.0)]).reshape(2,1) a = k.predict(c)
I am getting following Assertion Error.
error: /home/jay/Downloads/OpenCV-2.4.0/modules/core/src/matmul.cpp:711: error: (-215) type == B.type() && (type == CV32FC1 || type == CV64FC1 || type == CV32FC2 || type == CV64FC2) in function gemm
So, I added following line of code in
OpenCV-2.4.0/modules/core/src/matmul.cpp and rebuilt it from the source.
So, now it gives me output as,
Am I doing something wrong here ? What's the problem ?
answered 2012-07-16 15:38:53 -0500blue
The python wrapper for this class is incomplete. Nowhere in your example did you specify any of the system matrices or noise covariances, and indeed the python wrapper does not provide a method to do this.
If you look at the sample kalman.cpp, you can see that the C++ API requires the transition, measurement, control and noise covariance matrices to be initialized after the filter object is constructed.
You might want to write up a feature request on the bug tracker for this.
Asked: 2012-07-08 23:40:49 -0500
Seen: 309 times
Last updated: Jul 16 '12