I just working on the task above as the URL below shows.
http://opencv-python-tutroals.readthedocs.io/en/latest/py_tutorials/py_video/py_lucas_kanade/py_lucas_kanade.html#lucas-kanade-optical-flow-in-opencv
But everytime I try, the error massage below emerges.
ーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーー
OpenCV Error: Assertion failed (size.width>0 && size.height>0) in imshow, file /tmp/opencv-20160915-26910-go28a5/opencv-2.4.13/modules/highgui/src/window.cpp, line 261 Traceback (most recent call last): File "lucaskanade.py", line 47, in <module> cv2.imshow('frame',img) cv2.error: /tmp/opencv-20160915-26910-go28a5/opencv-2.4.13/modules/highgui/src/window.cpp:261: error: (-215) size.width>0 && size.height>0 in function imshow
ーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーー Could somebody tell me how to solve this problem?