Automatic Detection of Obstacles in Railway Tracks Using Monocular Camera