• Anatoly Orlov's avatar
    kalman.py was broken totally · 2be805ce
    Anatoly Orlov authored
    1. Following condition is True on each iteration becuase -1 % 0xFF is 255 not -1
    
    code = cv2.waitKey(100) % 0x100
    if code != -1:
       break
    
    this were resetting point position on each cycle not on key press as intended
    
    2. Previous small bug were masking serious bug with matrix operation on matrices of incorrect size.
       As the result on 2nd iteration of internal cycle program has crushed.
    
       I have fixed it too, matrix operation was taken from examples/cpp/kalman.cpp where it looks like
       randn( processNoise, Scalar(0), Scalar::all(sqrt(KF.processNoiseCov.at<float>(0, 0))));
       which is something totally different from previous code here.
    
       Example behave as it should now, i.e. point moving by circle trajectory as in C++ example.
    2be805ce
Name
Last commit
Last update
.github Loading commit data...
3rdparty Loading commit data...
apps Loading commit data...
cmake Loading commit data...
data Loading commit data...
doc Loading commit data...
include Loading commit data...
modules Loading commit data...
platforms Loading commit data...
samples Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
.tgitconfig Loading commit data...
CMakeLists.txt Loading commit data...
CONTRIBUTING.md Loading commit data...
LICENSE Loading commit data...
README.md Loading commit data...