Optical flow in python