Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
AU709844B2 - Method for replacing the background of an image - Google Patents
[go: Go Back, main page]

AU709844B2 - Method for replacing the background of an image - Google Patents

Method for replacing the background of an image Download PDF

Info

Publication number
AU709844B2
AU709844B2 AU68434/96A AU6843496A AU709844B2 AU 709844 B2 AU709844 B2 AU 709844B2 AU 68434/96 A AU68434/96 A AU 68434/96A AU 6843496 A AU6843496 A AU 6843496A AU 709844 B2 AU709844 B2 AU 709844B2
Authority
AU
Australia
Prior art keywords
image
background
pixel
foreground
mask
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Ceased
Application number
AU68434/96A
Other versions
AU6843496A (en
Inventor
John C. Bowman
Ibrahim Hajjahmad
Yibing Yang
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Polaroid Corp
Original Assignee
Polaroid Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Priority claimed from US08/591,727 external-priority patent/US5923380A/en
Application filed by Polaroid Corp filed Critical Polaroid Corp
Publication of AU6843496A publication Critical patent/AU6843496A/en
Application granted granted Critical
Publication of AU709844B2 publication Critical patent/AU709844B2/en
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/222Studio circuitry; Studio devices; Studio equipment
    • H04N5/262Studio circuits, e.g. for mixing, switching-over, change of character of image, other special effects ; Cameras specially adapted for the electronic generation of special effects
    • H04N5/272Means for inserting a foreground image in a background image, i.e. inlay, outlay

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Image Processing (AREA)
  • Processing Or Creating Images (AREA)
  • Studio Circuits (AREA)

Description

WO 97/27702 PCT/US96/12846 METHOD FOR REPLACING THE BACKGROUND OF AN IMAGE This application is a continuation-in-part of a copending U.S. application, serial number 08/544,615, filed October 18, 1995 by Yang et al.
BACKGROUND OF THE INVENTION The invention relates generally to a system and method for replacing the original background of a digitally captured image with a new background. More specifically, the invention relates to the generation and application of a mask for replacing the background of an image.
Photographic scenes and their images may be divided into distinct parts on the basis of their importance to overall scene content. In every scene there is usually some part that represents the subject of major interest with the remaining parts providing context. Generally, parts in the foreground of a scene usually predominant over background parts, but this is not always so because there are obviously those cases where the background conveys information vital to an overall understanding of a scene's full information content. However, there are kinds of scenes where the background is really of little significance and may even detract from the foreground.
Most of these involve scenes populated by one or more nearby humans where the background could be dispensed with altogether or otherwise rendered unobtrusive.
Official settings demanded for passports, identification badges, and drivers licenses are but a few examples of this type of scene which are contrived to eliminate any influence a background may have on the subject.
To have an "official" photograph made typically requires a specially designed and lighted setting in a studio or photography shop. Here, a neutral featureless background is supplied to provide a uniform field against which the subject's face or upper body is photographed. While this procedure is not generally inconvenient, it is not as convenient as being photographed at a booth or kiosk designed for autophotography, where one can take one's own photograph.
WO 97/27702 PCT/US96/12846 With traditional autophotographic devices, the background and illumination of the studio setting is usually mimicked but without the disadvantage of relying on a professional photographer to take the actual "picture". More recently, autophotographic devices have been advocated which allow a subject to be photographed against some ambient background that can change, thus eliminating the need for providing a real controlled background. Instead, it is proposed that the scene be imaged, the foreground and background separated, and the original background replaced by a preferred one suitable for the official purpose at hand all to be done via digital image processing techniques. Afterwards the new image may be reproduced in hard copy form.
The parent case to this application discloses the general approach for replacing the background of an image by differentiating between two infrared (IR) light illuminated images to distinguish between the foreground and background of the corresponding visible light image. It specifically discloses a background replacement method where two IR images with different intensities of IR illumination in the foreground and background regions of the scene, respectively, are compared for light intensity differences between corresponding pixels of the two images to form a mask differentiating between the foreground and background regions of the image. The mask is then applied to a visible light image of the scene and the original background is replaced with a preselected background.
The primary object of the present invention is the generation and application of a mask for use with the background replacement system and method of the parent case.
This and other objects will become apparent in view of the following description, drawings and claims.
SUMMARY OF THE INVENTION The present invention is useful in taking a visible light image for identification and other purposes without the requirement of a photobooth, regardless of the background of the visible light image. The original background of the visible light 2 WO 97/27702 PCT/US96/12846 image is replaced with a preselected background. Two IR images with different intensities of IR illumination in the foreground and background regions of the scene, respectively, are compared to produce a difference image of light intensity differences between corresponding pixels of the two images. A binarized image is generated by binarizing the difference image with respect to a predetermined threshold value 0. A connectivity constraint is used to generate a binary mask from the binarized image, then a gray-scale mask is produced by multiplying the binary mask times a preselected modulation function of the difference image. Warping the gray-scale mask produces a transformed mask. Finally, the background replaced visible light image is generated by blending the transformed mask with the visible light image, and replacing the original background with the preselected background.
BRIEF DESCRIPTION OF THE DRAWINGS The aforementioned aspects and other features of the invention are described in detail in conjunction with the accompanying drawings in which the same reference numerals are used throughout for denoting corresponding elements and wherein: Figure 1 is a diagrammatic representation of a photo unit 100 which includes a background replacement system as described herein; Figure 2 illustrates a front illuminated IR image of a scene; Figure 3 illustrates a background illuminated IR image of the same scene as Figure 2; Figure 4 is a block diagram of preferred steps in a first configuration of the inventive background replacement method; Figure 5 is a block diagram of preferred steps in a second configuration of the inventive background replacement method; Figure 6 illustrates a scene divided into background and foreground regions; and WO 97/27702 PCTIUS96/12846 Figure 7 is a plot of values of a modulation function f(x) versus values of a difference image DIFF(ij).
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS The following description is provided to enable any person of ordinary skill in the art of electronic digital image processing to make and use the present invention.
The description sets forth the best mode contemplated by the inventors for carrying out their invention. Various modifications are readily apparent to those skilled in the art, in accordance with the generic principles of the invention as defined herein.
Terminology In order to more fully appreciate the invention as claimed, certain key words are defined for clarity. An image of a scene can be segmented into a foreground, a near background and a far background. The foreground includes objects near the imaging device which are the subject of the image, often a person. An active light source is a lamp that is used for supplying light to the scene. The near background is the part of the background which can be affected by an active light source, whereas the far background is the part of the background which can not be affected by an active light source. For instance, if a person is being photographed with a mountain range in the distance, an active light source will not affect the lighting on the mountain range, i.e. the far background. If however, a bush stands a few feet behind the subject within the range of the active light source, that bush is located in the near background. The terms background illumination and background lighting refer to the near background of a scene being illuminated by one or more active light sources in addition to any ambient illumination. The foreground is not illuminated by the active background lighting due to the use of baffles.
Similarly, the terms .foreground illumination and foreground lighting refer to the foreground or subject of an image being illuminated by one or more active light sources in addition to any ambient illumination. The background is not illuminated by the active foreground lighting due to the use of baffles. The terms front lighting or 4 WO 97/27702 PCTIUS96/12846 front illumination refer to the case where one or more active light sources are positioned near the optical axis of the imaging device to illuminate the subject of the image. The line of demarcation is defined as the line of pixels that separates the foreground and background regions of a digital image. Two digital imaging devices have the same virtual spatial location when the images taken by the devices are identical. A digital imaging device includes any device such as, but not limited to, a CCD (charge-coupled device) photosensitive array. The digital imaging device could be, for instance, an electronic camera or a camcorder.
IR Background Replacement Method An original background of a digitally captured image is replaced with a predetermined replacement background by comparing lighting characteristics between pixels of the image. One of the lighting characteristics that can be considered is light intensity. Another is the contrast ratio, defined as the ratio of intensity values of pixels at the same, i.e. corresponding, location that are compared between two images of the same scene taken at the same time.
Illuminating the background and foreground regions of the image with lights of different intensities, i.e. different illumination patterns, provides a useful mode of comparison. A comparison of all pixels in the image provides information which can be analyzed to delineate the foreground and background regions of the image.
However, several problems do exist.
Measurement of light intensity is directly related to the reflectance of an object from which the light is being measured. For instance, if an object is illuminated with light and exhibits a high reflectance, then most of the light incident to the object is reflected and available for measurement. However, a problem occurs if the object being illuminated has a low reflectance, since only a small amount of the light incident to the object is reflected and available for measurement.
When photographing for identification purposes, the subject of the image is generally a person. Thus, the hairline of the subject will generally follow the line of demarcation separating the foreground and background regions of the image. It is
I
WO 97/27702 PCT/US96/12846 known that blonde hair exhibits high reflectance and black hair exhibits low reflectance to visible light. Thus when a person having black hair is the subject of an image, the intensity of the reflected visible light incident to the black hair will be small, difficult to measure, and unacceptable for intensity comparisons. On the other hand, light in the IR region of the light spectrum exhibits high reflectance characteristics for both blonde and black hair. Furthermore, the spectral sensitivity of commercially available CCDs includes the visible light range of approximately 400 to 700 nanometers, and the near infrared range of approximately 700 to 1000 nanometers.
Thus, active light sources in the near infrared range are preferred for intensity comparisons.
In keeping with the IR background replacement method, an image can be taken regardless of the background of the scene. Thus, a photobooth or backdrop behind the subject is not required. However, a careful analysis of both the active and ambient lighting is in order. A scene can be dissected into three regions; a foreground region, a near background region and a far background region. The foreground region includes objects near the imaging device which are the subject of the image, often a person.
The near background region is the part of the background which can be affected by an active light source. The far background region is the part of the background which can not be affected by an active light source. For two IR images with different illumination patterns, a comparison of light intensity of pixels at each of the above three regions under varied lighting conditions will provide information necessary for creating a mask for separating the foreground and background regions of an image of the scene. In other words, the contrast ratios of intensity values of pixels at corresponding locations of the two IR images will vary between the foreground and background regions.
Two IR images are taken of the same scene under different lighting conditions.
The first IR image, shown in Figure 2, is a front IR image IRf, illuminated with front infrared radiation. The second IR image, shown in Figure 3, is a background IR image IRbg illuminated with background infrared illumination. Each image includes a 6 WO 97/27702 PCT/US96/12846 foreground 122 and a background 200 which is further broken down into a near background region 202 having objects which are affected by active light sources, and a far background region 204 having objects which are not affected by active light sources.
Figure 2 shows the front illuminated IR image IRfr taken with front IR lighting.
Of course, ambient non-active) IR foreground and background lighting will also be present in some amount for illuminating both the foreground 202 and the background 200. Only ambient IR light having intensity is reflected at various pixels in the far background since the front IR lighting is incapable of effecting the lighting of the far background. For instance, if the scene is a person standing in a lobby of a large building with a back wall 75 feet away, then the active IR lighting, i.e.
the front IR lighting, will not illuminate the far background of the back wall. The front IR light, in combination with the ambient IR light, is capable of illuminating objects in the foreground 122 and the near background 202 at a light intensity which is greater than the ambient IR light intensity Figure 3 shows a background illuminated IR image IRbg taken with no active front IR illumination only ambient IR lighting is present in the foreground 122) and one or more background IR lights which have been activated to illuminate, in combination with any ambient IR lighting, objects in the near background region 202 of the background 200. Ambient IR light is reflected from pixels in the foreground and far background regions having an intensity of"A", and the background IR lighting combined with the ambient IR lighting is reflected from pixels in the near background region having an intensity of which is greater than the intensity "B of the front lighting in Figure 2. For this preferred method, the intensity of the background lighting is greater than the intensity of the front lighting so that the relationships detailed in the following Table I will hold true. However, if the front lighting is given a greater intensity than the background lighting, then a different set of mathematical relationships would be attained for Table I.
I
WO 97/27702 PCT/US96/12846 The images IRfr and IRbg are preferably taken with the same IR imaging device in near temporal proximity, limited only by the shutter speed of the IR imaging device and the time necessary to switch the active IR lighting. By taking the two IR images as close together as possible in time, problems created by the movement of the subject or of objects in the near background can be avoided. More specifically, as long as the movement of the line of demarcation between the exposures is not detectable by the human eye, then the movement of the subject is negligible. Typically, a maximum time differential between exposures of, for example, about 1/30th of a second a typical shutter speed of an electronic camera) will ensure negligible movement of the subject. Of course, if the subject of the image is stationary, then the two IR images can be taken at any time.
After the two IR images are taken and stored in digital form, they are compared on a pixel-by-pixel basis to create a mask for delineating the foreground from the background. For the present preferred example comparing two IR images, one with front IR illumination and the other with background IR illumination, the following relationships of Table I preside for each corresponding pixel location (ij) of each image, i and j being integers.
Foreground pixel IRfr(ij) IRbg (i) Far background pixel IRr (ij) =IRbg (i) Near background pixel IRf (ij) <IRbg (i) TABLE I Thus, if a given pixel in IRbg has a greater intensity at the same pixel location in IRf then that pixel is identified in the mask as a foreground pixel; if a given pixel in IRbg has the same intensity at the same pixel location in IRfr, then that pixel is identified in the mask as a far background pixel; and if a given pixel in IRbg has a lesser intensity at the same pixel location in IRfi then that pixel is identified in the mask as a near background pixel.
WO 97/27702 PCT/US96/12846 IR Background Replacement System A preferred background replacement system is incorporated into a photo unit 100 (see Figure 1) for taking a picture of a subject 122, such as for identification purposes. The photo unit 100 could be conveniently located, such as at a Post Office, where an original background could be replaced by any desirable preselected background. The subject 122 operates the photo unit 100 via a control panel 118 which is connected to a microprocessor 102. Two imaging devices 106 and 108 having the same virtual spatial location are implemented. Both of the imaging devices 106 and 108 are compatible electronic cameras capable of capturing an image in digital form. Furthermore, one of the imaging devices 108 is capable of capturing an IR image by using an IR pass, visible reject filter while the other imaging device 106 is capable of capturing a visible light image by using an IR reject, visible pass filter. The photo unit 100 also includes one or more background IR lights 110 with baffles 114, a front IR light 116, a visible light source 136, a display 112, a beam splitter 132, and a printer 104. The front IR light 116, the background IR lights 110, and the visible light source 136 are all active light sources. The front IR light 116 emits near IR radiation at a first intensity, background IR lights 110 emit near IR radiation at a second intensity greater than the first intensity, and the visible light source 136 emits visible light.
The subject 122 first selects one of a number of replacement backgrounds, then activates the photo unit 100 to begin the photo taking procedure. A preview of the visible light image appears on the display 112 and the user continues by pressing a button to take the two IR and one visible light images. The background IR light 110 is activated to illuminate the near background with near IR light at a first intensity and a background illuminated IR image IRbg, as shown in Figure 3, is taken with the imaging device 108. Within about 1/30th of a second the shutter speed of the imaging devices), the background IR light 110 is deactivated, the visible light source 136 is activated, and the front IR light 116 having a second intensity less than the first intensity is activated. At that time, the imaging device 108 takes a front illuminated IR 9 WO 97/27702 PCT/US96/12846 image IRfr, as shown in Figure 2, and the second imaging device 108 simultaneously takes a visible light image. Shortly thereafter the front IR light 116 and the visible light 136 are deactivated.
Each of the components of the photo unit 100 is controlled by the microprocessor 102 as well understood by those skilled in the art. The microprocessor 102 collects and stores records of the first IR image, the second IR image and the visible light image. The difference between intensities at corresponding pixels of the first and second IR images is determined by the microprocessor 102 to form a mask which discriminates the foreground 122 from the background 200 regions of the images. This mask is then applied to the visible light image to create a modified visible light image by replacing the original background with the new preselected background. A print of the modified visible light image can be retrieved from a slot or tray 120 within printer 104.
In the above preferred system the subject 122 is illuminated by a front IR light 116 which is positioned so that every image data point, i.e. pixel, of the subject 122 is illuminated without shadows. Ideally, the front IR light 116 should be located as close as possible to the optical axis of the imaging devices.
The above preferred embodiment of the inventive method and apparatus uses two IR images, one illuminated with front IR lighting and the other illuminated with background IR lighting. This scheme provides the best results for photographing a person and replacing the background. However, many variations exist of the general scheme for comparing light intensities at each corresponding pixel between two images under different lighting conditions. For instance, a different part of the light spectrum can be used to expose the images to be compared or, the order and timing of taking the various images can be changed. Furthermore, the front IR lighting could be replaced with foreground IR lighting. In that particular case, the first IR image would be a foreground IR image IRfg taken using one or more foreground lights directed by baffles to illuminate the foreground of the scene with no background IR illumination other than ambient. The second IR image would be an ambient IR image IRM taken WO 97/27702 PCTIUS96/12846 with only ambient IR illumination in both the foreground and the background. In the ideal case, the pixels of the mask are created by comparing IRfg with IRm according to Table II for each corresponding pixel location (ij) of each image, i and j being integers.
Foreground pixel IRfg Ram (i) Background pixel IRfg (ij) IRm (ij) TABLE II Thus, if a given pixel in IRfg has a greater intensity at the same pixel location in IRm then that pixel is identified in the mask as a foreground pixel; and if a given pixel in IRfg has the same or lesser intensity at the same pixel location in IRam then that pixel is identified in the mask as a background pixel.
The imaging devices 106 and 108 preferably are one color CCD type and one black and white CCD type (although two color CCD types are acceptable) with a good quality television lens of a desired focal length and filtered to restrict the spectral sensitivity to a desired spectral band. Compatible color video cameras 106 and 108 are preferred whereby one of the cameras is modified with an IR pass, visible reject filter to be able to record an IR image. All of the variables for taking a photograph such as the depth of field, focal length, etc. are easily established as necessary by one of ordinary skill in imaging science.
In an experimental setup used for testing the invention at Polaroid's Imaging Science Laboratory, a single imaging device was used for taking both the IR and visible light images of a mannequin. The imaging device consisted of a Philips CM800 black white NTSC format (640x480 pixels) CCD camera with color separations made using wratten 25 (red), 58 (green) and 47B (blue) filters. Red, green and blue images were individually recorded during testing. Color balance was adjusted using wratten neutral density filters and/or changing the lamp voltage for the three color filter exposures. The camera included a Computar f/1.4 16mm FL lens with a 1mm BG18 glass filter for IR rejection and a wratten 87B gel filter for visible WO 97/27702 PCT/US96/12846 light rejection: Digitization was accomplished using a Data Translation frame grabber with 7 bits of quantization.
Different size apertures can be used in the visible and infrared cameras, since the warping step will correct any misalignments between the visible and IR images.
However, the best system includes visible and infrared cameras having the same size apertures. The infrared camera preferably should have a large aperture so that the background in the infrared images will be blurred. To the extreme, the background will appear uniform for both infrared images, but brighter when the background is illuminated. The influx of light can be controlled by using a transparency with an appropriate transmission rate. Most importantly, the infrared camera used should respond sensitively to small light intensity changes when the light is weak.
The foreground illumination for both the visible and near IR ranges in the test system was provided by three tungsten halogen Lowell Pro-Lights, model PI-10 (125 watts, 3200K 120 volts) which were each placed between 1 and 2 feet from the optical axis of the camera 200 and approximately 2.5 feet from the subject. Exposure was controlled by changing the lamp voltage. The background illumination for the appropriate IR image record was provided by three tungsten halogen Lowell Tota- Lights, model TI-10 (500 watts, 3200K 120 volts) with barn doors excluding the background lighting from behind the subject.
Mask Generation Mask generation is a crucial task in background replacement. For the inventive background replacement method, a mask is generated for accurately distinguishing between the foreground and the background of an image. In one preferred embodiment, the foreground of the image is a person having his picture taken for identification purposes and the background is everything else in the image.
The basic mask generation method as claimed is outlined in the block diagram of Figure 4. Assume that the front illuminated IR image IRf(ij), the background illuminated IR image IRb(ij), the visible light image Vi,(ij) and the predetermined replacement background B(ij) have all been determined as described in the above 12 WO 97/27702 PCT/US96/12846 sections, where i and j are integers which represent the horizontal and vertical coordinates of the images, respectively. A foreground pixel has the property IR(ij) IRb(ij) and a background pixel has the property of either IRf(ij) IRb(ij) or IR(ij) IRb(ij) depending upon whether or not the pixel is illuminated by active lights. In a typical system, each pixel ofIRi(ij) and IRb(ij) is represented as 0 IRf(ij) 255 or 0 IRb(ij) 5 255, respectively. Subtracting IRb(ij) from IRf(ij) in step 400 yields a difference image DIFF(ij) where each pixel is represented as -255: DIFF(ij) 5 +255.
A sample 8x8 point difference image DIFF(ij) for ij=0,1...7 is shown below.
0 0 0 -1 1 0 -1 1 0 15 17 0 1 0 1 1 6 -2 -4 -1 0 0 1 1 -1 0 0 0 0 2 1 1 8 0 5 60 13 6 3 2 1 -4 27 250 212 11 5 4 -1 6 83 30 19 12 0 -2 1 15 22 168 15 0 0 DIFF(ij) DIFF(ij) is binarized in step 410 to form a binarized image Mz(ij) by comparing the numerical value of each pixel of DIFF to a predetermined threshold value 0, then setting all pixel values which are greater than 0 to a logic high and all pixel values which are less than or equal to 0 to a logic low. This type of pixel classification is mathematically written as: Mz(i,j) 1, if DIFF(i,j) 0, or (1) Mz(ij) 0, otherwise, where 0 is a predetermined parameter which will be discussed in further detail hereinafter in conjunction with calculations for the modulation function of step 430.
WO 97/27702 PCT/US96/12846 The following 8x8 binarized image Mz(ij) of the above difference image DIFF is illustrative for i, j= when 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 1 1 0 0 0 0 1 1 1 1 0 0 0 1 1 1 1 1 0 1 0 0 1 1 1 1 0 0 Mz (for Note that a change in 0 can cause a significant change in the appearance and values of the binarized image Mz(ij). Contrast the above binarized image for 0=5 with the following binarized image for 0=10.
0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1 0 0 Mz (for 0=10) WO 97/27702 PCT/US96/12846 Note that the mix of foreground and background pixels has changed, i.e. there are fewer foreground pixels in the binarized image M, when 0=10 than when Generally as 0 increases, the number of foreground pixels decreases.
A logic low value in the binarized image as shown above, designates a definite background pixel. However, a logic high value designates only a probable foreground pixel, since it is possible that M, may contain some false foreground pixels due to noise. False foreground pixels can be identified and removed using a foreground connectivity constraint. The foreground connectivity constraint defines the foreground region as the single largest region of contiguous foreground pixels, i.e. the region where the largest number of adjacent foreground pixels are located. This region is identified as the group of pixels within the dotted line shown in M, for 0=10 above, and (in the scene of Figure 6) where the image is composed of the foreground 602 and 604 and the background 600.
The image of Figure 6 can be characterized as a foreground island 602 and 604 surrounded by a background ocean 600. In a typical identification photo, the foreground island consists of a large group of adjacent foreground pixels located about the lower central region of the image. Hence, false foreground pixels are easily identified as separate from the foreground pixels of the main foreground island 602 and 604. These false foreground pixels are set to logic low background pixels in island step 420 according to the foreground connectivity constraint. Using the foreground connectivity constraint for the above binarized image M, where 0=10, pixels M,(1,1) and are identified as false foreground pixels. These pixels are removed in step 420 and the image representation, i.e. binary mask, Mb(ij) becomes: WO 97/27702 PCT/US96/12846 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1 0 0 Mb (for 0=10) The line of demarcation separating the foreground and background regions of the image is generally hazy rather than sharp. For instance, a hair strand belonging to the foreground subject has only sub-pixel width. Thus a pixel containing both a hair strand and background information can be thought of as having certain percentages of both foreground and background information. These modulated pixels are located in the edge region 604 of the foreground shown in Figure 6. The pixels located in the foreground plateau 602 all have values of 1; the pixels located in the background 600 all have values of 0; and the pixels located in the edge 604 all have values that are both greater than 0 and less than 1.
The appropriate percentages of foreground and background information in each pixel in the edge region 604 is determined in mask modulation step 430 where a grayscale mask Mg is generated according to the equation: Mg(ij)= Mb(ij) f(DIFF(ij)). (2) Mg(ij) is a gray-scale mask, Mb(i,j) is the binary mask, DIFF(ij) is the difference image, and f(DIFF(i,j)) is a predefined modulation function varying in value from 0 to 1. In equation the gray-scale mask Mg is generated using pixel-by-pixel multiplication of the binary mask Mb times the modulation function f(x)=f(DIFF(ij)).
WO 97/27702 PCT/US96/12846 A preferred modulation function f(x) taken in conjunction with Figure 7 (where 0, OL and OH are predetermined parameters shown in a preferred configuration) is defined as: f(x) 0, if x L, if OL<X<H, and (3) if x 8H Figure 7 is a plot of the gray-scale mask values versus the difference image values where f(x) for x=DIFF(ij) is defined in equation above. Every pixel in the edge region 604 has a value both greater than 0 L and less than OH. In order to modulate the foreground pixels located throughout the edge region 604 of the binary mask Mb for 0=10, each pixel has a corresponding location in DIFF(ij) whose value is multiplied by the appropriate functional value Of course, all the background pixels located in the background 600 of gray-scale mask Mb will remain 0, but each foreground pixel will be modulated between 0 and 1 according to the modulation function All pixels located in the foreground plateau 602 have Mg gray-scale mask values of 1 where DIFF is greater than OH in accordance with the modulation function f(x) (see also Figure When DIFF is less than or equal to OL, then Mg is 0.
Finally, if DIFF is both greater than OL and less than OH, then the gray-scale mask Mg is modulated between 0 and 1. The edge region 604 of the foreground is represented as the area where the value of DIFF is between 0 and OH. The pixels in this area contain both foreground and background information. The modulated gray-scale mask Mg produces natural looking background replacement results.
0 is empirically chosen as an integer value between 0 and 255 inclusive. The best value of 0 will vary according to variations in lighting and imaging device response characteristics. For the experimental setup previously described including a Philips CM800 camera and tungsten light sources, 0=10 was experimentally determined as the best fit. 0 controls the size and shape of the foreground island. As 9 increases, the foreground decreases. OL also designates the minimum value of a pixel in the edge region 604. If OL=- (as in the preferred embodiment), then the minimum 17
I
WO 97/27702 PCT/US96/12846 value of a pixel in the edge region 604 is slightly greater than 0. Of course if OL is decreased, then the minimum value of a pixel in the edge region 604 increases. Thus, the strength of the edge is controlled by OL. As OL approaches negative infinity, there is no effective modulation between the foreground and background, i.e. the mask value of each of the edge pixels is approximately 1.
After the gray-scale mask Mg is generated in the modulation step 430, the pixels of Mg are aligned with corresponding pixels in the visible light image Vi, so that corresponding points in Mg and Vi, have the same coordinates. This procedure called warping or image registration occurs in step 440 and results in a transformed mask Mt(ij). The warping parameters are predetermined by means of calibration as known in the art. Finally in step 450, the transformed mask Mt is applied to the visible light image Vin and the predetermined background B replaces the original background to generate the background replaced image Vout. In other words, Vot(i,j) Mg(i,j)Vjn(i,j) (1-Mg(ij))B(ij). (4) The second preferred configuration of the inventive background replacement method, as shown in Figure 5, addresses the difficulty of coping with small features, such as hair strands, which have sub-pixel width. A foreground hair strand could possibly be misclassified as background by the previously described pixel classification rule for generating the binarized image Mz(ij). This problem can be overcome by enhancing details of the IR image in enhance steps 504 and 506 prior to pixel classification. However, steps 504 and 506 involve high pass filtering which could possibly introduce or amplify noise. Thus, it is best to first preprocess the IR images by low pass filtering in preprocess steps 500 and 502.
In Figure 5, each of the preprocessed IR images is enhanced in a similar fashion in steps 504 and 506. The enhanced front illuminated IR image, IRF', is written as: IRf(i,j) IRf aDETf WO 97/27702 PCT/US96/12846 where IRf is the front illuminated IR image, a is a predetermined parameter specifying the amount of enhancement, and DETf is a measure of the details residing in IRf. The parameter a is actually an experimentally derived constant. DETf captures or measures details residing in IRf by using, for example, the Laplacian filter of equation DETf max{-AIR(ij), 0} (6) where A is the Laplacian operator. Similarly, IRb'(ij) IRb aDETb and DETb max{-AIRb(ij), 0} for the background image. Other known filters could be used in place of the Laplacian.
Still, a foreground point has the property IRf(ij) IRb'(ij), and a background point has the property IRf(ij) IRb'(ij). Furthermore the decision rule for pixel classification in the binarizing step 410 of Figure 5 is: Mz(i,j) 1, if RES(ij) 0, or (7) 0, otherwise where the residue image RES IRf- IRb'. Binarization of the residue image RES can be interpreted as adaptive thresholding of the difference image. In fact, the expression RES(ij) 0 can be rewritten as IRf IRb 0a, where 0 a is spatially adaptive according to local busyness DETf- DETb) scaled by a.
It is to be understood that the above described embodiments are merely illustrative of the present invention and represent a limited number of the possible specific embodiments that can provide applications of the principles of the invention.
Numerous and varied other arrangements may be readily devised in accordance with these principles by those skilled in the art without departing from the spirit and scope of the invention as claimed.

Claims (14)

1. A digital processing method of replacing an original background of a visible light image of a scene with a predetermined replacement background, said method comprising the steps of: making a first infrared (IR) image of the scene at a first time while illuminating the original background with first IR radiation having a first intensity; measuring the intensity of IR radiation at each pixel of said first IR image; making a second IR image of the scene at a second time after deactivating said first IR radiation, while illuminating a foreground of the scene with second IR radiation having a second intensity less than said first intensity; measuring the intensity of IR radiation at each pixel of said second IR image; making the visible light image of the scene at a third time while illuminating the scene with visible lighting; generating a transformed mask distinguishing said foreground from said original background by producing a difference image (DIFF), a binarized image, a binary mask and a gray-scale mask; and producing a modified visible light image by blending said visible light image with said predetermined replacement background, using said transformed mask.
2. The method of claim 1, wherein said step of generating a transform mask further comprises the steps of: producing the difference image by subtracting the second IR image from the first IR image; producing the binarized image distinguishing said foreground from said original background by comparing pixels of said difference image to a predetermined parameter 0, then setting a pixel of the binarized image to a logic high when said pixel of the binarized image is greater than 0, otherwise setting said pixel of the binarized image to a logic low; WO 97/27702 PCT/US96/12846 producing a binary mask from the binarized image by removing false foreground pixels of the binarized image according to a connectivity constraint; producing the gray-scale mask specifying how much of each pixel of the binary mask is attributed to the foreground and how much of each pixel of the binary mask is attributed to the background by applying a predetermined modulation function of the difference image to the binary mask; and producing the transformed mask by pixel-to-pixel image registration of the gray-scale mask and the visible light image.
3. The method of claim 2, wherein for a given pixel of the gray-scale mask said predetermined modulation function equals: (DIFF-OL)/(OH OL) if a corresponding pixel in the difference image is less than a predetermined parameter OH and greater than a predetermined parameter OL; 0, if the corresponding pixel in the difference image is less than or equal to OL; and 1, if the corresponding pixel in the difference image is greater than or equal to OH.
4. The method of claim 1, wherein said second IR radiation originates from a front light. The method of claim from one or more foreground lights.
6. The method of claim from ambient light.
7. The method of claim time. 1, wherein said second IR radiation originates wherein said second IR radiation originates 1, wherein said third time equals said second
8. The method of claim 1, wherein said first IR radiation originates from one or more background lights.
9. The method of claim 1, wherein said first IR radiation originates from ambient light. 22 The method of claim 1, wherein said first IR radiation and said second IR radiation both have wavelengths ranging from about 700 nanometers to about 1000 nanometers.
11. The method of claim 1 wherein a difference between said first time and said second time approximates a shutter speed of an imaging device for making said first IR image, said second IR image and said visible light image.
12. The method of claim 1, wherein a difference between said first time and said second time is about 1/30th of a second.
13. The method of claim 1, wherein a difference between said first time and said second time ensures negligible movement of objects within said scene while taking said first IR, second IR and visible light images so that said images will be in focus.
14. The method of claim 1, wherein both said first and second IR images are taken with a first digital imaging device, said digital visible light image is taken with a second digital imaging device, and said first and second digital imaging devices have the same virtual spatial location.
15. A digital processing method, substantially as herein described with 20 reference to Fig. 4.
16. A digital processing method, substantially as herein described with reference to Fig. SSSS 0 *OSO 0@ OS 0 S.. 0 25 Dated 21 October, 1997 Polaroid Corporation Patent Attorneys for the Applicant/Nominated Person SPRUSON FERGUSON see* .0. S S S 0 0 5 0 [N:\LIBM]23472:GMM
AU68434/96A 1996-01-25 1996-08-02 Method for replacing the background of an image Ceased AU709844B2 (en)

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
US08/591,727 US5923380A (en) 1995-10-18 1996-01-25 Method for replacing the background of an image
US08/591727 1996-01-25
PCT/US1996/012846 WO1997027702A1 (en) 1996-01-25 1996-08-02 Method for replacing the background of an image

Publications (2)

Publication Number Publication Date
AU6843496A AU6843496A (en) 1997-08-20
AU709844B2 true AU709844B2 (en) 1999-09-09

Family

ID=24367657

Family Applications (1)

Application Number Title Priority Date Filing Date
AU68434/96A Ceased AU709844B2 (en) 1996-01-25 1996-08-02 Method for replacing the background of an image

Country Status (5)

Country Link
EP (1) EP0818108A1 (en)
JP (1) JPH11502693A (en)
AU (1) AU709844B2 (en)
CA (1) CA2212812A1 (en)
WO (1) WO1997027702A1 (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7834894B2 (en) * 2007-04-03 2010-11-16 Lifetouch Inc. Method and apparatus for background replacement in still photographs
CN109816662B (en) * 2017-11-22 2022-10-18 瑞昱半导体股份有限公司 Image processing method for foreground image extraction and electronic device
JP7144678B2 (en) * 2018-08-03 2022-09-30 日本電信電話株式会社 Image processing device, image processing method, and image processing program
CN114581443B (en) * 2022-05-06 2022-08-26 中科慧远视觉技术(北京)有限公司 Image processing method and device, computer equipment and readable storage medium
CN118101862B (en) * 2024-03-26 2024-07-02 腾讯科技(深圳)有限公司 Image processing method, device, equipment and storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5117283A (en) * 1990-06-25 1992-05-26 Eastman Kodak Company Photobooth compositing apparatus
WO1994026057A1 (en) * 1993-04-29 1994-11-10 Scientific Generics Limited Background separation for still and moving images

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2999517B2 (en) * 1990-06-01 2000-01-17 日本放送協会 Image synthesis method and apparatus
JPH07154777A (en) * 1993-11-30 1995-06-16 Matsushita Electric Ind Co Ltd Image processing device and videophone device
US5631976A (en) * 1994-04-29 1997-05-20 International Business Machines Corporation Object imaging system

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5117283A (en) * 1990-06-25 1992-05-26 Eastman Kodak Company Photobooth compositing apparatus
WO1994026057A1 (en) * 1993-04-29 1994-11-10 Scientific Generics Limited Background separation for still and moving images

Also Published As

Publication number Publication date
EP0818108A1 (en) 1998-01-14
JPH11502693A (en) 1999-03-02
AU6843496A (en) 1997-08-20
WO1997027702A1 (en) 1997-07-31
CA2212812A1 (en) 1997-07-31

Similar Documents

Publication Publication Date Title
US5923380A (en) Method for replacing the background of an image
US10349029B2 (en) Photographic scene replacement system
CN102984448B (en) Utilize color digital picture to revise the method for controlling to action as acutance
JP5545016B2 (en) Imaging device
TWI465825B (en) Image capturing device and capturing method with light assistance
JP2011239259A (en) Image processing device, image processing method, and program
US20180332239A1 (en) Background replacement utilizing infrared light and visible light
KR20120073159A (en) Temporally aligned exposure bracketing for high dynamic range imaging
CN110490042B (en) Face recognition device and entrance guard&#39;s equipment
US20180025476A1 (en) Apparatus and method for processing image, and storage medium
CN103543575A (en) Image acquisition device and light source auxiliary shooting method thereof
AU709844B2 (en) Method for replacing the background of an image
US7570281B1 (en) Image processing apparatus and method for detecting a main subject to be photographed
McCann Art, science, and appearance in HDR
Heinrich Basics architectural photography
DE19713648A1 (en) Electronic reduction of light and dark contrast in video pictures
CA2295433A1 (en) Mask for changing the brightness profile of a photographic copy
JP3962825B2 (en) Image processing apparatus and program
TWI904542B (en) Method of performing background light subtraction for infra-red images and related system and non-transitory computer-readable storage medium
CN108965707B (en) Automatic bottom-removing shooting system
JP7724969B2 (en) UV system and method for generating an alpha channel
Cookson et al. High Resolution Digitization Of Color Images
WO2013113897A1 (en) Digital camera having a projection unit and method for operating a digital camera having a projection unit
Fuller Some thoughts on Imaging
Schulz Application of high dynamic range photography to bloodstain enhancement photography

Legal Events

Date Code Title Description
MK14 Patent ceased section 143(a) (annual fees not paid) or expired