Image mask generation
AssigneeAdobe Systems Incorporated
InventorGregg D. Wilensky
Life of this patent
Estimating the term…
Abstract
Methods, systems, and apparatus, including computer program products feature identifying a first plurality of pixels in a raster image as foreground pixels and a distinct second plurality of pixels in the raster image as background pixels. Each of the foreground and background pixels have a respective color value. The color values of the foreground pixels and the color values of the background pixels are used to solve for a color model of opacity. The color model of opacity is used to determine an opacity value for a pixel in the raster image.
Claims63
A computer-implemented method comprising:
- identifying a first plurality of pixels in a raster image as foreground pixels and a distinct second plurality of pixels in the raster image as background pixels, each of the foreground pixels and background pixels having a respective color value;
- solving for a color model of opacity, including determining coefficients of the color model of opacity using the color values of the foreground pixels and the color values of the background pixels, where the color model of opacity is a function that determines an opacity for a given pixel from a sum of products of color components of the respective color value of the given pixel, each product weighted by one of the coefficients, where the coefficients are determined so as to minimize error in a partition of the foreground and background pixels, and where the error is measured based on the foreground pixels that are in a background partition and the background pixels that are in a foreground partition;
- and
- determining an opacity value for a pixel in the raster image using the color model of opacity;
- wherein solving is performed by one or more processors.
A computer-implemented method comprising:
- receiving user input identifying a first plurality of pixels in a raster image as one of foreground pixels or background pixels, each of the pixels in the raster image having a respective color value;
- identifying a distinct second plurality of pixels in the raster image as the other of the foreground pixels or the background pixels, each of the pixels in the distinct second plurality of pixels having a respective color value;
- solving for a color model of opacity, including determining coefficients of the color model of opacity using the color values of the foreground pixels and the color values of the background pixels, where the color model of opacity is a function that determines an opacity for a pixel based on the respective color value of the pixel, where the function is a sum of products of color components of the respective color value of the pixel, each product weighted by one of the coefficients, where the coefficients are determined so as to minimize error in a partition of the foreground and background pixels, and where the error is measured based on the foreground pixels that are in a background partition and the background pixels that are in a foreground partition;
- and
- producing an opacity mask for the raster image by using the color model of opacity to determine a respective opacity value for each of the pixels of the raster image;
- wherein the solving is performed by one or more processors.
A computer program product, encoded on a machine-readable storage device or machine-readable storage substrate, operable to cause data processing apparatus to perform operations comprising:
- identifying a first plurality of pixels in a raster image as foreground pixels and a distinct second plurality of pixels in the raster image as background pixels, each of the foreground pixels and background pixels having a respective color value;
- solving for a color model of opacity, including determining coefficients of the color model of opacity using the color values of the foreground pixels and the color values of the background pixels, where the color model of opacity is a function that determines an opacity for a pixel based on the respective color value of the pixel, where the function is a sum of products of color components of the respective color value of the pixel, each product weighted by one of the coefficients, where the coefficients are determined so as to minimize error in a partition of the foreground and background pixels, where the error is measured based on the foreground pixels that are in a background partition and the background pixels that are in a foreground partition;
- and
- determining an opacity value for a pixel in the raster image using the color model of opacity.
A computer program product, encoded on a machine readable storage device or machine readable storage substrate, operable to cause data processing apparatus to perform operations comprising:
- receiving user input identifying a first plurality of pixels in a raster image as one of foreground pixels or background pixels, each of the pixels in the raster image having a respective color value;
- identifying a distinct second plurality of pixels in the raster image as the other of the foreground pixels or the background pixels, each of the pixels in the distinct second plurality of pixels having a respective color value;
- solving for a color model of opacity, including determining coefficients of the color model of opacity using the color values of the foreground pixels and the color values of the background pixels, where the color model of opacity is a function that determines an opacity for a pixel based on the respective color value of the pixel, where the function is a sum of products of color components of the respective color value of the pixel, each product weighted by one of the coefficients, where the coefficients are determined so as to minimize error in a partition of the foreground and background pixels, where the error is measured based on the foreground pixels that are in a background partition and the background pixels that are in a foreground partition;
- and
- producing an opacity mask for the raster image by using the color model of opacity to determine a respective opacity value for each of the pixels of the raster image.
A system comprising:
- a display device;
- a computer program product encoded on a computer-readable storage device or machine readable storage substrate;
- one or more processors configured to execute the program product and perform operations comprising:
- identifying a first plurality of pixels in a raster image as foreground pixels and a distinct second plurality of pixels in the raster image as background pixels, each of the foreground pixels and background pixels having a respective color value;
- solving for a color model of opacity, including determining coefficients of the color model of opacity using the color values of the foreground pixels and the color values of the background pixels, where the color model of opacity is a function that determines an opacity for a pixel based on the respective color value of the pixel, where the function is a sum of products of color components of the respective color value of the pixel, each product weighted by one of the coefficients, where the coefficients are determined so as to minimize error in a partition of the foreground and background pixels, where the error is measured based on the foreground pixels that are in a background partition and the background pixels that are in a foreground partition;
- and
- determining an opacity value for a pixel in the raster image using the color model of opacity.
A system comprising:
- a display device;
- a computer program product encoded on a computer-readable storage device or machine readable storage substrate;
- one or more processors configured to execute the program product and perform operations comprising:
- receiving user input identifying a first plurality of pixels in a raster image as one of foreground pixels or background pixels, each of the pixels in the raster image having a respective color value;
- identifying a distinct second plurality of pixels in the raster image as the other of the foreground pixels or the background pixels, each of the pixels in the distinct second plurality of pixels having a respective color value;
- solving for a color model of opacity, including determining coefficients of the color model of opacity using the color values of the foreground pixels and the color values of the background pixels, where the color model of opacity is a function that determines an opacity for a pixel based on the respective color value of the pixel, where the function is a sum of products of color components of the respective color value of the pixel, each product weighted by one of the coefficients, where the coefficients are determined so as to minimize error in a partition of the foreground and background pixels, where the error is measured based on the foreground pixels that are in a background partition and the background pixels that are in a foreground partition;
- and
- producing an opacity mask for the raster image by using the color model of opacity to determine a respective opacity value for each of the pixels of the raster image.
Dependencies are inferred from the claim text.