An image's pixels are initially segmented into pixels of the image foreground and background by comparing the pixels of the image to updated models of background reference pixels. pixel structures are identified in the image. The probability that a pixel is in the background or foreground is refined by considering the initial segmentation of the pixel's neighbors and the pixel's membership in a pixel structure. If a pixel is identified as a background pixel it is replaced by a pixel of a new background.
|
1. A method of segmenting an image, said method comprising the steps of:
(a) capturing said image comprising a plurality of input pixels representing a background and a foreground of a scene;
(b) capturing a background reference image comprising a plurality of background reference pixels representing said background of said scene;
(c) classifying an input pixel as one a pixel of said background and said foreground according to a relationship of said input pixel to a background reference pixel;
(d) identifying a structure in said input image; and
(e) revising said classification of said input pixel according to a membership of said input pixel in said structure.
18. A method of segmenting an image comprising the steps of:
(a) capturing said image comprising a plurality of input pixels representing a background and a foreground of a scene;
(b) capturing a background reference image comprising a plurality of background reference pixels representing a background of said scene;
(c) determining a probability that an input pixel is a pixel of one of said background and said foreground according to a relationship of a value measuring said input pixel and a value measuring a background reference pixel;
(d) identifying a pixel structure in said image;
(f) revising said probability for said input pixel according to a membership of said input pixel in said pixel structure and a probability that a neighboring pixel is a pixel of one of said background and said foreground; and
(g) revising said value measuring said a background reference pixel according to a relationship of said background reference pixel and said input pixel.
2. The method
(a) determining a first probability that said input pixel is a pixel of one of said background and said foreground if a relationship of said input pixel and said background reference pixel at least equals a threshold; and
(b) determining a second probability that said input pixel is a pixel of one of said background and said foreground if said relationship of said input pixel and said background reference pixel does not at least equal to said threshold.
3. The method of
4. The method of
5. The method of
6. The method of
7. The method of
8. The method of
9. The method of
10. The method of
11. The method of
(a) revising one of said first and said second probabilities according to a first relationship if said input pixel is a pixel included in said structure; and
(b) revising one of said first and said second probabilities according to a second relationship if said input pixel is not a pixel included in said structure.
12. The method of
13. The method of
14. The method of
15. The method of
16. The method of
17. The method of
19. The method
(a) determining a first probability that said input pixel is a pixel of one of said background and said foreground if a relationship of said values measuring said input pixel and said background reference pixel at least equals a threshold; and
(b) determining a second probability that said input pixel is a pixel of one of said background and said foreground if said relationship of said values measuring said input pixel and said background reference pixel does not at least equal to said threshold.
20. The method of
21. The method of
22. The method of
23. The method of
24. The method of
25. The method of
26. The method of
27. The method of
28. The method of
(a) assigning a first probability value to said input pixel if said input pixel is a pixel included in said structure; and
(b) assigning a second probability value to said input pixel if said input pixel is not a pixel included in said structure.
29. The method of
30. The method of
31. The method of
32. The method of
33. The method of
|
This application is a division of U.S. application Ser. No. 09/872,205, filed May 31, 2001.
The present invention relates to image processing, and more particularly, to an image processing method facilitating replacement of the background of an image with a new background.
Background replacement is an image processing method commonly used in professional production of images, video, and motion pictures. Background replacement generally comprises the steps of segmenting the elements of the foreground and background of an image followed by substituting pixels of a new background for the pixels of the image's original background. Blue screening or chroma keying is a background replacement process commonly used by professional movie, video, and, televison studios. In the blue screening process, the foreground elements of an image are captured in front of a screen of a uniform color, usually blue. During editing, the blue pixels are identified as background pixels and replaced with spatially corresponding pixels from a replacement background. While blue screening or chroma key replacement is commonly used in motion picture and television production, the process is not well suited to amateur or non-studio image and video production. For the technique to work properly, the pixels of the background screen must be a uniform color so that they will be correctly identified. Therefore, the foreground elements of the image must be filmed in a studio under carefully controlled lighting conditions. In addition, the color of the background screen must be significantly different from the color of pixels of the foreground elements of the image. Any “blue” pixels of a foreground element will be identified as background and replaced.
To avoid the cost and limitations of the blue screening process, techniques have been developed to perform background replacement without the necessity of a blue screen. Generally, these processes utilize either a global-based or a pixel-based method to segment the foreground and background elements of the image. A global-based method typically classifies image elements as foreground or background on the basis of models of typical foreground or background elements. However, accurate classification of foreground and background elements with these methods is limited by the difficulty of modeling complex objects in the feature space (typically, a color space) in which the segmentation process operates.
Pixel-based methods classify each pixel of the image as either a background or foreground pixel by comparing the pixel to its spatially corresponding counterpart in a separately recorded image that includes only the background. For example, Korn, U.S. Pat. No. 5,781,198, METHOD AND APPARATUS FOR REPLACING A BACKGROUND PORTION OF AN IMAGE, discloses a pixel-based background replacement technique. Two images of a scene are captured. A first or input image includes both the foreground elements and the background. A second image includes only the background. The pixels of the images are sampled and stored. A copy of both images is low-pass filtered to create blurred versions of the images. Spatially corresponding pixels from the two filtered images are compared. If pixels of a spatially corresponding pair are similar, the pixel from the input image is assumed to be from the background. However, if the pixels of a pair are sufficiently different, the pixel from the input image is classified as a foreground pixel. A binary image mask is created to indicate the membership of each pixel of the input image in either the pixels of the foreground or the background. Utilizing the image mask, spatially corresponding pixels of a new background image are substituted for the pixels of the original background of the input image.
While pixel-based techniques generally provide more accurate image segmentation than global replacement techniques, accurate pixel-based segmentation requires consistency between the background pixels of the input image and the pixels of the background reference image. If a pair of spatially corresponding pixels from the two images varies significantly, the pixel at that location will be classified as a foreground pixel. However, the values of pixels of sequential images of the same scene can vary substantially due to extraneous influences. For example, noise originating in the charge-coupled device (CCD) of the camera can produce random variations in the values of the spatially corresponding pixels of two images of a sequence. In highly textured areas of an image, such as an area capturing an image of the leaves of a plant, the values of adjacent pixels can vary substantially. Even slight movement of the camera or a minor change in surface lighting can cause significant differences in the values of spatially corresponding pixels of textured areas of sequential images. In addition, small object motion, such as movement of the leaves of a plant, will substantially reduce the accuracy of pixel-based image segmentation. As a result, pixel-based background replacement for video is generally limited to video sequences of indoor scenes having a stationary, low texture background that is captured with high quality video equipment.
What is desired, therefore, is an image background replacement system that provides accurate image segmentation, can be produced with readily available equipment, and is tolerant of noise and motion of small objects in the image background.
Image background replacement may be used in a number applications. By way of example, a video conference may be more acceptable or persuasive to certain participants if the background resulting from filming in a studio, conference room, or exterior location is replaced with a new background. Likewise, a video artist may wish to replace the background of a video sequence with animation or another special effect. However, for many of these applications the costs of professional background replacement editing and video acquisition with expensive professional grade equipment under carefully controlled conditions are not justifiable. A system facilitating convenient image and video background replacement with generally available video capture and editing equipment is highly desired.
Referring to
The imaging device 22 may be any type of camera or device capable of capturing images of a scene 28. To facilitate editing and processing of images captured by the imaging device 22, the imaging device 22 or the computer system 24 typically includes an image capture unit 36 that converts the images captured by the imaging device 22 into data that can be read and manipulated by the processing system 30. In the image capture unit 36, the image of the scene 28 obtained from the imaging device 22 is sampled and digitized to produce an array of data representing an array of picture elements or pixels making up the image.
The background replacement system of the present invention is generally a pixel-based system. Referring to
Referring to
While the pixel-based segmentation process 56 produces good results, noise in the image capturing element of the camera, camera movement, and lighting changes can cause transient variations in values of pixels resulting in misclassification of pixels. Transient variations are a particular problem in highly textured regions of an image where spatially neighboring pixels have widely disparate values. In addition, pixels can be misclassified because a pixel located at particular spatial coordinates in an image may change during the time interval captured by the plurality of images comprising a video sequence. In the background replacement system 50, the background reference pixels are modeled to reduce the impact of any transient variation in the pixel. Further, the models of the background reference pixels, originally obtained from a background reference image 60 are updated 62 as the video sequence progresses. Updating the pixels of the background reference image 58 reduces the likelihood of misclassification resulting from longer term temporal variation in the value of the pixel.
Movement of elements in the image background also produces variations in pixel values between sequential images of the video sequence resulting in misclassification of pixels. Generally, background replacement is limited to indoor scenes to control the texture of the background and to eliminate movement of small elements in the background (such as wind generated movement of foliage). In the image replacement system of the present invention, the initial pixel classification 56 is followed by a refinement process 66. The image is filtered 64 to identify elements or pixel structures included in the image. In the refined pixel classification 66, the final or refined probability that an input pixel is a background or foreground pixel is based on the input pixel's membership in a pixel structure and a probability that a neighboring pixel is either a background or foreground pixel. If the input pixel is identified as a background pixel, a spatially corresponding pixel from the new background 68 is substituted 70 for the input pixel to create the output image 72. If the input image 52 is a frame of a video sequence 54 (indicated by a bracket), the images are processed sequentially to produce an output sequence 74 (indicated by a bracket) of frames 72 containing images with the new background.
Referring to
The initial classification of an input pixel as more probably a foreground or a background pixel is performed by comparing the input pixel to a model of the spatially corresponding background reference pixel 108 obtained from an updated background reference image 110. To reduce the effect of transient variation in a background reference pixel due to noise, movement, or lighting changes, the pixels of the background are modeled by their mean value which is periodically updated. Initially, the model of the background reference pixel is assigned the value of the spatially corresponding pixel in a background reference image 60. The background reference image 60 is an image of the scene 28 containing only the background. When the frames of a video sequence 54 are segmented, the values of input pixels classified as background pixels are periodically used to update the mean and standard deviation of the corresponding model background reference pixel 108 to create the updated background reference image 110. If the mean and standard deviation of a pixel are updated after N frames, the revised mean and standard deviation are determined by:
mx(new)=αmx(prior)+(1−α)mx(current)
σx(new)=ασx(prior)+(1−α)σx(current)
The initial classification of the input pixel 104 is determined by comparing the difference between the input pixel and the background reference pixel model 106 to a threshold difference 112. Each input pixel of the input frame is compared to the mean (mx) of its spatially corresponding counterpart in the updated background reference image 58 and a difference vector (d) is obtained:
d=(dr,dg,ds)
where: dr, dg, and ds are the differences between the r, g, and s values for the input pixel and the corresponding background reference pixel from the updated background reference frame 106. Initially, the probability that the input pixel is a pixel of the background is determined by the probability relationship:
The accuracy of the initial segmentation can be adequate if the background pixels are relatively homogeneous and the pixel values are relatively static. However, a natural scene (especially in an outdoor setting) often contains areas that are highly textured and objects that are subject to small motion. For example, foliage produces a highly textured image that is subject to small object motion as the wind moves the leaves. Highly textured areas can produce spatial and temporal aliasing, especially when captured with a camera with noisier components. Since the value of a pixel can change radically, pixel by pixel classification, as applied in the initial segmentation 56, can misclassify a pixel. To improve the accuracy of the segmentation, the probability that the pixel is correctly classified is refined by considering the classification of its neighbors and the input pixel's membership in a pixel structure included in the image.
Morphological filtering 120 is applied to the initial segmentation result to identify large, connected structures of pixels in the input image. These large connected regions of the image are assumed to be objects in the foreground. The morphological filtering fuses the local detection probability from the initial segmentation with global shape information. The location of the input pixel 104 is compared to the locations of the pixels included in the foreground structures 122 to determine if the input pixel is a member of a structure.
In the final segmentation of the image, the classification of the input pixel is refined by assigning to the pixel the probability that one of its neighbors is a background or foreground pixel. If the input pixel is a member of a foreground structure 122 the refined probability that the input pixel is a background pixel is determined by a first probability relationship 124 and if it is not a member of a foreground structure its refined or revised probability is determined by a second probability relationship 126. The first and second probability relationships assign to the input pixel the probability that one of its neighbors is a background (or foreground) pixel. A five pixel by five pixel neighborhood 80 of the input pixel 82 as illustrated in
For an input pixel 82 located in an identified foreground structure 122, the minimum of probability that one of its neighbors is a background pixel is assigned as final or revised probability that the input pixel is a background pixel by the first probability relationship 124. Formally, the probability that the pixel is a background pixel is expressed, as follows:
On the other hand, if the pixel is not included in a foreground structure as identified by the filtering 120, the probability that the pixel is a background pixel is determined by the probability relationship 126:
The input pixel's membership in the background (or foreground) is determined from the final or revised probability 128. If the input pixel is a background pixel 128, its value is used to update the background reference pixel model in the background reference image 110 according to an updating schedule. Pixels of the new background 130 are substituted 132 for the spatially corresponding input pixels that have been classified as background pixel. Pixels of the new background 130 and input pixels that are determined to be foreground pixels 128 are combined to produce the output image 134. The segmentation and background replacement is performed sequentially for the sequence of input images comprising a video sequence to produce an output sequence of frames with the new background.
Pixel-based image segmentation produces accurate segmentation but pixels can be misclassified as a result of transient or temporal variations in pixel values during a video sequence. The likelihood that a pixel will be misclassified is reduced by comparing input image pixels to an updated model of the background reference pixels of the background reference image. Refining a pixel's classification on the basis of the classification of the pixel's neighbors and the pixel's membership in a structure identified by morphological filtering fuses the pixel-based classification of the initial segmentation with a global analysis to further reduce misclassification caused by the motion of small objects in the background of the scene.
The detailed description, above, sets forth numerous specific details to provide a thorough understanding of the present invention. However, those skilled in the art will appreciate that the present invention may be practiced without these specific details. In other instances, well-known methods, procedures, components, and circuitry have not been described in detail to avoid obscuring the present invention.
All the references cited herein are incorporated by reference.
The terms and expressions that have been employed in the foregoing specification are used as terms of description and not of limitation, and there is no intention, in the use of such terms and expressions, of excluding equivalents of the features shown and described or portions thereof, it being recognized that the scope of the invention is defined and limited only by the claims that follow.
Patent | Priority | Assignee | Title |
10070142, | Nov 11 2014 | Cisco Technology, Inc. | Continuous generation of non-displayed reference frame in video encoding and decoding |
10147195, | Feb 19 2016 | Teledyne FLIR, LLC | Object detection along pre-defined trajectory |
10803595, | Jan 08 2016 | FLIR Systems Trading Belgium BVBA | Thermal-image based object detection and heat map generation systems and methods |
7227988, | Jul 01 2002 | Xerox Corporation | Prioritized PDL segmentation producing two bit selector |
7834894, | Apr 03 2007 | Shutterfly, LLC | Method and apparatus for background replacement in still photographs |
8134576, | Apr 03 2007 | Shutterfly, LLC | Method and apparatus for background replacement in still photographs |
8319797, | Apr 03 2007 | Shutterfly, LLC | Method and apparatus for background replacement in still photographs |
9165605, | Sep 11 2009 | ZOOM VIDEO COMMUNICATIONS, INC | System and method for personal floating video |
9661239, | Apr 17 2013 | DIGITAL MAKEUP LTD | System and method for online processing of video images in real time |
Patent | Priority | Assignee | Title |
5764803, | Apr 03 1996 | Alcatel-Lucent USA Inc | Motion-adaptive modelling of scene content for very low bit rate model-assisted coding of video sequences |
5781198, | Dec 22 1995 | Intel Corporation | Method and apparatus for replacing a background portion of an image |
5852673, | Mar 27 1996 | Silicon Valley Bank | Method for general image manipulation and composition |
6249613, | Mar 31 1997 | RAKUTEN, INC | Mosaic generation and sprite-based coding with automatic foreground and background separation |
6301385, | Feb 10 1997 | HANGER SOLUTIONS, LLC | Method and apparatus for segmenting images prior to coding |
6697072, | Mar 26 2001 | Intel Corporation | Method and system for controlling an avatar using computer vision |
6707939, | Apr 21 1998 | Heidelberger Druckmaschinen Aktiengesellschaft | Method for image data compression for two-color images |
6707940, | Mar 31 2000 | BEIJING XIAOMI MOBILE SOFTWARE CO , LTD | Method and apparatus for image segmentation |
6819796, | Jan 06 2000 | Sharp Kabushiki Kaisha | Method of and apparatus for segmenting a pixellated image |
Executed on | Assignor | Assignee | Conveyance | Frame | Reel | Doc |
May 29 2001 | LI, BAOXIN | Sharp Laboratories of America, Inc | ASSIGNMENT OF ASSIGNORS INTEREST SEE DOCUMENT FOR DETAILS | 015917 | /0453 | |
Oct 20 2004 | Sharp Laboratories of America, Inc. | (assignment on the face of the patent) | / | |||
Aug 05 2013 | Sharp Laboratories of America, Inc | Sharp Kabushiki Kaisha | ASSIGNMENT OF ASSIGNORS INTEREST SEE DOCUMENT FOR DETAILS | 030949 | /0712 | |
Aug 23 2013 | Sharp Kabushiki Kaisha | RAKUTEN, INC | ASSIGNMENT OF ASSIGNORS INTEREST SEE DOCUMENT FOR DETAILS | 031179 | /0760 |
Date | Maintenance Fee Events |
Dec 01 2008 | M1551: Payment of Maintenance Fee, 4th Year, Large Entity. |
Dec 03 2012 | M1552: Payment of Maintenance Fee, 8th Year, Large Entity. |
Aug 08 2013 | ASPN: Payor Number Assigned. |
Aug 08 2013 | RMPN: Payer Number De-assigned. |
Dec 12 2016 | M1553: Payment of Maintenance Fee, 12th Year, Large Entity. |
Date | Maintenance Schedule |
Jun 21 2008 | 4 years fee payment window open |
Dec 21 2008 | 6 months grace period start (w surcharge) |
Jun 21 2009 | patent expiry (for year 4) |
Jun 21 2011 | 2 years to revive unintentionally abandoned end. (for year 4) |
Jun 21 2012 | 8 years fee payment window open |
Dec 21 2012 | 6 months grace period start (w surcharge) |
Jun 21 2013 | patent expiry (for year 8) |
Jun 21 2015 | 2 years to revive unintentionally abandoned end. (for year 8) |
Jun 21 2016 | 12 years fee payment window open |
Dec 21 2016 | 6 months grace period start (w surcharge) |
Jun 21 2017 | patent expiry (for year 12) |
Jun 21 2019 | 2 years to revive unintentionally abandoned end. (for year 12) |