A method and an apparatus process images. The method according to one embodiment accesses digital image data representing an image including an object clusters pixels of the image to obtain clusters generates a graph with pixels of the image and cluster membership information of pixels in the clusters and segments the graph using a max-flow segmentation to obtain pixels of the image associated with the object.