Patent ID: 8422769

Claim:
A computer-implemented method of segmenting an image into foreground and background portions, the method comprising: determining a foreground training region and a background training region of the image; determining foreground and background properties based on said foreground and background training regions; and computing foreground and background portions of the image by optimizing a first energy function, wherein the first energy function comprises a function of the foreground and background properties, and wherein the step of determining a foreground training region and a background training region of the image comprises: receiving, at a computer, a user input defining a region of the image; on the basis of the user input, segmenting the image into a first portion comprising image elements having a foreground label and a second portion of image elements having a background label, wherein the foreground label comprises a segmentation parameter which has a first value and the background label comprises a segmentation parameter which has a second value; defining a second energy function comprising a combination of the first energy function and an additional term, the additional term comprising a combination of a scalar value and the segmentation parameter for an image element, summed over a plurality of image elements; optimizing the second energy function using a plurality of different values of the scalar value to produce a plurality of optimization results, each optimization result defining a candidate foreground training region and a candidate background training region; and selecting one of the plurality of optimization results to provide the foreground and background training regions.