Patent ID: 8879835

Claim:
A method, comprising: performing, by one or more computing devices: obtaining an image and a specified region of the image that indicates a color selection to be used in generating a mask for the image; generating a color constraint mask for the image by: generating a set of samples according to an importance sampling technique that weights selection of samples towards areas in the image that include a dominant color of the specified region; generating a radial basis function according to the generated set of samples; and computing a value at each pixel location of the color constraint mask according to the radial basis function; performing a texture analysis on the image to generate a locality constraint mask for the image that produces smoothed selections in regions of the locality constraint mask corresponding to low frequency regions of the image while maintaining edges in regions of the locality constraint mask corresponding to high frequency regions of the image; and blending the color constraint mask and the locality constraint mask to generate an output mask for the image.