Optical flow based obstacle detection in static environment