I'm trying to build a veeery simple tracker for 2D objects using python wrapper for OpenCV (cv2).
I've only noticed 3 functions:
- KalmanFilter (constructor)
- .predict()
- .correct(measurement)
My idea is to create a code to check if kalman is working like this:
kf = cv2.KalmanFilter(...)
# set initial position
cv2.predict()
corrected_position = cv2.correct([measurement_x, measurement_y])
I've found some examples using the cv wrapper but not the cv2...
Thanks in advance!
if you're using opencv2.4, then it's bad news: the KalmanFilter is unusable, since you cannot set the transition (or any other) Matrix.
for opencv3.0 it works correctly, like this: