Planar Ultrametrics for Image Segmentation