Optical flow templates for mobile robot environment understanding