1. A method of image segmentation, in which the pixels of the image are represented by the vertices of a graph, the adjacency of pixels is represented by the edges of the graph, the edges are assigned weights representing a measure of dissimilarity between adjacent pixels, a minimum spanning tree of the graph (or an approximation thereto) is generated, and edges are removed successively from the minimum spanning tree to create a spanning forest, the trees of which correspond to segments of the image, wherein the selection of an edge for removal from the spanning forest depends on a measure of distance from the edge to leaves of the tree in which the edge resides.