Implemented optical flow analysis