Obstacle detection using a monocular camera