1. Technical Field
This invention is directed toward a system and method for improving digital images. More specifically, the invention is directed towards a photo illumination technology that facilitates user-selectable illumination of an existing photo ranging from full artificial flash illumination to ambient light illumination and every gradation between.
2. Background Art
Recently, some efforts have been made to do things with digital photography that are difficult or impossible with analog photography. Many digital cameras now come with a capacity to shoot short video clips. Some digital camera software comes equipped with image-stitching capabilities that allow one to create larger panoramas sewn together from smaller, overlapping images of the same scene. However, none of these digital photography techniques can be used to vary the amount of flash after the picture is taken to obtain the optimum illumination level for the subject matter to be photographed.
A flash typically allows the photographer to control the lighting situation when the picture is taken. If insufficient natural light is available, a flash may be used to increase the overall illumination. Sometimes the subject matter to be photographed is too dimly illuminated to make a photograph without supplementary lighting. Additionally, flash may be used in order to change or improve the natural lighting. This is known as fill flash. For instance, pictures taken of people outside on a bright day often show the subjects squinting due to the glare caused by the sun. A good solution to this problem is to move the subjects into the shade and to use flash to fill in the shadows.
Either with a digital or with an analog camera, obtaining the correct amount of flash is difficult. Often images photographed are overexposed—too much light reached the film when the picture was taken. There are many reasons that this occurs. The flash could have been too bright or the flash setting was in some other way improper. The shutter speed could have been too slow or the aperture could have been too large. Alternately, the images could be underexposed—that is, not enough light reached the film, and the picture comes out dark and indistinguishable. In this case, film speed, shutter speed, aperture and flash settings can all have an effect. With so many variables it is difficult for even the most experienced photographer to obtain a photograph with the proper amount of flash.
The present invention is directed toward a system and method of varying an image's or photograph's illumination. This system and method, named the continuous flash system and method, facilitates user-selectable illumination of a photograph or other image ranging from full artificial flash illumination to ambient light illumination and every gradation between, based on a set of initially acquired images of identical or similar subject matter. Additionally, it is even possible to extrapolate beyond the initially acquired images to achieve other illumination effects. One embodiment of the continuous flash system and method employs a digital camera feature that captures two photos hundredths of a second apart where one photo is captured in concert with a flash and one is captured with no flash. In general, the continuous flash system and method then interpolates or extrapolates between or beyond the set of initially acquired images to obtain a final image with the preferred amount of flash. One embodiment of the invention incorporates this interpolation and extrapolation of the amount of flash intensity within the software or firmware of a digital camera. Compensations may be made to reconcile any movement of the subject matter that may have occurred between the set of originally acquired images. A user may be presented with the infinite continuum of gradations of illumination when determining the amount of illumination desired for the final image. Or the system may automatically render the final image based on some predetermined or prescribed illumination value.
More specifically, the continuous flash-system and method acquires and stores an image set, typically composed of two images, with a camera. Typically, these images will depict the same static scene. One picture is taken without flash and the other picture is taken with a flash. It should be noted that if the originally acquired image set includes more than one image with flash (while still retaining the image taken at ambient light conditions) better interpolation/extrapolation results can be obtained. These pictures in the image set ideally should be acquired in a short time interval, so that there is little motion of the camera and the subject matter of the image between the images of the set. However, if the subject matter to be photographed, as well as the camera position, are static over long periods of time then it does not matter how much time has elapsed. Potentially, a tripod can be used to hold the camera steady between the exposures. If there is misalignment between the initially acquired images they can be aligned using conventional image alignment methods.
Once the initial set of images is acquired, and optionally aligned, the system interpolates and/or extrapolates the amount of flash. In such a case, additional images are generated. Essentially, in the case of interpolation, image processing is employed to interpolate the flash intensity between input images to generate an image or images having flash intensity value(s) in-between those of the input image set. Whereas, in the case of extrapolation, extrapolation techniques are used to extrapolate the flash intensity to generate images having a flash intensity outside those of the input image set. The resulting images are referred to as flash adjusted images. One or more of these flash adjusted images can be selected as a final image, the image with the preferred amount of flash. Any of the initially acquired, flash adjusted or final images can be stored, displayed or printed.
In one working embodiment simple linear interpolation in red, green, blue (RGB) space was used. However, one could also interpolate in other color models, such as HSV (hue, saturation, value) or HLS (hue, lightness, saturation). The system and method according to the invention works with grayscale images as well as color. In addition to different types of color space, other types of interpolation besides simple linear interpolation can be used. These include bilinear interpolation, spline-based interpolation, curve fitting, and regression. Additional methods of extrapolation could also be used to extrapolate the amount of illumination beyond that available in the set of originally acquired images.
A user-interface may be presented to the user that interpolates (and extrapolates) between these two stored images, to allow the user to vary the amount of flash. This user interface typically includes a slider control that allows the user to display one or more flash adjusted images with different levels of intensity before selecting the preferred intensity with which to display or render the final image. In one embodiment of the continuous flash system and method, the user interface includes three sliders to vary the red, green and blue intensity in the flash adjusted image or images separately before selecting the final image.
As mentioned above, since the two source images are not acquired at the exact same time, there may be motion of the camera from one image to the other. This motion can be compensated for by registering the two images together. This registration or alignment problem is well known in computer vision. The one big difference in the continuous flash system and method is that the images of the initially acquired image set have different intensity values, since one is taken with flash and the other without. Thus, the registration algorithm that is employed should be robust to intensity differences. For instance, one can apply a Gaussian or Laplacian filter to both images to locate high-derivative regions of the image, and align these derivative images together. For additional robustness, the alignment cost metric could look at just the signs of the derivatives and ignore their magnitudes. Alternately a camera tripod could be used to avoid registration when still images are taken.
Although typically the system and method according to the invention corrects the intensity of the whole image, in one embodiment only a portion of the image is corrected to obtain the optimum or preferred intensity level. In this case the portion of the image to be flash adjusted is segmented out and the flash intensity is only adjusted for the desired portion of the image.
In one working embodiment of the invention, the source images were captured with automatic exposure settings by the digital camera. It would be preferable for the two source images to be taken with identical exposure settings. Or, at least it would be preferable to know the F-stop difference between the two exposures, so that image values from both exposures can be brought into a common luminance coordinate system prior to interpolation.
The continuous flash system and method has many advantages. For instance, it allows even a novice photographer to obtain photographs with the optimum level of flash. Additionally, the initial image set can be easily stored within a camera or other storage device and flash adjustment can be performed at a much later time after acquiring the initial image set. Because the images of the image set are so much alike, especially after alignment, compressing them together results in a representation that does not require much more space than storing just one image alone. For example, a mean image can be compressed and then differences images can be compressed, resulting in a very low storage cost.
In addition to the just described benefits, other advantages of the present invention will become apparent from the detailed description which follows hereinafter when taken in conjunction with the drawing figures which accompany it.
The file of this patent contains at least one drawing executed in color. Copies of this patent with color drawing(s) will be provided by the U.S. Patent and Trademark Office upon request and payment of the necessary fee.
The specific features, aspects, and advantages of the invention will become better understood with regard to the following description, appended claims, and accompanying drawings where:
In the following description of the preferred embodiments of the present invention, reference is made to the accompanying drawings that form a part hereof, and in which is shown by way of illustration specific embodiments in which the invention may be practiced. It is understood that other embodiments may be utilized and structural changes may be made without departing from the scope of the present invention.
The invention is operational with numerous other general purpose or special purpose computing system environments or configurations. Examples of well known computing systems, environments, and/or configurations that may be suitable for use with the invention include, but are not limited to, personal computers, server computers, hand-held or laptop devices, multiprocessor systems, microprocessor-based systems, set top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments that include any of the above systems or devices, and the like.
The invention may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The invention may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
With reference to
Computer 110 typically includes a variety of computer readable media. Computer readable media can be any available media that can be accessed by computer 110 and includes both volatile and nonvolatile media, removable and non-removable media. By way of example, and not limitation, computer readable media may comprise computer storage media and communication media. Computer storage media includes both volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to store the desired information and which can be accessed by computer 110. Communication media typically embodies computer readable instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism and includes any information delivery media. The term “modulated data signal” means a signal that has one or more of its characteristics set or changed in such a manner as to encode information in the signal. By way of example, and not limitation, communication media includes wired media such as a wired network or direct-wired connection, and wireless media such as acoustic, RF, infrared and other wireless media. Combinations of the any of the above should also be included within the scope of computer readable media.
The system memory 130 includes computer storage media in the form of volatile and/or nonvolatile memory such as read only memory (ROM) 131 and random access memory (RAM) 132. A basic input/output system 133 (BIOS), containing the basic routines that help to transfer information between elements within computer 110, such as during start-up, is typically stored in ROM 131. RAM 132 typically contains data and/or program modules that are immediately accessible to and/or presently being operated on by processing unit 120. By way of example, and not limitation,
The computer 110 may also include other removable/non-removable, volatile/nonvolatile computer storage media. By way of example only,
The drives and their associated computer storage media discussed above and illustrated in
The computer 110 may operate in a networked environment using logical connections to one or more remote computers, such as a remote computer 180. The remote computer 180 may be a personal computer, a server, a router, a network PC, a peer device or other common network node, and typically includes many or all of the elements described above relative to the computer 110, although only a memory storage device 181 has been illustrated in
When used in a LAN networking environment, the computer 110 is connected to the LAN 171 through a network interface or adapter 170. When used in a WAN networking environment, the computer 110 typically includes a modem 172 or other means for establishing communications over the WAN 173, such as the Internet. The modem 172, which may be internal or external, may be connected to the system bus 121 via the user input interface 160, or other appropriate mechanism. In a networked environment, program modules depicted relative to the computer 110, or portions thereof, may be stored in the remote memory storage device. By way of example, and not limitation,
The exemplary operating environment having now been discussed, the remaining parts of this description section will be devoted to a description of the program modules embodying the invention.
In the following paragraphs the continuous flash system and method which provides gradation of flash in flash adjusted images, is described in more detail.
2.1 General Overview.
The continuous flash system and method is directed toward a digital photo illumination technology that facilitates user-selectable illumination of an existing photo ranging from full artificial flash illumination to ambient light illumination and, if desired, every gradation between.
As shown in
The system then interpolates between (or extrapolates from) the two acquired (and optionally aligned) images to achieve flash-adjusted images with various gradations of flash. In such a case, additional images are generated. Essentially, in the case of interpolation, image processing is employed to interpolate the flash intensity between input images to generate an image or images having flash intensity value(s) in-between those of the input image set. Whereas, in the case of extrapolation, extrapolation techniques are used to extrapolate the flash intensity to generate images having a flash intensity outside those of the input image set. The resulting images are referred to as flash adjusted images. One or more of these flash adjusted images can be selected as a final image, an image with the preferred amount of flash.
The system can allow the user to select the interpolated image with the preferred amount of illumination with which to render the final image. Alternately, the system can automatically render the final image based on some prescribed flash intensity value (process action 208) or it can automatically select the optimal flash intensity value incorporating the output of any machine-learning algorithm which has been trained on sets of images which serve as examples of “good” and “bad” levels of flash. Any of the initially acquired, flash adjusted or final images can be stored, displayed or printed.
As discussed above, a user-interface may be presented to the user that depicts the interpolated images available from the original set of acquired images, to allow the user to vary the amount of flash. Such a user interface typically employs a slider to vary the amount of illumination or flash in the flash-adjusted image or images to be rendered. The user can then direct the system to render the final image with the preferred amount of flash intensity. Alternately, instead of using one slider to vary overall flash intensity, one embodiment of the invention employs three sliders to vary the red, green and blue intensities separately.
Similar to the process shown in
It should be noted that if the originally acquired image set includes more than one image with flash with different levels of flash (while still retaining the image taken at ambient light conditions) better interpolation/extrapolation results can be obtained. Interpolation with more than one flash image allows for the compensation of saturation in some cases.
Although typically the continuous flash system and method corrects the intensity of the whole image, in one embodiment only a portion of the image is corrected to obtain the optimum or preferred intensity level. For instance, in this embodiment flash intensity can be increased only for the background of an image. In this embodiment the areas of the image for which flash intensity are sought to be varied are segmented out. These areas are then processed when varying the flash intensity with the system and method according to the invention. The areas that are not sought to be flash-adjusted are not processed.
The continuous flash system and method can be embodied in software and operated using a conventional computing device like a PC or laptop computer. However, one embodiment of the continuous flash system and method incorporates the process actions of the invention to vary the amount of flash intensity within the software or firmware of a digital camera. Processing of the images to obtain desired or optimum flash intensity in this embodiment is conducted within the camera.
The initial image set can be easily stored within a camera or other storage device and flash adjustment can be performed at a much later time after acquiring the initial image set. Because the images of the image set are so much alike, especially after alignment, compressing them together results in a representation that does not require much more space than storing just one image alone. For example, a mean image and differences images can be separately compressed, resulting in a very low storage cost. Compression can be performed by conventional means, such as, for example, Principal Component Analysis.
2.2 Interpolation/Extrapolation
As discussed above, the continuous flash system and method employs interpolation and extrapolation methods to provide a continuous spectrum of illumination levels from the originally acquired set of images of the desired subject matter. In mathematical terms, in one embodiment of the invention, this may be described as follows:
Let I0 denote the image taken without flash, and I1 denote the image taken with flash. A continuous family of images can be defined:
Thus, α represents the quantity of flash:
I(α) for α>1 is an extrapolated image that has more flash than taken with the original image with flash. I(α) for α<0 is an extrapolated image that has less flash than possible (i.e. subtracts flash reflectance from an image already taken without flash).
The above discussed interpolation/extrapolation is performed on a pixel by pixel basis. The interpolation method discussed above employs basic linear interpolation in RGB color space. One could also interpolate in other color models, such as HSV (hue, saturation, value) or HLS (hue, lightness, saturation). Likewise other interpolation or extrapolation functions could be used, such as bilinear interpolation, spline-based interpolation, curve fitting, and regression. These other methods of interpolation/extrapolation are more useful when greater than one flash image is used.
For the multi-flash embodiment of the invention, let the images be denoted I0, I1, . . . , In, where the flash intensity in image Ii is fi (some continuous value). Thus, for the common two-image case, one simply has images I0, I1 with f0=0 and f1=1 (zero flash and full flash). One example of an image set with greater than two images would be a set of 3 images: I0, I1, I2 with f0=0, f1=0.5, f2=1. During the interpolation, each pixel is treated independently. That is, for a given pixel, it has a different color value in each of the images. These values can be denoted c0, c1, . . . cn. The result is thus a simple data fitting problem (e.g., curve fitting or regression). A function c(f) that fits the two-dimensional points (2D) (f0,c0), (f1,c1), . . . (fn,cn) is sought. One example of such a function is a piecewise linear curve that just connects the points. This piecewise linear curve then corresponds to linear interpolation between successive samples. Another example of a suitable curve for interpolation is a spline curve (a polynomial function that is fit to the 2D points). There are approximating spline curves (that do not pass through the points), and interpolating spline curves (that do pass through the points). One common example of an approximation spline curve is called a cubic B-spline. A common example of an interpolating spline curve is called a Catmull-Rom spline.
Once the function c(f) for the pixel has been constructed (e.g. via piecewise linear interpolation, or spline), it can then be evaluated at the desired flash intensity f.
2.3 Registration/Alignment
Since the two source images are not acquired at the exact same time, there may be motion of the camera from one image to the other. This motion can be compensated for by registering the two images together. This registration or alignment problem is well known in computer vision. The one big difference in the continuous flash system and method is that the images of the initially acquired image set have different intensity values, since one (or more) is taken with flash and another is taken without. In one working embodiment of the invention, conventional edge detection methods were used to identify the same objects in the image taken with flash and the image taken without flash, and these edges were then used to align the two images. However, other conventional image alignment and registration methods can also be used.
It is important, however, that the registration algorithm employed should be robust to intensity differences. One can apply a Gaussian or Laplacian filter to both images of a two-image set to locate high-derivative regions of the image, and align these derivative images together. For example, a Laplacian pyramid can be used to identify the high-frequency edges of an image. Thus, to align two images (I0 and I1) a Laplacian pyramid is constructed of each image of the image set. The images are then aligned by aligning the largest coefficients in the finest Laplacian pyramid images. This method is robust to intensity differences because the location of the largest coefficients in the finest pyramid does not change if the illumination level of the image changes. For additional robustness, the alignment cost metric could look at just the signs of the derivatives and ignore their magnitudes.
2.4 Exemplary Working Embodiment
The following paragraphs describe an exemplary working embodiment of the continuous flash system and method.
As shown in
2.4.1 Interpolation Function
The interpolation computation performed in this working embodiment employed the formula
I(α)=(1−α)I0+(α)I1.
The images shown in the above example were computed using simple linear interpolation in RGB space.
2.4.2 Exposure Settings
In the above example, the source images were captured with automatic exposure settings by the digital camera. It would be preferable for the two source images to be taken with identical exposure settings. Or, at least it would be preferable to know the F-stop difference between the two exposures, so that image values from both exposures can be brought into a common luminance coordinate system prior to interpolation or extrapolation.
The foregoing description of the invention has been presented for the purposes of illustration and description. It is not intended to be exhaustive or to limit the invention to the precise form disclosed. Many modifications and variations are possible in light of the above teaching. It is intended that the scope of the invention be limited not by this detailed description, but rather by the claims appended hereto.
Number | Name | Date | Kind |
---|---|---|---|
5309243 | Tsai | May 1994 | A |
6535245 | Yamamoto | Mar 2003 | B1 |
6906751 | Norita et al. | Jun 2005 | B1 |
7002624 | Uchino et al. | Feb 2006 | B1 |
7199831 | Nonaka | Apr 2007 | B2 |
20020012053 | Yoshida | Jan 2002 | A1 |
20020190229 | Nakamura et al. | Dec 2002 | A1 |
20040201759 | Horiuchi | Oct 2004 | A1 |
20060033835 | Pollard et al. | Feb 2006 | A1 |
Number | Date | Country |
---|---|---|
02-280585 | Nov 1990 | JP |
Number | Date | Country | |
---|---|---|---|
20040145674 A1 | Jul 2004 | US |