Image Segmentation through a Hierarchy of Minimum Spanning Trees