1. A method for multi-label segmentation of an image, the method comprising: determining an energy function for the image; grouping variables of the energy function for a homogeneous region of the image to a single variable; minimizing the energy function; and assigning labels to regions of the image based on the minimized energy function.