Image foreground extraction using a presentation application
First Claim
1. A method of extracting a portion of an image, wherein the image is formed by a plurality of pixels, the method comprising:
- displaying the image;
generating a polygon in response to receiving one or more user inputs;
displaying the polygon as an overlay on the displayed image;
categorizing each pixel of the plurality of pixels of the image as part of a foreground of the image or as part of a background of the image, wherein the categorizing comprises;
classifying each pixel of the plurality of pixels that is enclosed by an inner boundary of the polygon as part of the foreground;
classifying each pixel of the plurality of pixels that is not enclosed by an outer boundary of the polygon as part of the background;
determining whether each pixel of the plurality of pixels that is situated between the inner boundary and the outer boundary of the polygon is one of the background, the foreground, or both the background and the foreground by;
scanning concentric circles around that pixel to locate a closest pixel of the plurality of pixels that has been classified as part of the background and a closest pixel of the plurality of pixels that has been classified as part of the foreground,generating a first pixel path to the closest pixel that has been classified as part of the background, the first pixel path including a first plurality of pixels; and
generating a second pixel path to the closest pixel that has been classified as part of the foreground, the second pixel path including second plurality of pixels; and
classifying each pixel of the plurality of pixels that is situated between the inner boundary and the outer boundary of the polygon as part of one of the background and the foreground based at least in part on a first accumulated sum of color resistance of the first plurality of pixels and a second accumulated sum of color resistance of the second plurality of pixels; and
extracting one of;
the foreground of the image by removing each pixel of the plurality of pixels that has been categorized as part of the foreground from the image; and
the background of the image by removing each pixel of the plurality of pixels that has been categorized as part of the background from the image.
1 Assignment
0 Petitions
Accused Products
Abstract
A presentation application is provided that allows a user to extract a portion of the foreground or background from an image. The user can define a polygon outlining a portion of the image, and can adjust the shape and width of the polygon. The presentation application may use the user-defined polygon to identify a background region associated with pixels lying entirely outside the polygon, a foreground region associated with pixels enclosed by the polygon, and a set of pixels that are initially unknown within the width of the polygon. The presentation application then determines whether each unknown pixel is part of the background, foreground, or part of both. Based on the classification, the presentation application can extract the foreground of the image and mask the remaining portions of the image.
141 Citations
35 Claims
-
1. A method of extracting a portion of an image, wherein the image is formed by a plurality of pixels, the method comprising:
-
displaying the image; generating a polygon in response to receiving one or more user inputs; displaying the polygon as an overlay on the displayed image; categorizing each pixel of the plurality of pixels of the image as part of a foreground of the image or as part of a background of the image, wherein the categorizing comprises; classifying each pixel of the plurality of pixels that is enclosed by an inner boundary of the polygon as part of the foreground; classifying each pixel of the plurality of pixels that is not enclosed by an outer boundary of the polygon as part of the background; determining whether each pixel of the plurality of pixels that is situated between the inner boundary and the outer boundary of the polygon is one of the background, the foreground, or both the background and the foreground by; scanning concentric circles around that pixel to locate a closest pixel of the plurality of pixels that has been classified as part of the background and a closest pixel of the plurality of pixels that has been classified as part of the foreground, generating a first pixel path to the closest pixel that has been classified as part of the background, the first pixel path including a first plurality of pixels; and generating a second pixel path to the closest pixel that has been classified as part of the foreground, the second pixel path including second plurality of pixels; and classifying each pixel of the plurality of pixels that is situated between the inner boundary and the outer boundary of the polygon as part of one of the background and the foreground based at least in part on a first accumulated sum of color resistance of the first plurality of pixels and a second accumulated sum of color resistance of the second plurality of pixels; and extracting one of; the foreground of the image by removing each pixel of the plurality of pixels that has been categorized as part of the foreground from the image; and the background of the image by removing each pixel of the plurality of pixels that has been categorized as part of the background from the image. - View Dependent Claims (2, 3, 4, 5, 31, 32, 33, 34, 35)
-
-
6. A method of extracting a portion of an image, wherein the image is formed by a plurality of pixels, the method comprising:
-
displaying the image; generating a polygon in response to receiving one or more user inputs; displaying the polygon as an overlay on the displayed image; categorizing each pixel of the plurality of pixels of the image as part of a foreground of the image or as part of a background of the image, wherein the categorizing comprises; classifying each pixel of the plurality of pixels that is enclosed by an inner boundary of the polygon as part of the foreground; classifying each pixel of the plurality of pixels that is not enclosed by an outer boundary of the polygon as part of the background; determining whether each pixel of the plurality of pixels that is situated between the inner boundary and the outer boundary of the polygon is part of the background, the foreground, or both the background and the foreground by; computing a plurality of color resistances between that pixel and each neighboring pixel, comparing, based on the computed color resistances, one or more neighboring pixels with a guidance vector pointing towards one of a closest background pixel and a closest foreground pixel to identify pixel path, the pixel path including a plurality of pixels, and computing a sum of color resistances of the plurality of pixels in the identified pixel path; and classifying each pixel of the plurality of pixels that is situated between the inner boundary and the outer boundary of the polygon as part of one of the background and the foreground based at least in part on the computed sum of the color resistances of the plurality of pixels in the identified pixel path; and extracting one of; the foreground of the image by removing each pixel of the plurality of pixels that has been categorized as part of the foreground from the image; and the background of the image by removing each pixel of the plurality of pixels that has been categorized as part of the background from the image.
-
-
7. A method of analyzing a plurality of pixels of an image, the method comprising:
-
receiving a user input that classifies a first portion of the plurality of pixels as a first part of a foreground of the image and that classifies a second portion of the plurality of pixels as a first part of a background of the image; and categorizing a first pixel of the plurality of pixels, wherein the first pixel is one of a plurality of contiguous pixels of the plurality of pixels, wherein each pixel of the plurality of contiguous pixels is not of the first portion and is not of the second portion, and wherein the categorizing comprises; identifying a first pixel path leading away from the first pixel and directed towards the foreground of the image, the first pixel path including a first set of pixels; identifying a second pixel path leading away from the first pixel and directed towards the background of the image, the second pixel path including a second set of pixels; and classifying the first pixel as part of the foreground of the image or part of the background of the image based at least in part on a first total of color resistance accumulated from traversing the first set of pixels in the identified first pixel path and on a second total of color resistance accumulated from traversing the second set of pixels in of the identified second pixel path. - View Dependent Claims (8, 9, 10, 11, 12, 13, 14, 15)
-
-
16. An electronic device for performing an extraction of a portion of an image formed by a plurality of pixels, the electronic device comprising a display, an input device, and a processor, the processor operative to:
-
display the image on the display; generate a polygon in response to receiving one or more user inputs from the input device; display the polygon on the display as an overlay on the displayed image; categorize each pixel of the plurality of pixels of the image as part of a foreground of the image or as part of a background of the image by; classifying each pixel of the plurality of pixels that is enclosed by an inner boundary of the polygon as part of the foreground; classifying each pixel of the plurality of pixels that is not enclosed by an outer boundary of the polygon as part of the background; determining whether each pixel of the plurality of pixels that is situated between the inner boundary and the outer boundary of the polygon is one of the background, the foreground, or both the background and the foreground by; scanning concentric circles around that pixel to locate a closest pixel of the plurality of pixels that has been classified as part of the background and a closest pixel of the plurality of pixels that has been classified as part of the foreground, generating a first pixel path to the closest pixel that has been classified as part of the background, the first pixel path including a first plurality of pixels; and generating a second pixel path to the closest pixel that has been classified as part of the foreground, the second pixel path including second plurality of pixels; and classifying each pixel of the plurality of pixels that is situated between the inner boundary and the outer boundary of the polygon as part of one of the background and the foreground based at least in part on a first accumulated sum of color resistance of the first plurality of pixels and a second accumulated sum of color resistance of the second plurality of pixels; and extract one of; the foreground of the image by removing each pixel of the plurality of pixels that has been categorized as part of the foreground from the image; and the background of the image by removing each pixel of the plurality of pixels that has been categorized as part of the background from the image. - View Dependent Claims (17, 18, 19, 20)
-
-
21. An electronic device for performing an extraction of a portion of an image formed by a plurality of pixels, the electronic device comprising a display, an input device, and a processor, the processor operative to:
-
display the image on the display; generate a polygon in response to receiving one or more user inputs from the input device; display the polygon on the display as an overlay on the displayed image; categorize each pixel of the plurality of pixels of the image as part of a foreground of the image or as part of a background of the image by; classifying each pixel of the plurality of pixels that is enclosed by an inner boundary of the polygon as part of the foreground; classifying each pixel of the plurality of pixels that is not enclosed by an outer boundary of the polygon as part of the background; determining whether each pixel of the plurality of pixels that is situated between the inner boundary and the outer boundary of the polygon is part of the background, the foreground, or both the background and the foreground by; computing a plurality of color resistances between that pixel and each neighboring pixel, comparing, based on the computed color resistances, one or more neighboring pixels with a guidance vector pointing towards one of a closest background pixel and a closest foreground pixel to identify a pixel path, the pixel path including a plurality of pixels, and computing a sum of color resistances of the plurality of pixels in the identified pixel path; and classifying each pixel of the plurality of pixels that is situated between the inner boundary and the outer boundary of the polygon as part of one of the background and the foreground based at least in part on the computed sum of the color resistances of the plurality of pixels in the identified pixel path; and extract one of; the foreground of the image by removing each pixel of the plurality of pixels that has been categorized as part of the foreground from the image; and the background of the image by removing each pixel of the plurality of pixels that has been categorized as part of the background from the image.
-
-
22. An electronic device for analyzing a plurality of pixels of an image, the electronic device comprising an input unit and a processor configured to:
-
receive a user input from the input unit that classifies a first portion of the plurality of pixels as a first part of a foreground of the image and that classifies a second portion of the plurality of pixels as a first part of a background of the image; and categorize a first pixel of the plurality of pixels, wherein the first pixel is one of a plurality of contiguous pixels of the plurality of pixels, wherein each pixel of the plurality of contiguous pixels is not of the first portion and is not of the second portion, and wherein the processor is configured to categorize the first pixel by; identifying a first pixel path leading away from the first pixel and directed towards the foreground of the image, the first pixel path including a first set of pixels; identifying a second pixel path leading away from the first pixel and directed towards the background of the image, the second pixel path including a second set of pixels; and classifying the first pixel as part of-the foreground of the image or part of the background of the image based at least in part on a first total of color resistance accumulated from traversing the first set of pixels in the identified first pixel path and on a second total of color resistance accumulated from traversing the second set of pixels in the identified second pixel path. - View Dependent Claims (23, 24, 25, 26, 27, 28, 29, 30)
-
Specification