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

Method for replacing the background of an image Download PDF

Info

Publication number
WO1997027702A1
WO1997027702A1 PCT/US1996/012846 US9612846W WO9727702A1 WO 1997027702 A1 WO1997027702 A1 WO 1997027702A1 US 9612846 W US9612846 W US 9612846W WO 9727702 A1 WO9727702 A1 WO 9727702A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
background
pixel
foreground
mask
Prior art date
Application number
PCT/US1996/012846
Other languages
French (fr)
Inventor
Yibing Yang
John C. Bowman
Ibrahim Hajjahmad
Original Assignee
Polaroid Corporation
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 Corporation filed Critical Polaroid Corporation
Priority to AU68434/96A priority Critical patent/AU709844B2/en
Priority to JP9526816A priority patent/JPH11502693A/en
Priority to EP96928817A priority patent/EP0818108A1/en
Publication of WO1997027702A1 publication Critical patent/WO1997027702A1/en

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

Definitions

  • 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.
  • 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.
  • 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.
  • 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.
  • IR infrared
  • the primary object of the present invention is the generation and application of a mask for use with the background replacement system and method ofthe parent case.
  • 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 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 ⁇ .
  • 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 ofthe difference image. Warping the gray-scale mask produces a transformed mask.
  • 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.
  • 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
  • Figure 7 is a plot of values of a modulation function f(x) versus values of a difference image DIFF(i j).
  • 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 ofthe background which can be affected by an active light source
  • 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.
  • 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.
  • 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 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.
  • 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 ofthe same scene taken at the same time.
  • a comparison of all pixels in the image provides information which can be analyzed to delineate the foreground and background regions of the image.
  • 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 ofthe light incident to the object is reflected and available for measurement.
  • the subject of the image 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 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 ofthe 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.
  • 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 ofthe background which can not be affected by an active light source.
  • Two IR images are taken ofthe same scene under different lighting conditions.
  • the first IR image shown in Figure 2 is a front IR image IRfr 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 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 IR& taken with front IR lighting.
  • ambient (i.e. 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 "A" is reflected at various pixels in the far background since the front IR lighting is incapable of effecting the lighting of the far background.
  • the active IR lighting i.e. the front IR lighting
  • 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 "B" which is greater than the ambient IR light intensity "A”.
  • Figure 3 shows a background illuminated IR image IR bg taken with no active front IR illumination (i.e. 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”
  • the background IR lighting combined with the ambient IR lighting is reflected from pixels in the near background region having an intensity of "C” which is greater than the intensity "B " of the front lighting in Figure 2.
  • the intensity ofthe background lighting is greater than the intensity of the front lighting so that the relationships detailed in the following Table I will hold true.
  • the images IR fr and IR bg are preferably taken with the same IR imaging device in near temporal proximity, limited only by the shutter speed ofthe IR imaging device and the time necessary to switch the active IR lighting.
  • the images IR fr and IR bg are preferably taken with the same IR imaging device in near temporal proximity, limited only by the shutter speed ofthe IR imaging device and the time necessary to switch the active IR lighting.
  • 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.
  • the following relationships of Table I preside for each corresponding pixel location (ij) of each image, i and j being integers.
  • a given pixel in IR bg has a greater intensity at the same pixel location in IRfr , then that pixel is identified in the mask as a foreground pixel; if a given pixel in IRjj g has the same intensity at the same pixel location in IR f r , then that pixel is identified in the mask as a far background pixel; and if a given pixel in IR bg has a lesser intensity at the same pixel location in IR tr , then that pixel is identified in the mask as a near background pixel.
  • a preferred background replacement system is inco ⁇ orated into a photo unit 100 (see Figure I) 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 ofthe imaging devices 106 and 108 are compatible electronic cameras capable of capturing an image in digital form.
  • 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
  • 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 IR bg , as shown in Figure 3, is taken with the imaging device 108.
  • the background IR light 110 is deactivated, the visible light source 136 is activated, and the front IR light 1 16 having a second intensity less than the first intensity is activated.
  • the imaging device 108 takes a front illuminated IR image IR fr , 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.
  • 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 ofthe modified visible light image can be retrieved from a slot or tray 120 within printer 104.
  • 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.
  • the front IR light 116 should be located as close as possible to the optical axis ofthe 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.
  • the front IR lighting could be replaced with foreground IR lighting.
  • the first IR image would be a foreground IR image IRf g 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 IRam taken with only ambient IR illumination in both the foreground and the background.
  • the pixels ofthe mask are created by comparing IR fg with IR am according to Table II for each corresponding pixel location (ij) of each image, i and j being integers.
  • a given pixel in IRr g has a greater intensity at the same pixel location in IR am , then that pixel is identified in the mask as a foreground pixel; and if a given pixel in IRf g has the same or lesser intensity at the same pixel location in IR a , 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.
  • 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 light rejection. Digitization was accomplished using a Data Translation DT55-LC frame grabber with 7 bits of quantization.
  • 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.
  • 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 Pl-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 Tl-10 (500 watts, 3200K @ 120 volts) with barn doors excluding the background lighting from behind the subject.
  • Mask generation is a crucial task in background replacement.
  • a mask is generated for accurately distinguishing between the foreground and the background of an image.
  • 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 Vj n (ij) and the predetermined replacement background B(ij) have all been determined as described in the above sections, where i and j are integers which represent the horizontal and vertical coordinates of the images, respectively.
  • each pixel of IRf(ij) and IRb(ij) is represented as 0 ⁇ IRf(ij) ⁇ 255 or 0 ⁇ IR b (ij) ⁇ 255, respectively.
  • Subtracting IR b (ij) from IR((ij) in step 400 yields a difference image DIFF(ij) where each pixel is represented as -255 ⁇ DIFF(i j) ⁇ +255.
  • DIFF(ij) is binarized in step 410 to form a binarized image M z (ij) by comparing the numerical value of each pixel of DIFF to a predetermined threshold value ⁇ , then setting all pixel values which are greater than ⁇ to a logic high and all pixel values which are less than or equal to ⁇ to a logic low.
  • This type of pixel classification is mathematically written as:
  • M z (i j) 0, otherwise, where ⁇ is a predetermined parameter which will be discussed in further detail hereinafter in conjunction with calculations for the modulation function of step 430.
  • is a predetermined parameter which will be discussed in further detail hereinafter in conjunction with calculations for the modulation function of step 430.
  • a logic low value in the binarized image M z designates a definite background pixel.
  • a logic high value designates only a probable foreground pixel, since it is possible that M z may contain some false foreground pixels due to noise.
  • False foreground pixels can be identified and removed using a foreground connectivity constraint.
  • the image of Figure 6 can be characterized as a foreground island 602 and 604 surrounded by a background ocean 600.
  • 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.
  • pixels M z (l,l) and M z (2,l) are identified as false foreground pixels.
  • the line of demarcation separating the foreground and background regions of the image is generally hazy rather than sharp.
  • a hair strand belonging to the foreground subject has only sub-pixel width.
  • 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.
  • Mg(ij) is a gray-scale mask
  • M b (ij) is the binary mask
  • DIFF(ij) is the difference image
  • f(DIFF(i j)) is a predefined modulation function varying in value from 0 to 1.
  • All pixels located in the foreground plateau 602 have M g gray-scale mask values of 1 where DIFF is greater than ⁇ H in accordance with the modulation function f(x) (see also Figure 7).
  • DIFF is less than or equal to ⁇ L
  • M g is 0.
  • the gray-scale mask M g 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 ⁇ and ⁇ H .
  • the pixels in this area contain both foreground and background information.
  • the modulated gray-scale mask M g produces natural looking background replacement results.
  • is empirically chosen as an integer value between 0 and 255 inclusive.
  • the pixels of M g are aligned with corresponding pixels in the visible light image V ⁇ n so that corresponding points in M g and V ⁇ n 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.
  • the transformed mask M t is applied to the visible light image V m and the predetermined background B replaces the original background to generate the background replaced image V 0U
  • Voui(ij) M g (i j)V m (ij) + (l-M B (ij))B(ij). (4)
  • the second preferred configuration of the inventive background replacement method 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 M z (ij).
  • This problem can be overcome by enhancing details of the IR image in enhance steps 504 and 506 prior to pixel classification.
  • steps 504 and 506 involve high pass filtering which could possibly introduce or amplify noise.
  • each of the preprocessed IR images is enhanced in a similar fashion in steps 504 and 506.
  • the enhanced front illuminated IR image, IR F ' is written as:
  • IRf'(ij) IRf + ⁇ DET f (5)
  • IR f is the front illuminated IR image
  • is a predetermined parameter specifying the amount of enhancement
  • DET f is a measure of the details residing in IRf.
  • the parameter ⁇ is actually an experimentally derived constant.
  • DETf captures or measures details residing in IR f by using, for example, the Laplacian filter of equation (6):
  • DET b max ⁇ - ⁇ IRb(ij), 0 ⁇ for the background image.
  • Other known filters could be used in place ofthe Laplacian.
  • a foreground point has the property IR (ij) > IRb'O j), and a background point has the property IR f '(ij) ⁇ IR b '(ij).
  • the decision rule for pixel classification in the binarizing step 410 of Figure 5 is:

Abstract

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 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 υ. 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.

Description

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. 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 ofthe present invention is the generation and application of a mask for use with the background replacement system and method ofthe 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 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 θ. 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 ofthe 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 ofthe 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 Figure 7 is a plot of values of a modulation function f(x) versus values of a difference image DIFF(i j).
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 ofthe 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 ofthe 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 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 ofthe same scene taken at the same time.
Illuminating the background and foreground regions ofthe 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 ofthe 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 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 ofthe 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 ofthe 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 ofthe same scene under different lighting conditions.
The first IR image, shown in Figure 2, is a front IR image IRfr 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 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 IR& taken with front IR lighting. Of course, ambient (i.e. 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 "A" 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 ofthe 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 "B" which is greater than the ambient IR light intensity "A".
Figure 3 shows a background illuminated IR image IRbg taken with no active front IR illumination (i.e. 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 "C" which is greater than the intensity "B " of the front lighting in Figure 2. For this preferred method, the intensity ofthe 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. The images IRfr and IRbg are preferably taken with the same IR imaging device in near temporal proximity, limited only by the shutter speed ofthe 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 l/30th of a second (i.e. a typical shutter speed of an electronic camera) will ensure negligible movement of the subject. Of course, if the subject ofthe 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(ij)
Far background pixel IRft(ij) = IRbg(ij)
Near background pixel IRf,(ij) < IRbg(ij)
TABLE I
Thus, if a given pixel in IRbg has a greater intensity at the same pixel location in IRfr , then that pixel is identified in the mask as a foreground pixel; if a given pixel in IRjjg 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 IRtr , then that pixel is identified in the mask as a near background pixel. IR Background Replacement System
A preferred background replacement system is incoφorated into a photo unit 100 (see Figure I) 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 ofthe 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 (i.e. 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 1 16 having a second intensity less than the first intensity is activated. At that time, the imaging device 108 takes a front illuminated IR 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 ofthe 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 ofthe 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 IRam taken with only ambient IR illumination in both the foreground and the background. In the ideal case, the pixels ofthe mask are created by comparing IRfg with IRam according to Table II for each corresponding pixel location (ij) of each image, i and j being integers.
Foreground pixel IRfg(ij) > IRam(ij)
Background pixel IRfg(ij) < IRam(ij)
TABLE II
Thus, if a given pixel in IRrg has a greater intensity at the same pixel location in IRam , 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 IRa , 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 light rejection. Digitization was accomplished using a Data Translation DT55-LC 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 Pl-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 Tl-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 Vjn(ij) and the predetermined replacement background B(ij) have all been determined as described in the above sections, where i and j are integers which represent the horizontal and vertical coordinates of the images, respectively. A foreground pixel has the property IRf(i j) > IRb(ij) and a background pixel has the property of either IRf(ij) = IRb(ij) or IRf j) < IRb(ij) depending upon whether or not the pixel is illuminated by active lights. In a typical system, each pixel of IRf(ij) and IRb(ij) is represented as 0 < IRf(ij) < 255 or 0 < IRb(ij) ≤ 255, respectively. Subtracting IRb(ij) from IR((ij) in step 400 yields a difference image DIFF(ij) where each pixel is represented as -255< DIFF(i j) < +255. A sample 8x8 point difference image DIFF(ij) for i j=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 10
•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 θ, then setting all pixel values which are greater than θ to a logic high and all pixel values which are less than or equal to θ to a logic low. This type of pixel classification is mathematically written as:
M2(ij) = l, ifDIFF(ij) > θ, or (1)
Mz(i j) = 0, otherwise, where θ is a predetermined parameter which will be discussed in further detail hereinafter in conjunction with calculations for the modulation function of step 430. The following 8x8 binarized image Mz(ij) ofthe above difference image DIFF is illustrative for i, j= 0,1...7 when θ=5.
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 θ= =5)
Note that a change in θ can cause a significant change in the appearance and values ofthe binarized image Mz(i j). Contrast the above binarized image for θ=5 with the following binarized image for θ=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
M2(for θ= 10) Note that the mix of foreground and background pixels has changed, i.e. there are fewer foreground pixels in the binarized image M2 when θ=10 than when θ=5. Generally as θ increases, the number of foreground pixels decreases.
A logic low value in the binarized image Mz, as shown above, designates a definite background pixel. However, a logic high value designates only a probable foreground pixel, since it is possible that Mz 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 Mz for θ=10 above, and (in the scene of Figure 6) where the image is composed ofthe 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 Mz where θ=10, pixels Mz(l,l) and Mz(2,l) are identified as false foreground pixels. These pixels are removed in step 420 and the image representation, i.e. binary mask, Mb(ij) becomes: 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
M„(for θ= 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 gray¬ scale mask Mg is generated according to the equation:
Mg(ij) = Mb(ij) - f(DIFF(ij)). (2)
Mg(ij) is a gray-scale mask, Mb(ij) 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 (2), the gray-scale mask Mg is generated using pixel-by-pixel multiplication ofthe binary mask Mb times the modulation function f(x)=f(DIFF(ij)). A preferred modulation function f(x) taken in conjunction with Figure 7 (where θ, ΘL and On are predetermined parameters shown in a preferred configuration) is defined as: f(x) = 0, ifx<θ ,
(X-ΘL)/(ΘH-ΘL), if ΘL<X<ΘH, and (3) l. ifx>θH .
Figure 7 is a plot of the gray-scale mask values versus the difference image values where f(x) for x=DIFF(i j) is defined in equation (3) above. Every pixel in the edge region 604 has a value both greater than Θ and less than ΘH- In order to modulate the foreground pixels located throughout the edge region 604 of the binary mask Mb for θ=10, each pixel has a corresponding location in DIFF(ij) whose value is multiplied by the appropriate functional value f(x). 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 f(x). All pixels located in the foreground plateau 602 have Mg gray-scale mask values of 1 where DIFF is greater than ΘH in accordance with the modulation function f(x) (see also Figure 7). When DIFF is less than or equal to ΘL, then Mg is 0. Finally, if DIFF is both greater than ΘL and less than ΘH, 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 θ and ΘH. The pixels in this area contain both foreground and background information. The modulated gray-scale mask Mg produces natural looking background replacement results. θ is empirically chosen as an integer value between 0 and 255 inclusive. The best value of θ 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, θ=10 was experimentally determined as the best fit. θ controls the size and shape ofthe foreground island. As θ increases, the foreground decreases. Θ also designates the minimum value of a pixel in the edge region 604. If ΘL-=Θ (as in the preferred embodiment), then the minimum value of a pixel in the edge region 604 is slightly greater than 0. Of course if ΘL is decreased, then the minimum value of a pixel in the edge region 604 increases. Thus, the strength ofthe edge is controlled by ΘL. AS ΘL approaches negative infinity, there is no effective modulation between the foreground and background, i.e. the mask value of each ofthe 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 Vιn so that corresponding points in Mg and Vιn 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 Vm and the predetermined background B replaces the original background to generate the background replaced image V0U|. In other words,
Voui(ij) = Mg(i j)Vm(ij) + (l-MB(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'(ij) = IRf + αDETf (5) where IRf is the front illuminated IR image, α is a predetermined parameter specifying the amount of enhancement, and DETf is a measure of the details residing in IRf. The parameter α is actually an experimentally derived constant. DETf captures or measures details residing in IRf by using, for example, the Laplacian filter of equation (6):
DETf = max {-ΔIRjøj), 0} (6)
where Δ is the Laplacian operator. Similarly, IRb'(i j) = IRb + ocDETb and
DETb = max{-ΔIRb(ij), 0} for the background image. Other known filters could be used in place ofthe Laplacian.
Still, a foreground point has the property IR (ij) > IRb'O j), 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(ij) = l, ifRES(ij) > 0, or (7)
= 0, otherwise
where the residue image RES = IRf'- IRb'. Binarization ofthe residue image RES can be interpreted as adaptive thresholding ofthe difference image. In fact, the expression RES(i j) > 0 can be rewritten as IRf - IRb > θa, where θa is spatially adaptive according to local busyness (i.e. DETf - DETb) scaled by α.
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 ofthe 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 ofthe invention as claimed.

Claims

WHAT IS CLAIMED IS:
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 ofthe 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 θ, then setting a pixel ofthe binarized image to a logic high when said pixel of the binarized image is greater than θ, otherwise setting said pixel of the binarized image to a logic low; producing a binary mask from the binarized image by removing false foreground pixels ofthe binarized image according to a connectivity constraint; producing the gray-scale mask specifying how much of each pixel ofthe binary mask is attributed to the foreground and how much of each pixel ofthe 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 ofthe gray-scale mask and the visible light image.
3. The method of claim 2, wherein for a given pixel ofthe gray-scale mask said predetermined modulation function equals: (DIFF-ΘL)/(ΘH - ΘL) if a corresponding pixel in the difference image is less than a predetermined parameter ΘH and greater than a predetermined parameter Θ ; 0, if the corresponding pixel in the difference image is less than or equal to ΘL ; and 1, if the corresponding pixel in the difference image is greater than or equal to ΘH .
4. The method of claim 1 , wherein said second IR radiation originates from a front light.
5. The method of claim 1, wherein said second IR radiation originates from one or more foreground lights.
6. The method of claim 1. wherein said second IR radiation originates from ambient light.
7. The method of claim 1 , wherein said third time equals said second time.
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.
10. 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 l/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.
PCT/US1996/012846 1996-01-25 1996-08-02 Method for replacing the background of an image WO1997027702A1 (en)

Priority Applications (3)

Application Number Priority Date Filing Date Title
AU68434/96A AU709844B2 (en) 1996-01-25 1996-08-02 Method for replacing the background of an image
JP9526816A JPH11502693A (en) 1996-01-25 1996-08-02 How to replace an image background
EP96928817A EP0818108A1 (en) 1996-01-25 1996-08-02 Method for replacing the background of an image

Applications Claiming Priority (2)

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

Publications (1)

Publication Number Publication Date
WO1997027702A1 true WO1997027702A1 (en) 1997-07-31

Family

ID=24367657

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/US1996/012846 WO1997027702A1 (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)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3099060A1 (en) * 2007-04-03 2016-11-30 Lifetouch Inc. Method and apparatus for background replacement in still photographs
CN109816662A (en) * 2017-11-22 2019-05-28 瑞昱半导体股份有限公司 The image treatment method and electronic device of prospect Extraction of Image
US20210327069A1 (en) * 2018-08-03 2021-10-21 Nippon Telegraph And Telephone Corporation Image processing device, image processing method, and image processing program
CN114581443A (en) * 2022-05-06 2022-06-03 中科慧远视觉技术(北京)有限公司 Image processing method and device, computer equipment and readable storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0437383A (en) * 1990-06-01 1992-02-07 Nippon Hoso Kyokai <Nhk> Method and apparatus for picture synthesis
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
JPH07154777A (en) * 1993-11-30 1995-06-16 Matsushita Electric Ind Co Ltd Image processor and video telephone system
EP0680205A2 (en) * 1994-04-29 1995-11-02 International Business Machines Corporation Imaging system for object segmentation

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0437383A (en) * 1990-06-01 1992-02-07 Nippon Hoso Kyokai <Nhk> Method and apparatus for picture synthesis
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
JPH07154777A (en) * 1993-11-30 1995-06-16 Matsushita Electric Ind Co Ltd Image processor and video telephone system
EP0680205A2 (en) * 1994-04-29 1995-11-02 International Business Machines Corporation Imaging system for object segmentation

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
PATENT ABSTRACTS OF JAPAN vol. 016, no. 221 (E - 1205) 22 May 1992 (1992-05-22) *
PATENT ABSTRACTS OF JAPAN vol. 95, no. 006 *

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3099060A1 (en) * 2007-04-03 2016-11-30 Lifetouch Inc. Method and apparatus for background replacement in still photographs
CN109816662A (en) * 2017-11-22 2019-05-28 瑞昱半导体股份有限公司 The image treatment method and electronic device of prospect Extraction of Image
CN109816662B (en) * 2017-11-22 2022-10-18 瑞昱半导体股份有限公司 Image processing method for foreground image extraction and electronic device
US20210327069A1 (en) * 2018-08-03 2021-10-21 Nippon Telegraph And Telephone Corporation Image processing device, image processing method, and image processing program
US11881005B2 (en) * 2018-08-03 2024-01-23 Nippon Telegraph And Telephone Corporation Image processing device, image processing method, and image processing program
CN114581443A (en) * 2022-05-06 2022-06-03 中科慧远视觉技术(北京)有限公司 Image processing method and device, computer equipment and readable storage medium

Also Published As

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

Similar Documents

Publication Publication Date Title
US5923380A (en) Method for replacing the background of an image
US10349029B2 (en) Photographic scene replacement system
CN101889435B (en) Camera flash module and method for controlling same
CN102984448B (en) Utilize color digital picture to revise the method for controlling to action as acutance
US5117283A (en) Photobooth compositing apparatus
TWI465825B (en) Image capturing device and capturing method with light assistance
WO1994026057A1 (en) Background separation for still and moving images
US11825231B2 (en) System and method for automated detection and replacement of photographic scenes
KR20120073159A (en) Temporally aligned exposure bracketing for high dynamic range imaging
CN103543575A (en) Image acquisition device and light source assisted photographing method
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
JP2004318205A (en) Image processing device, image processing method, and photographing device
DE19713648A1 (en) Electronic reduction of light and dark contrast in video pictures
CA2295433A1 (en) Mask for changing the brightness profile of a photographic copy
JP2001177732A (en) Image processor
JPH1093859A (en) Image processing unit and image processing method
JP3962825B2 (en) Image processing apparatus and program
CN108965707B (en) Automatic bottom-removing shooting system
JP3624181B2 (en) Fundus photographing device
JP2016200742A (en) Imaging apparatus
WO2023107455A2 (en) Uv system and methods for generating an alpha channel
WO2013113897A1 (en) Digital camera having a projection unit and method for operating a digital camera having a projection unit
Cookson et al. High Resolution Digitization Of Color Images

Legal Events

Date Code Title Description
AK Designated states

Kind code of ref document: A1

Designated state(s): AU CA JP

AL Designated countries for regional patents

Kind code of ref document: A1

Designated state(s): AT BE CH DE DK ES FI FR GB GR IE IT LU MC NL PT SE

WWE Wipo information: entry into national phase

Ref document number: 1996928817

Country of ref document: EP

ENP Entry into the national phase

Ref document number: 2212812

Country of ref document: CA

Ref country code: CA

Ref document number: 2212812

Kind code of ref document: A

Format of ref document f/p: F

ENP Entry into the national phase

Ref country code: JP

Ref document number: 1997 526816

Kind code of ref document: A

Format of ref document f/p: F

121 Ep: the epo has been informed by wipo that ep was designated in this application
WWP Wipo information: published in national office

Ref document number: 1996928817

Country of ref document: EP

WWW Wipo information: withdrawn in national office

Ref document number: 1996928817

Country of ref document: EP