Image segmentation using shortest path basins