getting obstacles from the image