Patent ID: 8050498

Claim:
A computer-implemented method, comprising: receiving user input as an unbroken stroke drawn on an image, the unbroken stroke defining a sample of pixels from an image, the image being defined by a raster of pixels, wherein the unbroken stroke defining the sample of pixels from the image includes a first event defining a beginning of the definition of the sample of pixels and a second event defining an end of the definition of the sample of pixels; defining a plurality of piecewise constant regional cost values independent of the sample of pixels, wherein the piecewise constant regional cost values include: a foreground cost value associated with a foreground classification; a background cost value associated with a background classification; and a bias cost value associated with a bias toward the background classification or the foreground classification; and while receiving the user input as an unbroken stroke, performing the following actions one or more times after receiving the first event but before receiving the second event: classifying pixels in the raster of pixels into one or more coherent regions, with each region classified as being foreground or background based on the sample of pixels and using the plurality of piecewise constant regional cost values, wherein each coherent region includes at least some pixels in the raster of pixels not included in the sample of pixels; and updating a rendering of the image on a display to depict classified foreground pixels and background pixels as the sample is being defined.