Added optical flow functionality. Not yet integrated