Learning an Image-based Obstacle Detector With Automatic Acquisition of Training Data