Patent ID: 8249349

Claim:
A method, comprising the steps of: accessing, by a processor, a digital image, the digital image comprising a plurality of image elements each to be labeled; storing an energy function in a memory, the energy function comprising a plurality of terms, at least one of the plurality of terms being dependent on a parameter which describes a characteristic of each of the image elements having a same label; accessing possible values of the parameter; applying the energy function to both the digital image and the possible values of the parameter, and globally optimizing the energy function to obtain a labeled version of the digital image and an output value of the parameter; wherein the globally optimizing the energy function comprises using a tree structure comprising a plurality of nodes, wherein each node of the tree structure is associated with the possible values of the parameter; wherein the globally optimizing the energy function further comprises using a branch-and-bound search over the tree structure, wherein the branch-and-bound search computes a lower bound of the energy function using a min-cut process; and outputting and storing, in the memory, the labeled version of the digital image.