Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
AU2005203381B2 - White balance adjustment - Google Patents
[go: Go Back, main page]

AU2005203381B2 - White balance adjustment - Google Patents

White balance adjustment Download PDF

Info

Publication number
AU2005203381B2
AU2005203381B2 AU2005203381A AU2005203381A AU2005203381B2 AU 2005203381 B2 AU2005203381 B2 AU 2005203381B2 AU 2005203381 A AU2005203381 A AU 2005203381A AU 2005203381 A AU2005203381 A AU 2005203381A AU 2005203381 B2 AU2005203381 B2 AU 2005203381B2
Authority
AU
Australia
Prior art keywords
flash
image
scene
nfi
captured
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Ceased
Application number
AU2005203381A
Other versions
AU2005203381A1 (en
Inventor
Woei Chan
Andrew James Dorrell
Stuart William Perry
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Canon Inc
Original Assignee
Canon Inc
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 AU2004904409A external-priority patent/AU2004904409A0/en
Application filed by Canon Inc filed Critical Canon Inc
Priority to AU2005203381A priority Critical patent/AU2005203381B2/en
Publication of AU2005203381A1 publication Critical patent/AU2005203381A1/en
Application granted granted Critical
Publication of AU2005203381B2 publication Critical patent/AU2005203381B2/en
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Landscapes

  • Color Television Image Signal Generators (AREA)
  • Processing Of Color Television Signals (AREA)

Description

S&F Ref: 726822
AUSTRALIA
PATENTS ACT 1990 COMPLETE SPECIFICATION FOR A STANDARD PATENT Name and Address of Applicant: Actual Inventor(s): Address for Service: Invention Title: Canon Kabushiki Kaisha, of 30-2, Shimomaruko 3-chome, Ohta-ku, Tokyo, 146, Japan Andrew James Dorrell Stuart William Perry Woei Chan Spruson Ferguson St Martins Tower Level 31 Market Street Sydney NSW 2000 (CCN 3710000177) White balance adjustment Associated Provisional Application Details: [33] Country:
AU
AU
AU
[31] Appl'n No(s): 2004904409 2004906020 2004906703 [32] Application Date: 05 Aug 2004 18 Oct 2004 23 Nov 2004 The following statement is a full description of this invention, including the best method of performing it known to me/us:- 5845c C WHITE BALANCE ADJUSTMENT 0 N Field of the Invention ;The present invention relates generally to the field of photography and, in particular, to a method and apparatus for generating a digital image of a scene. The present invention also relates to a computer program product including a computer readable medium having recorded thereon a computer program for generating a digital image of a scene.
(Ni Background When viewing a scene, the human eye automatically factors out the color of an illuminating light source so that colors of objects in the scene appear as the colors would appear under a white light source. This process is known as "chromatic adaptation" or "white balancing." For digital cameras, if white balancing is not performed well then captured images may appear to have a color bias or some colors in a captured image may not appear natural compared to other colors in the captured image. Color bias due to poor white balancing is one of the most common problems cited by photographers when assessing the quality of images captured using digital cameras.
Many conventional cameras provide an automatic white balance mode, referred to as "single image automatic white balancing", which automatically adjusts white balance using one of many conventional methods. One such conventional white balancing method is known as "gray-world". The gray-world method works well in many environments but often performs badly in low or unusual light conditions.
For photographic conditions in which conventional white balancing methods do not work, it is common for cameras to provide a set of special modes. These special modes are based on one or more models, such as incandescent light, fluorescent light, full sun, and shade, for example. However, even special modes sometimes give poor results if the ambient light in a scene does not fit the model well. For example, special modes often 726822 -2- O give poor results in photographic conditions such as light from low wattage incandescent lamps, dusk and dawn, indoor settings where the light is colored, or where there may be multiple illuminant types of light present.
OConventional cameras often include a sensor known as a White Balance (WB) Sensor mounted on the camera to detect the color of the light illuminating a scene to be 00 M captured. Such sensors aid a photographer or the camera if the camera is working in N an automatic mode), to select a special mode depending on the light illuminating the Sscene to be captured. However, such sensors only describe light striking the sensor and this may not correspond to the light illuminating the scene to be captured.
Some conventional methods for adjusting white balance require a user to capture an image of a white object such as a sheet of paper. These methods tend to be problematic as their result is dependent on being able to photograph a white surface under the same illuminant as a subject to be photographed.
The special modes described above are also prone to causing user error especially in a situation where a mode is selected by the user based on particular photographic conditions and then the user forgets to change the mode when moving to a different location where the conditions may be different. The use of a flash device may reduce white balance problems in many such situations. However, the use of a flash may also adversely affect the appearance of a captured image. This leaves a significant class of photographic conditions where color balancing remains problematic.
The use of fill flash in photography is well known. Fill flash is a light source providing supplementary illuminant to the normal flash illuminant provided by most conventional cameras. Fill flash is often used to shine a little supplementary light in certain regions of a scene being captured or to provide extra light for the entire scene.
726822 -3- The amount of flash illuminant used when capturing an image is difficult to control.
In particular, the contribution of the fill flash to a scene can not easily be adjusted at a post-capture stage to obtain an optimum illumination level for the scene to be captured.
In a situation with mixed lighting, it may be difficult to control and change the color of flash illuminant used during an image capture process in order to match the color of the 00oO Mc, ambient light of the scene being captured. Similarly, at the post-capture stage it may be difficult to isolate and change the color of the fill flash component of the flash illuminant Swhen adjusting color balance.
Some photographers have suggested a post capture flash tuning process as an application of recent advances in High Dynamic range image rendering. However, a problem with such an approach is that rendering is considered after application of the flash illuminant. As such, there is no control over the relative proportions of flash and ambient illuminant used to light the scene being captured.
The relative proportions of flash and ambient illuminant used to light the scene being captured is important when determining the optimum illumination level for the captured image of the scene. For example, Fig. 1 A shows an image 1110 of a scene captured without any flash illuminant. The image 1110 includes three subjects 1130, 1140 and 1150. In the image 1110, the foreground subject 1130 is in shadow and is therefore 'poorly exposed too little light from the foreground subject 1130 was captured) compared to the subject 1140 at mid distance and the subject 1150 at a longer distance in the image 1130. In contrast, Fig. 11B shows a second image 1120 of the same scene as Fig. 11 A, captured with a supplementary flash illuminant fill flash). One problem with the image 1120 of Fig. 11B is that the foreground subject 1130 may be relatively overexposed too much light from the subject 1130 is captured) relative to the mid-distant subject 1140 and the distant subject 1150. Another problem with the image 1120 of Fig. 11B captured with fill flash is that the foreground subject 1130 is 726822 -4- 00 illuminated by flash illuminant whereas the other subjects 1150 and 1140 are illuminated Nby a mix of ambient and flash illuminant. If the color of the flash illuminant is different tb3 to the color of the ambient illuminant then the white balance for at least some of the
(N
N subjects 1130, 1140 and 1150 may often appear incorrect.
None of the conventional methods of generating digital images allow post-capture 00 Mc, control over the flash illuminant and ambient illuminant in a captured image of a scene while addressing white balance problems.
Thus, a need clearly exists for an improved method of generating a digital image of a scene.
Summary It is an object of the present invention to substantially overcome, or at least ameliorate, one or more disadvantages of existing arrangements.
According to one aspect of the present invention there is provided a method of processing a captured image of a scene, said method comprising the steps of: determining photographic parameters of the scene; determining, if the parameters meet pre-defined criteria, flash-no-flash white balance information for the captured image based on both a no-flash image of the scene captured at ambient light and a flash-image of the scene captured using a flash illuminant; and estimating a reliability of the determined flash-no-flash white balance information; and determining, if the parameters do not meet the pre-defined criteria or the reliability is lower than a predefined threshold, white balance information applicable to the captured image using a default white balance method.
According to another aspect of the present invention there is provided an apparatus for processing a captured image of a scene, said apparatus comprising: means for determining photographic parameters of the scene; means for determining, if the parameters meet pre-defined criteria, flash-no-flash white balance 1328157_1 726822_amends_02 00 information for the captured image based both on a no-flash image of the scene captured at ambient light and a flash-image of the scene captured using a flash illuminant, means for estimating a reliability of the determined flash-no-flash white balance Ninformation; and means for determining, if the parameters do not meet the pre-defined criteria or the reliability is lower than a predefined threshold, white balance information applicable 00 Mc, to the captured image using a default white balance method.
SAccording to still another aspect of the present invention there is provided a Ccomputer program product including a computer readable medium having recorded C 10 thereon a computer program for directing a processor to execute a method for processing a captured image of a scene, said program comprising: code for determining photographic parameters of the scene; code for determining, if the parameters meet pre-defined criteria, flash-no-flash white balance information for the captured image based on both a no-flash image of the scene captured at ambient light and a flash-image of the scene captured using a flash illuminant, code for estimating a reliability of the determined flash-no-flash white balance information; and code for determining, if the parameters do not meet the pre-defined criteria or the reliability is lower than a predefined threshold,.
Other aspects of the invention are also disclosed.
Brief Description of the Drawings One or more embodiments of the present invention will now be described with reference to the drawings and appendices, in which: THE NEXT PAGE NUMBER IS PAGE 12 1328157_1 726822_amends_02 -12- Fig. 1 is a flow diagram showing a method of generating a digital image of a scene, according to a first embodiment of the invention; Z Fig. 2 is a flow diagram showing a method of removing ambient light components from an image captured using a flash illuminant, as executed during the method of Fig. 1; Fig. 3 is a flow diagram showing a method of determining local color transform 00 M€3 values, as executed during the method of Fig. 1; Fig. 4 is a flow diagram showing a method of adjusting the white balance of an (ti Simage captured at ambient light, as executed during the method of Fig. 1; Fig. 5 is a flow diagram showing a method of selectively aggregating local color transform values, as executed during the method of Fig. 4; Fig. 6 is a flow diagram showing a further method of selectively aggregating the local color transform values; Fig. 7 is a flow diagram showing a method of determining registration information, as executed during the method of Fig. 2; Fig. 8 is a schematic block diagram of a digital camera upon which arrangements described may be practiced; Fig. 9 is a flow diagram showing a method of capturing an image, as executed during the method of Fig. 1; Fig. 10 is a flow diagram showing a method of combining pixels from a corrected no-flash image and a corrected flash-only image, as executed during the method of Fig. 1; Fig. 11A is a diagram showing an image of a scene, captured without any flash illuminant; Fig. 11B shows a second image of the same scene as Fig. 1 lA, captured with a supplementary flash illuminant fill flash); Fig. 12 is a flow diagram showing a method of generating a digital image of a scene, according to another embodiment of the invention; Fig. 13 is an overview process 726822 -13flow diagram showing a method of generating a digital image, according to still another embodiment of the invention;; Figs. 14A 14C are flow diagram fragments showing a method of adjusting the white balance of a captured image according to the method of Fig. 13; Figs. 15A 15B are process flow diagram fragments showing a method of 00 Mc, determining the degree of flash illumination of the image captured using the flash illuminant; SFig. 16 is a flow diagram showing a method of determining the likelihood that backlight regions in the image captured without the flash will appear with an undesirable color bias after the conditional white balancing method described in Figs. 14A 14C is applied; and Figs. 17A !17B are process flow diagram fragments showing a method of determining the color of the illuminant in a backlight region.
Detailed Description including Best Mode Where reference is made in any one or more of the accompanying drawings to steps and/or features, which have the same reference numerals, those steps and/or features have for the purposes of this description the same function(s) or operation(s), unless the contrary intention appears.
It is to be noted that the discussions contained in the "Background" section and that above relating to prior art arrangements relate to discussions of documents or devices which form public knowledge through their respective publication and/or use. Such should not be interpreted as a representation by the present inventor(s) or patent applicant that such documents or devices in any way form part of the common general knowledge in the art.
Amethod 100 (see Fig. 1) of generating a digital image of a scene according to a first embodiment of the invention is described below with reference to Figs. 1 to 17B. The 726822 -14ttn method 100 is particularly advantageous in situations where a light source illuminating N, the scene is unknown. Another method 1200 (see Fig. 12) of generating a digital image of a scene is also described. The method 1200 allows post-capture control over flash illuminant and ambient illuminant used in generating the image. As will be described in detail below, the method 1200 may also be used to provide a synthetic fill flash effect.
00oO Mc, The method 100 is particularly advantageous in situations where an ambient light source Ni illuminating the scene differs in spectral character from that of a flash illuminant used to Scapture an image of the scene.
The methods described herein do not require complicated mechanisms or significant changes to the construction of a camera or other apparatus used to implement the methods. The described methods may also be used without requiring a user to make manual adjustments to settings of the camera or other apparatus used to implement the methods.
The described methods may be practiced using a camera 800, such as that shown in Fig. 8 wherein the processes of Figs. 1 to 7, 9 to 10 and 12 to 17B may be implemented as software, such as an application program executing within the camera 800. Alternatively, one or more of the steps of the described methods may be implemented using general purpose coinputing hardware a personal computer to process image data captured using the camera 800. Examples of computers on which the described arrangements may be practised include IBM-PC's and compatibles, Sun Sparcstations or alike computer systems evolved therefrom.
The steps of the described methods may be effected by instructions in software that are carried out by the camera 800 or general-purpose computer. The instructions may be formed as one or more code modules, each for performing one or more particular tasks.
The software may also be divided into two separate parts, in which a first part performs the described methods and a second part manages a user interface between the first part 726822 and the user. The software may be stored in a computer readable medium, including the Sstorage devices described below, for example. The software may be loaded into the camera 800 or general-purpose computer from the computer readable medium, and then executed by the camera 800. A computer readable medium having such software or computer program recorded on it is a computer program product. The use of the 00 Mc, computer program product in the camera 800 or general-purpose computer effects an I advantageous apparatus for implementing the described methods.
The digital camera 800 comprises input devices such as a view finder 804, image sensor 805, a user interface 808 and a white balance (WB) sensor 810, and output devices such as a display device 807 Liquid Crystal Display (LCD)) and a flash device 812.
The digital camera 800 typically includes at least one processor unit 806, and a memory unit 809, for example formed from semiconductor random access memory (RAM) and read only memory (ROM) 811. A hard disk drive or other non-volatile mass storage device 813 may also be provided. Typical examples of such a non-volatile mass storage device include compact flash (CF) memory and similar removable memory. The components 804 to 813 of the camera 800, typically communicate via an interconnected bus 814.
Typically, the application program implementing the described methods is resident in the ROM 811 and is read and controlled in its execution by the processor 806.
Intermediate storage of the program may be accomplished using the semiconductor .memory 809, possibly in concert with the hard disk drive 813. The application program may be loaded into the camera 800 and pre-stored in the ROM 811 by a manufacturer of the camera 800, for example. Alternatively, the application program may be loaded from computer readable media. For example, the application program may be supplied to the user encoded on a CD-ROM or floppy disk and loaded into the camera 800 via a serial link (not shown). The term "computer readable medium" as used herein refers to any 726822 -16storage or transmission medium that participates in providing instructions and/or data to N, the camera 800 for execution and/or processing. Examples of storage media include floppy disks, magnetic tape, CD-ROM, a hard disk drive, a ROM or integrated circuit, a magneto-optical disk, or a computer readable card such as a PCMCIA card and the like, whether or not such devices are internal or external of the camera 800.
00oO rn, The camera 800 also comprises a lens system 802 through which light from a scene to be photographed may be optically focused onto the image sensor 805. The image Ssensor 805 comprises a two-dimensional (2D) array of photosensitive elements (not shown), with each photosensitive element recording the intensity of light falling thereon.
The recorded light intensity may be used to provide image pixel data representing the photographed scene. The provision of this image pixel data by the image sensor 805 is typically referred to as 'the capture' of image pixel data and the data is typically referred to as 'the captured' image pixel data. The photosensitive elements of the image sensor 805 may be of Charged Coupled Device (CCD) or Complementary Metal Oxide Semiconductor (CMOS) technology. The image pixel data captured by the image sensor 805 is passed to the processor 806. The processor 806 processes the image pixel data and may store the image data in the memory unit 809 or on the ROM 811.
Light from the scene may also be measured by the white balance (WB) sensor 810.
The WB sensor 810 determines spectral characteristics of the light from the scene.
Typically, these spectral characteristics are determined as a color temperature value.
The viewfinder 804 of the camera 800 allows a user to compose an image of the photographic scene to be captured, with the image being visible through a lens 803. In one implementation, the viewfinder 804 and image sensor 805 may share the same light path. The display device 807 may be controlled by the processor 806 to display a downsampled version of the captured image pixel data.
726822 -17t¢n O The user interface 808 allows the user to control the camera 800, by selecting and setting various control parameters. The settings of the control parameters may be stored as one or more control parameter values in memory 809, for example. The display Odevice 807 may also function as an interface to communicate current control parameters to the user. Such control parameters may include image storage format, shutter speed, 00 M aperture size, ISO sensitivity, white balance and exposure compensation. The control Nparameters may also include a noise reduction method, a specific metering mode and selection of an electronic flash.
Camera control parameters such as image storage format, white balance and exposure compensation affect how captured image pixel data is processed at a postcapture stage. Thus, the processor 806 identifies these control parameters as post-capture control parameters.
Camera control parameters such as aperture size, shutter speed, use of a flash, ISO sensitivity and focus length, affect the capturing of image pixel data pre-capture. Thus the processor 806 identifies these control parameters as pre-capture control parameters.
The user interface 808 comprises an automatic/manual setting key, a photographing mode setting key, shutter release button, zoom key and cursor key, none of which are shown in Fig. 8. The automatic/manual setting key may be used to set the camera 800 to "automatic" or "manual" for different modes of operation. The shutter release button is a switch that may be capable of distinguishing between a half depression and full depression. At half depression of the shutter release button, the camera 800 may be triggered to perform several operations to prepare for the capturing of pixel image data.
Typically, when the automatic/manual setting key of the camera 800 is set to automatic, the processor 806 performs a metering operation to ensure that light from the scene to be photographed will be properly exposed, upon the shutter release button being depressed to half depression. In this instance, the processor 806 may also determine shutter speed and 726822 -18- C aperture size values, and corresponding camera control parameters may be set by the camera 800 automatically. The processor 806 may also invoke the WB sensor 810 to Z determine a color temperature value. If the processor 806 determines that there is not Cenough light being captured from the scene to be photographed, the processor 806 may choose to invoke a flash 812, as seen in Fig. 1. The camera 800 may also perform an 00 Mc, automatic focus process to focus the lens system 802 upon the shutter release button Sbeing depressed to half depression. At full depression of the shutter release button, the (Ni camera 800 is triggered to capture image pixel data representing the photographic scene according to the camera control parameters.
The photographing mode setting key is a switch for manually changing the photographing mode. For example, the photographic mode may be set to portrait mode, landscape mode, close-up mode, action mode, program mode, aperture priority mode, shutter priority mode and depth of field mode.
The zoom key is a switch for operating the zoom lens 802 in order to set photographing magnification.
The cursor key of the user interface 808 may be used to change the value of various camera control parameters. For example, the cursor key may be used to toggle between different control parameter values under an options menu displayed on the display device 807.
The method 100 of generating a digital image of a scene will now be described with reference to Fig. 1. The method 100 may be implemented as software resident in the ROM 811 of the camera 800 and being executed by the processor 806.
In accordance with the method 100, two images of a scene are captured successively. One of the images is captured using the flash 812 to illuminate the scene while the other image is captured without the flash 812, using only the ambient illuminant of the scene. The duration of the interval between the capture of the two images is made 726822 -19- 0 as short as possible to reduce the complexity of subsequent registration, as will be explained in detail below. Registration is performed to match each point in the image captured with the flash 812 to a corresponding point in the image captured using only the ambient illuminant of the scene. The two images are corrected for shutter speed, aperture, and equivalent film speed setting so that stored pixel values representing the scene 00 M measure light intensity using the same scale.
As will be described in detail below, using the registration information determined, the image captured without the flash 812 is subtracted from the image captured with the flash 812, to create a flash-only image. The flash-only image represents the appearance of the scene if the scene was only illuminated with the flash 812 and not any external, ambient lighting. The effect of the spectrum of light provided by the flash 812 on the images is determined from spectral samples transmitted by the flash 812 to the camera 800 or by previously stored information about the flash. This enables the flash-only image to be white balanced to produce a corrected flash only image, which shows the scene without any color bias. A mask may also be determined. The mask indicates regions in both the image captured without the flash 812 and the flash-only image, which are neither underexposed (noisy) nor overexposed (saturated). The regions identified by the mask in the image captured without the flash 812 may be compared to the corrected flash-only image. The results of this comparison may then be used to determine a white point for the no-flash image. This white point information may be used to remove any color bias in the no-flash image to produce a corrected no-flash image with substantially similar color appearance to the corrected flash-only image.
Further, pixels from the white balanced flash-only image may be recombined with pixels from the white balanced no-flash image to form a new synthetic flash image. As a result of the white balance method outlined above the new synthetic fill flash image has a 726822 consistent color appearance in areas illuminated primarily by flash and the ambient illuminant. This results in a more natural looking image.
Z By adjusting the amount of corrected flash-only image that is recombined with the corrected no-flash image the user may control the mix of ambient light and flash illuminant to produce a synthetic flash image without having to capture a further image of 00 Mc, the scene. The methods described herein allow the overall white balance of the scene to be automatically estimated and adjusted without loss of flash power. The method 100 Salso reduces the visible effect of specular highlights in the flash image.
The method 100 begins at step 110, where upon detecting the shutter release button being fully depressed, the processor 806 captures a first image of the scene using only the ambient illuminant of the scene without using the flash 812). Prior to step 110, in response to the detection of the shutter release button being half pressed, the processor 806 may perform various operations and set various camera control parameters. Such operations may include detecting conditions external to the camera 800 at the scene for exposure metering and auto focusing the lens 802 to make sure the photographic scene or a subject of the scene is in focus. Based on the detected external conditions, the processor 806 may determine a set of control parameter values for capturing a photograph of the scene. Upon detecting the shutter release button being fully depressed, the processor 806 captures pixel image data representing the first image of the scene based on the intensity of light falling on each of the photosensitive elements of the image sensor 805. The pixel image data representing the first image is preferably buffered in memory 809 during subsequent processing but may be stored on the hard disk drive 813.
The processor 806 may also capture a second image of the scene using the illuminant provided by the flash 812. The camera 800 may measure the intensity and color of the ambient light usingthe WB sensor 810. The camera 800 may determine that the intensity and color of the ambient light have values outside a range of predetermined 726822 -21 threshold values and, as a result, capture the pixel image data representing the second image. Alternatively, the pixel image data representing the second image may be captured as a result of user input using the user interface 808) The first image and the second image captured at step 110 may be referred to as an "image pair". A method 900 of capturing an image, as executed at step 110 will be 00 Mc, described in detail below with reference to Fig. 9.
The first unprocessed image captured using only the ambient illuminant of the scene without using the flash 812) will be referred to below as the no-flash image and be
(N
denoted by the symbol NF. The demosaiced form of the no-flash image, which comprises red, green and blue color components at each pixel location is referred to as the reconstructed no-flash image and denoted by the symbol NF'. The second unprocessed image captured using the illuminant provided by the flash 812 will be referred to below as the flash image F. A demosaiced form of the flash image, which comprises red, green and blue color components at each pixel location, is multiplied by an exposure dependent value so that the resulting demosaiced form of the flash image measures light consistently with the no-flash image NFL The resulting image demosaiced form of the flash image is also spatially transformed such the content of the resulting image is registered with the content of the no-flash image NF. This registered image is referred to as the reconstructed scaled and registered flash image and denoted by the symbol F'.
The time interval between the capture of the no-flash image NF1 and the flash image FI is preferably minimized less than 0.2 seconds). This reduces the difficulty in registering the flash image F1 and the no-flash image NF, as will be explained in detail below. The interval between successive capture of the flash image FI and the no-flash image NFI may be minimized by storing both of the captured images in memory 809 so that additional image processing de-mosaicing) may be deferred until after both the flash image F1 and no-flash image NFI are captured. In this instance, the memory 806 or 726822 -22a portion thereof may be configured as fast buffer memory. In one implementation, multiple readout circuits may be used to increase the speed of readout of the captured pixel image data from the sensor 805.
The method 100 continues at the next step 120, where the processor 806 removes the ambient light components from the captured flash image FI to generate a flash-only 00 Mc, image, FOI'. The flash-only image, FOI', is an image representing the scene as the scene would have been captured if the flash 812 was the only source of illumination. The flashonly image, FOI', comprises red green and blue data for each pixel location in a linear light color space of the camera 800. A method 200 of removing the ambient light components from the flash image FI to generate a flash-only image FOI', as executed at step 120, will be described in detail below with reference to Fig. 2.
The method 100 continues at the next step 125 where the processor 806 generates a binary processing mask, denoted MI. This processing mask MI contains non-zero values in pixel locations in which both the reconstructed no-flash image NFI' and the flash-only image FOI' are well exposed. The processing mask is used in a following step 140 to ensure that only pixels in locations for which a predetermined threshold level of exposure are used in white balancing. The determination of the processing mask is described in detail below.
At the next step 130, the white balance of the flash-only image FOI' is adjusted using predetermined color properties of the light provided by the flash 812, in the color space of the camera 800 to determine a corrected flash-only image FOI". The color properties for a camera that is sensitive to a number, N, of spectral bands may be represented by N color factors. The N color factors represent the response of N color filters of the camera 800, to the light provided by the flash 812.
726822 -23- O The adjustment of the white balance of the flash-only image FOI' may be performed by dividing the intensity of each pixel of the flash-only image FOI' in each ;Z color plane by a corresponding ratio. The ratio represents the ratio of a color factor Sdetermined for the flash 812 to a color factor of some predetermined standard illuminant.
For example, assuming that the camera 800 is sensitive to three spectral bands denoted as 00 C red green and blue and that "D50" is selected as the standard illuminant. In Sthis instance, the color component values for a single pixel at location y) of the Scorrected flash only FOI" may be determined as follows: FOI"(x, Y) FOI'(x, Y)r I r s0 I (1) FOI"(x,y)g FOI'(x,y)D 50 If (2) FOI"(x,y)b FOI'(x,y)Ib D 50 If (3) where FOI'(x,y)g and FOI'(x,y)b represent red, green and blue color component values, respectively, of a pixel at position y) in the flash-only image, FOI'. The symbols FOI"(x, FOI"(x,y)g and FOI"(x,y)b represent red, green, and blue color components, respectively, of a pixel at position y) in the corrected (or white balanced) flash-only image, FOI". The symbols If, If, and If are color factors representing the response of the camera 800 to the light provided by the flash 812 (normalized to a luminance of unity) in the red, green, and blue spectral bands, respectively. The symbols ID50, IgD, and ID50 are the color factors representing the response of the camera 800 to the standard "D50" illuminant (normalized to a luminance of unity) in the red, green, and blue spectral bands, respectively.
The flash color factors, If, I and If in the red, green, and blue spectral bands, respectively, for the camera 800 may be determined as follows: 726822 -24i =Zsir (4) cl i=I If< I=f i=1 If s',ir b (6) 00 i=l (Nq t 5 where the symbol s i represents L samples of the color spectrum of light provided by the
(N
flash 812; and the symbols rg,r, and r3 represent L samples of the red, green, and blue filter spectral responses, respectively. Values determined for the flash color factors, If, 1f, and If (in accordance with equations and of the camera 800 may be stored in memory 809.
Alternatively, the adjustment of the white balance of the FOI' image may be performed at step 130, in accordance with any other suitable method. For example, the Bradford, VonKries or Sharp chromatic adaptation methods, known to those in the relevant art, may be used to adjust the white balance of the FOI' image. Following the adjustment of the white balance at step 130, the colors of objects in the corrected flashonly image FOI" substantially represent pixel values that would have been measured had the scene been illuminated with a standard "D50" illuminant.
The method 100 continues at the next step 140, where the processor 806 analyses the reconstructed no-flasfi image NFI' and the flash-only image FOI' to determine pixel locations that are well-exposed in both the reconstructed no-flash image NFI' and the flash-only image FOI'. Based on this analysis, the processor 806 determines a plurality of local color transform values that may be used to chromatically adapt color component values at the determined pixel locations in the reconstructed no-flash image NFI' to 726822 match the corresponding color values in the corrected flash-only image FOI". A method 300 of determining local color transform values to chromatically adapt color values in the reconstructed no-flash image NFl' to corresponding color values in the corrected flash- Conly image FOI", as .executed at step 140, will be described in detail below with reference to Fig. 3.
00 SAt the next step 150, the white balance of the reconstructed no-flash image NFI' is I adjusted using the local color transform values determined at step 140 to generate a color corrected (or white balanced) no-flash image NFI". A method 400 of adjusting the white balance of the reconstructed no-flash image NFI', as executed at step 150, will be described in detail below with reference to Fig. 4.
The method 200 of removing the ambient light components from the flash image FI to generate a flash-only image FOI', as executed at step 120, will now be described in detail below with reference to Fig. 2. The method 200 may be implemented as software resident on the ROM 811 and being controlled in its execution by the processor 806.
The method 200 begins at step 201, where the processor 806 determines registration information between the no-flash image NF1 and flash image FL This registration information may be used to correct any changes in the position of scene points between the no-flash image NFI and the flash image Fl due to movement of objects in the scene or camera movement in the time interval between capturing the no-flash image NFI and the flash image FI. The registration information takes the form of a warp map. Each location in the warp map contains a translation between corresponding scene points in the no-flash image NFI and the flash image FL The warp map may be used to transform the flash image F to the no-flash image NFI. The warp map may be queried for a transform value to be applied at every location in the input flash image FI such that the transform value determined from the warp map, maps a particular location in the flash image F1 to a 726822 -26matching location in the no-flash image NFI. In certain photographic conditions, there may be no need to perform step 201. For example, the camera 800 may be used on a tripod and there may be very little subject motion subjects pose for shots or the subject is inanimate) during the time interval between the capture of the no-flash image NFI and the flash image F. In this instance, the processor 806 essentially determines an 00 Mc, identity transform. A method 700 of determining registration information, as executed at N step 201, will be described in detail below with reference to Fig. 7.
At the next step 202, a scale factor sf representing relative scaling of light measurements in the flash image F1 and no-flash image NFl is determined based on settings of the camera 800 for respective exposures. The scale factor, sf, may be applied to the flash image F1 in order for the flash image Fl to measure light on the same scale as the no-flash image NFL The scale factor sf may be determined from exposure values of the flash image FI and no-flash image NFI according to Equation below: sf 2 EI
E
V (7) where EVis the exposure value of the flash image FI and EVa is the exposure value of f the no-flash image NFI.
The aperture and shutter speed of the camera 800 may be recorded in accordance with the Additive Photographic Exposure System (APEX) standard and a film speed for the image sensor 805 may be determined in accordance with the ISO standard. In this instance, Equation may be rewritten as follows: Sf 2
A
+Tf a Ta )+10g 2
(G/
G
(8) 726822 -27where A and T are the aperture and shutter settings, respectively, for the flash f f image FI; and Aa and Ta are the aperture and shutter settings, respectively, for the noflash image NF. Gf and Ga denote flash image F1 and no-flash image NFI equivalent film speeds, respectively. The aperture, shutter speed or sensor equivalent film speed 0 5 may be expressed in units other than those mentioned above. In this instance, Equation may be modified accordingly.
SThe method 200 continues at the next step 205, where the processor 806 performs a demosaicing method on the no-flash image NFI to produce the reconstructed no-flash image NFI'. The demosaicing method is also performed on the flash image F. The warp transform value determined at step 201 and the intensity scaling factor sfdetermined at step 202 are also applied to the flash image Fl to produce a reconstructed scaled and registered flash image, denoted by the symbol FI'. Prior to step 205 each pixel of the noflash image NFl and the flash image F1 contains a sample of only one of the N possible spectral bands that the camera 800 may be sensitive to. The demosaicing method performed at step 205 estimates spectral bands missing at each pixel so that all N spectral bands are represented at each pixel. Any suitable demosaicing method known to those in the relevant art may be used at step 205. In one implementation, alternative sensor technologies that directly yield multiple color samples per pixel site, as known to those in the relevant art, may be used rather than demosaicing.
At the next step 207, the reconstructed no-flash image NFI', is then subtracted from the reconstructed scaled and registered flash image FI' to produce the flash-only image FOI'. The flash-only image FOI' is essentially the reconstructed flash image FI' with the contribution of any unknown ambient illuminant removed. Hence, the flash-only image FOI' approximates how the scene would appear when illuminated solely by light provided by the flash 812.
726822 -28- The processing-mask image MI may be determined according to any one of the c following Equations (10) and (11): <0 MI if(min(FOI'(x, sTN)OR (min(NFI'(x, <TN) MI, y) (9) 1 otherwise M0 if(max(FOI'(x, s 1 T) OR (max(NFI'(x, 2 T,) 00 1 otherwise c 5 MI(x, y) MI, y) AND MI, y) (11) 0 where MI n and MI s represent temporary variables denoting whether a pixel pair satisfy a condition on a lowest allowed exposure level and a highest allowed exposure level, respectively.
Equation states that for each pixel in the mask image MI, the value of the pixel is set to false (zero) if a corresponding pixel in the flash-only image FOI' is less than a noise threshold s ,T or a corresponding pixel in the reconstructed no-flash image NFI' is less than a noise threshold TN. The inclusion of the scaling factor sf in Equation (9) takes into account the fact that following the scaling operation at step 205, the noise characteristics between the flash-only image FOI' and the reconstructed no-flash image NFI', will in general be different.
The noise threshold may be determined as follows: TN=0.15M (12) where M represents the maximum pixel intensity of pixel image data output by the image sensor 805 of the camera 800. For example, if the camera 800 outputs data between 0 and 65535, then M=65535 and TN= 9 8 3 0.
2 5 However, any suitable value of TN may be 726822 -29o selected to indicate noisy pixels and the value of TN will in general depend on the camera 800 implementing the described methods.
Equation (10) states that for each pixel in the mask image MI the value of the pixel is set to 0 if a corresponding pixel in the flash-only image FOI' is greater than a saturation threshold sfT s or the corresponding pixel in the reconstructed no-flash image 00 NFI' is greater than the saturation threshold TS. The inclusion of the scaling factor sf in Equation (10) takes into account the fact that following the scaling operation at step 205, the level at which pixels become saturated in the flash-only image FOI' and the reconstructed no-flash NFI' image will in general be different. The saturation threshold may be determined as follows: T=0.9M (13) where M represents the maximum pixel intensity of pixel image data output by the image sensor 805 of the camera 800. For example, if the camera 800 outputs data between 0 and 65535, then M=65535 and TS=58981.5. However, any suitable value of T may be selected to indicate saturated pixels and the optimum value of TS will in general depend on the camera 800 implementing the described methods. Following step 125 of the method 100, the mask image MI will contain zeros for any pixel that has been determined to be saturated or noisy and all other pixels in the MI will be marked by The function mino described above returns a smallest component value from each of the red, green and blue component values of a pixel. Similarly the function max() described above returns a largest component value from each of the red, green and blue component values of a pixel. Alternative methods for determining the processing mask MI may be used. For example, the min() and max() functions of Equations and may be replaced by other pixel measures such as luminance or norm.
726822 O The method 300 of determining local color transform values to chromatically adapt color values in the reconstructed no-flash image NFI'to corresponding color values in the corrected flash-only image FOI", will now be described in detail with reference to 0 Fig. 3. The method 300 may be implemented as software resident in the ROM 811 and being controlled in its execution by the processor 806. In the method 300, pixel locations 00 rC that are well-exposed in both the reconstructed no-flash image NFI' and the flash-only Cc€ CN image FOI', as indicated by the processing mask image MI, are processed and estimates Sof local color transform values are generated at these points.
The steps of the method 300 are applied to pairs of pixels from corresponding locations in the reconstructed no-flash image NFI' and the corrected flash-only image FOI". The method 300 begins at step 301 where a pixel location y) is initialized by the processor 806 to an image origin At the next step 303 the processor 806 retrieves pixel values from NFI'(x, FOI'(x, y) and MI(x, Then at the next step 305, if the processor 806 determines that the value of MI(x, y) is a non-zero value, indicating that the pixel at the current pixel location is acceptably exposed in both the reconstructed no-flash image NFI' and the flash-only image FOI' then the method 300 proceeds to step 307. Otherwise, the method 300 proceeds to step 313. A local estimate of the color transform values are subsequently determined in the following steps 307, 309, and 311. At step 307, the following color ratios C(x, y) are determined: NFI'(x, y)r Cr (14) FOI"(x, y), NFI'(x, y) C, FI(x, FOI"(x, y) Cb NFI'(x, (16) FOI"(x, y)b 726822 -31- 0 where the subscripts r, g, and b represent the red, green and blue color components of the pixel respectively.
tbO The reconstructed no-flash image NFI' and the corrected flash-only image FOI" Srepresent the same scene illuminated by different light sources. These light sources may differ in color, intensity, distance and angle relative to the captured scene. Hence the c pixels in the reconstructed no-flash image NFI' and the corrected flash-only image FOI" C corresponding to the same scene point may be expected to vary from each other in terms 0of color and luminance. The differences in luminance must be compensated for in the next step 309 where a luminance correction factor is determined by the processor 806.
The luminance correction factor may be determined as follows: k(x,y) 0.3FOI"(x, 0.59FOI"(x, y)g 0.11FOI"(x, (17) 0.3NFI'(x, 0.59NFI'(x, y)g 0.11NFI'(x, y)b where k(x, y) represents the luminance correction factor for pixel The coefficients of 0.3, 0.59 and 0.11 in Equation (17) are selected for determining the luminance of a pixel based on the red, green, and blue color components of the pixel assuming sRGB chromaticities. Alternatively, for any given camera sensitive to N spectral bands, a suitable set of N coefficients may be determined based on the spectral sensitivities of the particular camera.
An alternative luminance correction factor may be determined by choosing k(x, y) to normalize the effective luminance of the color ratios determined at step 307, as follows: 1 k(x,y) (18) 0.3C, y) 0.5 9 C(x, y) 0.11Cb(x, y) 726822 -32- At the next step 311, the processor 806 determines a point estimate of the color transform values for the external illuminant as follows: I(x, I, 5 k(x, y) (19) I(x, y)g I 5 ok(x, y) I(x, y) Ibsk(x, y)Cb(x,y) (21) Swhere I(x, I(x, y) and I(x, y)b represent the point estimates of the red, green, and blue components of the local color transform value for the white point of the reconstructed no-flash image NFI' for pixel respectively. The symbols If 50 and I 5 O represent the red, green, and blue components of the local color transform value for white point of the corrected flash-only image FOI", respectively.
If the processor 806 determines that the value of MI(x, y) is a zero value, at step 305, indicating that the current pixel location is unacceptably exposed in either the reconstructed no-flash image NFI' or the flash-only image FOI' then the method 300 proceeds to step 313. At step 313, the processor 806 increments the value of the current pixel location y) in a raster scan order. Then at the next step 315, if the processor 806 determines that each pixel of the processing mask image MI has been processed then the method 300 concludes. Otherwise, the method 300 returns to step 303.
The method 400 of adjusting the white balance of the reconstructed no-flash image NFI', as executed at step 150, to produce a corrected (or white balanced) no-flash image NFI", will now be described in detail below with reference to Fig. 4. The method 400 may be implemented as software resident in the ROM 811 and being controlled in its execution by the processor 806. The method 400 utilises the local color transform values determined at step 140 to adjust the white balance of the reconstructed no-flash image 726822 -33tn 0 NFI'. In the method 400 an overall estimate of the white point of the reconstructed noflash image NFI' is determined by averaging the local color transform values in each spectral band at each point where MI(x, y) is equal to 1.0. However, such a procedure can 0 be affected by noise. In particular there may exist regions in the reconstructed no-flash image NF' or the corrected flash-only image FOI" where the estimates of the local 00 Cc color transform values of the scene white point are noisy and unreliable. For this reason, N step 401 of the method 400 selectively aggregates the local color transform values. A Smethod 500 of selectively aggregating the local color transform values, as executed at step 401, will be described in detail below with reference to Fig. 5. An alternative method 600 of selectively aggregating the local color transform values, will also be described in detail below with reference to Fig. 6.
At the next step 403 of the method 400, the selected local color transform values are averaged by the processor 806. At the next step 405, the averaged local color transform values, are applied globally to the reconstructed no-flash image NFI' to produce the corrected no-flash image NFI". The color values for a single pixel y) of the corrected no-flash image NFI" are determined at step 405 using the "RGB scaling" method of chromatic adaptation as follows: NFI"(x, NFI'(x, I s o5 (22) NFI"(x, y)g NFI'(x, y)g ID,50 I (23) NFI"(x, y)b NFI'(x, y)b Ib 5 0 (24) where NFI'(x, NFI'(x, y)g and NFI'(x, represent the red, green, and blue color component values of the pixel at position y) to be modified in NFI', respectively. The symbols NFI"(x,y)g and NFI"(x,y)b represent the red, 726822 -34green, and blue color component values, respectively, of the pixel at position y) in the corrected (or white balanced) no-flash image NFI". The symbols Ir, Ig', and Ib, represent the color response of the camera 800 to the external illuminant, as determined in step 403. The symbols 1D5o, ID5, and ID5O represent the color response of the camera 5 800 to the standard "D50" illuminant (normalized to a luminance of unity) in the red, 00 Mc, green, and blue spectral bands, respectively.
t The method 500 of selectively aggregating the local color transform values, as Sexecuted at step 401, will be described in detail below with reference to Fig. 5. The method 500 may be implemented as software resident in the ROM 811 and being controlled in its execution by the processor 806. In the method 500, an image W, containing local color transform value estimates, and the processing mask MI are divided into non-overlapping blocks of 32x32 pixel values.
The method 500 begins at step 501, where the processor 806 determines the range of the local color transform values for each pixel of a current block of the color transform image W, separately. Step 501 is performed for pixels in the color transform image W having a corresponding nonzero entry in the processing mask image MI. At the next step 503, if the processor 806 determines that the range of local color transform values within the current block of the color transform image W exceed a predetermined threshold, then the method 500 proceeds to step 507. Otherwise, the method proceeds to step 505. The predetermined threshold of step 503 may be set to 0.7P, where P is the maximum value permitted by the operating precision of the camera 800 65535 in the case of 16 bit arithmetic or 1.0 if floating point arithmetic can be used). Different threshold values may be required for different types of cameras, and different threshold values may be required for each color component.
726822 tn' At step 505, the local color transform values within the current block that N correspond to a non zero entry in the processing mask MI are stored in memory 811, for example, for use in the determination of the average of the local color transform values as at step 403.
At the next step 507, the processor 806 moves to the next block of the color 00oO Mc, transform image Wand the corresponding block of the processing mask image MI. At the N, next step 509, if the processor 806 determines that the current block in the color transform image Wis the last, then the method 500 concludes. Otherwise, the method 500 returns to step 501.
The method 600 of selectively aggregating the local color transform values will now be described in detail below with reference to Fig. 6. The method 600 may be implemented as software resident on the ROM 811 and being controlled in its execution by the processor 806. In the method 600 the color transform image W, containing local color transform value estimates, and the processing mask MI are also divided into nonoverlapping blocks. However, in the method 600 the initial block size used is the entire image.
The method 600 begins at step 601, where the processor 806 determines the range of the local color transform values for each component of a current block of the color transform image W. Again, step 601 is performed for samples in the color transform image W having a corresponding nonzero entry in the processing mask image MI. At the next step 603, if the processor 806 determines that the range of each color component value within the current block of the color transform image W does not exceed a predetermined threshold, then the method 600 proceeds to step 611. Otherwise, the method 600 proceeds to step 605. Again, the predetermined threshold of step 603 may be set to 0.7P, where P is the maximum value permitted by the operating precision of the camera 800 65535 in the case of 16 bit arithmetic or 1.0 if floating point arithmetic 726822 -36ttn can be used). At step 611, the estimate of the local color transform values within the current block that correspond to a non-zero entry in the processing mask MI are input to the global average calculation of step 403.
At step 605, if the processor 806 determines that a predetermined minimum block size has been reached then the method 600 proceeds to step 613. Otherwise, the method 00 Cc 600 proceeds to step 607. In one implementation, the processor 806 determines whether the largest of the block dimensions is greater than or equal to sixty-four (64) samples at step 605.
At step 607, the current block is split into four sub-blocks. Then at the next step 609, the method 600 recursively calls the method 600 to process each of the new subblocks determined at step 607.
At step 613, the processor 806 moves to the next block of the color transform image W and the corresponding block of the processing mask image MI. Then at step 615, if the processor 806 determines that the current block in the color transform image W is the last, then the method 600 concludes. Otherwise, the method 600 returns to step 601.
A method 1200 of generating a digital image of a scene, according to another embodiment of the invention, will now be described with reference to Fig. 12. Again, the method 1200 may be implemented as software resident in the ROM 811 of the camera 800 and being executed by the processor 806.As seen in Fig. 12, steps 110 to 150 of the method 1200 are the same as those described above for the method 100. However, the method 1200 continues at the next step 1260, where the corrected flash-only image FOPI" and the corrected no-flash image NFI" are combined to generate a synthetic flash image SFI. The combination of the corrected flash-only image FOI" and the corrected no-flash image NFI" may be performed under user control. In this instance, the user controls at least the apparent strength of the flash in the synthetic flash image along a linear scale. A second linear control may also be provided that permits an adjustment of the overall color 726822 -37- 0 temperature for the synthetic flash image, SFI. The apparent strength of the flash components and the overall color temperature settings may be automatically determined.
A method 1000 of combining the corrected flash-only image FOI" and the corrected no- Sflash image NFI" as executed at step 1260 will be described in detail below with reference to Fig. 10.The method 1000 may implemented as software resident in the ROM 00 rC 811 and being controlled in its execution by the processor 806.
The method 1000 begins at step 1010, where the processor 806 determines scaling Ni3 factors SFOI" and SNFI" for each of the corrected flash-only image FOI" and the corrected no-flash image NFI" respectively. The scaling factors SFOI" and SNFI" may be determined using Equations (25) and respectively, as follows: S o. ForS S 1 m. (26) SNFI =95 INFlP where s, is determined using Equation I9. represents a maximum intensity for the lower 95% of pixel intensities in the corrected flash-only image FOI", INF,.
represents a maximum intensity for the lower 95% of pixel intensities in the corrected noflash image NFI", and I.x represents a predetermined maximum intensity for the synthetic flash image, SFI. The scaling factors SFOI" and SNFI" are used for setting the range of captured pixel intensities represented in the synthetic flash image SFI. At the next step 1020 of the method 1000, the processor 806 initialises loop variables in preparation for a raster order scan over the corrected flash-only image FOI" and the corrected no-flash image NFI" and a top left pixel from both the flash only image FOI" and the no-flash image NFI" is retrieved from memory 809.
726822 -38- O The method 1000 continues at the next step 1030, where the processor 806 analyses the pixels at the current pixel location to determine whether blending is to be performed at the current pixel location The processor 806 analyses the pixels at Sstep 1030 in accordance with Equation (27) as follows: true if IFO. y)Sro 1 IFI Y)SNFI' 00 5 T(x, y 140 (27) ST(xY false otherwise C, where IFOI.(x,y) represents perceptual luminance of the pixel at location of Sthe corrected flash-only image FOI", INFI.(x,y) represents perceptual luminance of the pixel at location of the corrected no-flash image NFI", and SFO,. and SNF,. are the scaling factors defined above by Equations (25-26). If the processor 806 determines that blending is to be performed at the current pixel location Equation (27) returns true), at step 1030, then a blend amount A(x,y) is determined for the current pixel location at the next step 1040. The blend amount A(x,y) is determined at step 1040 according to the following Equation (28): A(x, y) y)SFr,. a y)SNF.) (28) where ag represents a predetermined global flash strength setting in the range and a, represents a global mix parameter in the range of The values of ag and a, indicate the degree to which the relative luminances of the flash and no-flash images effects the blending. The global mix a, may be set to a preset value of 0.5. However, the global mix a, may be user adjustable. The perceptual pixel luminances IFro 0 (x,y) and IuFI.(x,y) are determined as the luminance in the CIE L*a*b* color space. The perceptual pixel luminances IFOI.(x,y) and INFr.(x,y) may be determined as a gamma corrected weighted average of the linear color samples in the corrected flash-only image FOI" and the corrected no-flash image NFI" respectively. Other approximations to the 726822 -39- 0 perceptual pixel luminances FOI(x, y) and INFI(x,y) may be used, including a gamma corrected intensity of the green component.
The method 1000 continues at the next step 1050, where the value of an output Spixel O(x, y) in the synthetic flash image SFI is determined according to Equation (29) as follows: 00 C O(x, y) A(x, y)FOI"(x, y)SFOI. A(x, y))NFI"(x, y)SNF, (29) If the processor 806 determines at step 1030 that blending is not to be performed at 0 the current pixel location Equation (27) returns false), then the method 1000 proceeds to the next step 1045. At step 1045, the output pixel O(x, y) of the synthetic flash image SFI is determined according to Equation (30) as follows: O(x,y) NFI"(x,y)SNF,. At the next step 1055 of the method 1000, the color of the output pixel y) of the synthetic flash image SFI, as determined at either of steps 1050 or 1045, may be biased. Red, green and blue color component values, O' O' respectively, of the output pixel O(x, y) of the synthetic flash image SFI may be biased at step 1055, according to Equations (31-33) as follows:
O
r y)I r User O (31) IrDS Og, y)I
U
ser Og y) oso (32)
I
Ob (x y)User Ob y (33) Ib where IUser ,ser and IU ser represent the response of the camera 800 to the user specified illuminant and D 50 ID50, and Ib/50 represent the response of the camera 800 to the standard illuminant 726822 The output pixel O(x of the synthetic flash image SFI may be biased at step 1055 Susing a slider control with which a range of illuminant responses IUser may be selected to allow both a warmer greater emphasis in red) and cooler greater emphasis in blue). Such a slider control may be implemented in software and be displayed on the display 807, for example. The slider control may be adjusted using the user interface 808.
00 Mc, For example, a one dimensional (1D) slider control may be provided for the selection of I the illuminant response I u ser with the central position of the slider control corresponding to the default D50 illuminant, a fully left position corresponding to a predetermined "warm" illuminant IWar and a fully right position corresponding to a predetermined "cool" illuminant I c When the slider control is in the central position, Equations (31- 33) above become an identity transform. When the slider control is in a position other than the central position the central position, the illuminant response I u ser is determined using linear interpolation between the predetermined "warm" illuminant/Wa" and the default D50 illuminant I
DS
0 or between the default D50 illuminant I5o and the predetermined cool illuminantIc"' based on the slider control position. Other chromatic adaptation transforms may also be used at step 1055. For example, the Bradford, VonKries or Sharp methods are widely known in the art.
At the next step 1060, the pixel position for each of the corrected flash-only image FOP'" and the corrected no-flash image NF" images is incremented to a next pixel location in a raster scan order. Then at step 1070, if the processor 806 determines that all pixels in the corrected flash-only image FO" and the corrected no-flash image NFI" have been processed, the method 1000 concludes. Otherwise, the method 1000 returns to step 1030.
Although the method 1000 utilises a user specified global flash strength setting ag, such a value may be determined automatically. For example a number of image quality 726822 -41- O measures based on histograms are well known in the image processing art. Such image quality measures may be used to evaluate the result of blending with a range of global flash strength setting a, values with the image quality measures producing the best result being selected. Alternatively, a predetermined fixed value for the global flash strength setting ag may be used.
00 C In one implementation, step 1200 of the method 1200 may be implemented as an 0 estimation problem. In such an implementation, estimates of noise variance aOF, and c of each of the pixels of the corrected flash-only image FOI" and the corrected noflash image NFI" respectively are determined. The method for estimating the noise variances a or and is particular to a specific image sensor. However, the noise variance aFO,. and crF. may be estimated as a function of ISO sensitivity and exposure time for an image being captured together with captured light intensity. Based on Gaussian assumptions a Maximum Likelihood (ML) estimate of the output pixel O(x, y) at location in the synthetic flash image may be determined in accordance with Equation (34) as follows: O(x, y) (or,'NFI"(x, y)SNF a FOI"(x, y)Sr) (34) 0 FOI UNFI' Similar to the method 1000, described above, an overall color bias may be introduced to the output pixel O(x,y) determined in accordance with Equations (30-32) based on a user specified color appearance.
In another implementation, step 1260 of the method 1200 may be implemented as an addition of flash information from the corrected flash-only image FOI" into the corrected no-flash image NFI". In this case the output pixel value O(x,y) at location 726822 -42in the synthetic flash image may be determined in accordance with Equation as follows: O y NFI"(x, y)SNFI. a gFOI"(x, y)SFo( O(x,y) 1+ ag Similar to the method 1000, described above, an overall color bias may be oO 00 M 5 introduced to the output pixel O(x, y) determined in accordance with Equation (30) based on a user specified color appearance.
SThe method 700 of determining registration information between the no-flash image NF1 and flash image FI, as executed at step 201, will now be described in detail below with reference to Fig. 7. In the method 700, the global rotation and scaling of the no-flash image NFI is measured and compensated for. The method 700 may be implemented as software resident in the ROM 811 and being controlled in its execution by the processor 806.
The method 700 begins at step 701, where the no-flash image NFI and the flash image Fl, as read from the image sensor 805, are down sampled. The no-flash image NFI and the flash image FI are down sampled by extracting one green sample from each block of four pixel locations, corresponding to the two-dimensional (2D) array of photosensitive elements of the sensor 805, and then down sampling the green samples. In step 701, a weighted linear sum of pixel values in the neighborhood of a particular pixel is used to generate a single down sampled pixel. Such down sampling methods are known to those in the relevant art.
At the next step 702, the down sampled no-flash image and flash image are Fourier- Mellin transformed to generate transform coefficients. At the next step 703, the generated transform coefficients are cross-correlated to generate a two dimensional (2D) array indexed by rotation and scale. Note that in this context the word scale is used in the sense of size or resolution as opposed to numerical multiplication. For clarity, scale will 726822 -43subsequently be referred to as "size". The values of the array typically exhibit a dominant peak at a particular location, the indices of which indicate the rotation and size at which the flash image FI matches the no-flash image NFI most closely. The position of this peak and corresponding rotation and size parameters are determined at the next step 705. Then at the next step 707 the rotation and size parameters determined at step 705 are applied to 00 Mc, the down sampled flash image generated at step 701 to generate rotation and size aligned Sflash and no-flash image images.
SThe method 700 continues at the next step 709 where the rotation and size aligned flash image and no-flash images are cross correlated using a Fourier correlation. A main correlation peak resulting from step 709 indicates the two dimensional (2D) translation at which the flash image FI and no-flash image NFI input at step 701 are best matched. At the next step 711, the correlation peak and a corresponding translation amount are determined by the processor 806.
Then at the next step 713, the processor 806 analyses the aligned flash image and no-flash images to find "interesting" points. A Harris comer detector may be used to find interesting points. However, many comer (or "feature") detectors are known in the image processing art, any of which may be used in step 713. For each point identified in step 713, a sub-image of a fixed width and height (e.g.,.256 pixels x 256 pixels), centered at that point, is generated at full resolution from the original no-flash image NF1 and flash image FL. When generating the sub-image from the flash image FI the previously determined global rotation, size and translation parameters are applied such that the two sub-images are coarsely aligned. The processor 806 performs a Fourier phase-correlation on the sub-images to determine how the sub-images are related to one another by translation. The position of a peak in the phase correlation of the sub-images corresponds to a translation required to map the two sub-images to each other. If there is no distinct 726822 44 peak in the phase correlation the point at which the sub-images are centered is ignored.
Accordingly, a plurality of points and transformation vectors may be generated at the identified points.
OThe method 700 concludes at the next step 715, where the plurality of points and transformation vectors generated in step 713 are converted into a Delaunay triangulation 00 M where each triangle vertex corresponds to an interesting point with a transform at that point. Using such triangulation an arbitrary point may be selected, the triangle that contains the point may be determined, and from the corners of the triangle three nearby interesting points whose transforms in the alignment are known may be identified. These transforms may be interpolated to generate a transform for the selected arbitrary point.
Hence the sparse transform information generated for the interesting points may be converted into a fine alignment warp for all points in the image.
If the camera 800 is mounted on a tripod and a subject being photographed is stationary then step 201 of the method 200 may be omitted. In other photographic situations, a global registration of the image pair a first image of the scene using only the ambient illuminant of the scene and a second image of the scene using the illuminant provided by the flash 812) may be performed.
The method 900 of capturing an image, as executed at step 110, will now be described in detail below with reference to Fig. 9. The method 900 may be implemented as software resident on the ROM 811 and being controlled in its execution by the processor 806.
The method 900 begins at step 920, where in response to the detection of a half press of the shutter release button of the user interface 808, the processor 806 focuses and meters the scene to be captured and determines various photographic settings shutter speed and aperture, use of flash etc). For example, the user may hold the camera 800 in position such that the camera 800 points towards a subject in the desired scene. The user 726822 may then compose the image of the scene using the ViewFinder 804 and half press the shutter release button using the user interface 808. For the camera 800 the viability of capturing the image of the scene with and without flash 812 a no-flash image NFI and a FI, respectively) is also determined at step 920. If an adequate exposure of an s image of the scene can be achieved without the use of the flash 812 and using a shutter Mc, speed which is suitable for the photographic conditions then a flag configured within Smemory 809 and denoted "capture-using-no-flash" is set to true and exposure settings of ISO, shutter speed and aperture are determined for the scene. Further, if the distance of the subject of the scene from the camera 800 and the ambient light of the scene is such that the flash 812 could be beneficial for image capture then a flag "capture-using-flash" is set to true and exposure settings ISO, shutter speed and aperture) are determined for the image to be captured of the scene. The method 900 continues at the next step 930, where if the processor 806 determines that the "capture-using-no-flash" and the "captureusing-flash" flags are both set to true, indicating that both the flash image F and no-flash image NFI may be captured, then the method 900 proceeds to step 940. Otherwise, the method 900 proceeds directly to step 950. At step 940, the processor 806 adjusts the settings determined at step 920 for capturing the flash image Fl and the no-flash image NFI the image pair). A program point for the image pair to be captured is adjusted, at step 940, so that the apertures used for capturing each of the images in the image pair vary by the smallest amount practical. This smallest amount is not a pre-determined fixed amount. Rather, the difference between the smallest amount the apertures used for capturing each of the images in the image pair is the smallest amount possible while still achieving usable settings -for the aperture, shutter speed and ISO sensitivity parameters.
In one implementation, in order to keep the differences between the apertures used for capturing each of the flash image FI and the no-flash image NF1 to a smallest amount practical, the aperture to be used for capturing the flash image is reduced, the ISO setting 726822 -46to be used for capturing the no-flash image NFI is increased and the shutter speed to be used for capturing the flash image FI is also increased. In such an implementation, the Z remaining photographic settings determined at step 920 other than the ISO setting and shutter speed, respectively) are adjusted to maintain a predetermined desired exposure level. The amount by which the exposure settings can be adjusted at step 940 00oO M€3 will typically be a function of the optics and the characteristics of the sensor 805 for the ¢€3 camera 800.
The method 900 continues at the next step 950, where if the processor 806 determines that the value of the "capture-using-no-flash" flag is set to true the method 900 proceeds to step 960. Otherwise, the method 900 proceeds directly to step 970. At step 960 an image of the scene is captured at ambient light the no-flash image NFI) using the settings determined at step 920 and/or at step 940 for capturing the no-flash image NFI. The image pixel data captured by the sensor 805 at step 960 is read from the sensor 805 and stored in memory 809. At step 970, if the processor 806 determines that the value of the "capture-using-flash" flag is set to true, then the method 900 proceeds to step 980. Otherwise, the method 900 proceeds directly to step 990. At step 980, an image of the scene is captured using the settings determined at step 920 and/or at step 940 for capturing an image of the scene using the flash 812 for capturing the flash image Fl). The pixel image data captured at step 980 by the sensor 805 is read from the sensor 805 and is stored in memory 809.
At the next step 990, the processor 806 of the camera 800 indicates to the user that the image capture phase has been completed. This indication may be implemented by the processor 806 generating a shutter release sound or lighting an indicator visible to the user. The processor 806 then proceeds to process the pixel image data stored in memory 806 at steps 960 and 980. If only one image has been captured at step 960 or 980 then processing may comprise the steps of demosaicing, white balancing, sharpening and 726822 -47compression of the known art prior to the processed images being written out to the mass storage 813 of the camera 800. When images are captured at both steps 960 and 980 then processing may include steps 120 to 150 of the method 100 or steps 120 to 1260 of the method 1200 prior to the processed image being written out to the mass storage 813 of the camera 800. In a variation of this step, the flash image FI and no-flash image NFI may be 00oO Mc, independently processed and written out to the mass storage 813 of the camera 800 in addition to the generated synthetic fill flash image SFI. In one implementation, when both Sthe "capture-using-no-flash" and "capture-using-flash" flags are true at step 930, then the pixel image data representing the image pair may be written out to the mass storage 813 of the camera 800 for subsequent processing using general purpose computing hardware a personal computer for example.
A method 1300 of generating a digital image, according to a still another embodiment of the present invention, will now be described with reference to Figs. 13 to 17B. The method 1300 establishes, using one or more criteria, which one of the flashno-flash white balancing method, and the single image automatic white balancing method, can be expected to produce a better result; and applies, based upon this determination, the appropriate white balancing method. The method 1300 may be referred as a "conditional white balancing method" of generating a digital image.
The method 1300 may be implemented as software resident in the ROM 811 of the camera 800 and being executed by the processor 806. The method 1300 begins at step 1302 where the processor 806 captures an image using only the available ambient light.
The image captured at step 1302 is referred to as a no-flash image NFI, as above. At the next step 1303 if the processor 806 determines that the prevailing photographic conditions are not suitable for use of the flash-no-flash white balance method, then the method 1300 proceeds to a step 1308. Otherwise, the method 1300 proceeds to step 1304. At step 1308, the processor 806 applies either a conventional white balance method such as the 726822 -48- 0 single image automatic white balancing method, or alternatively, no white balancing Na processing at all. The method 1300 then concludes.
At step 1304, the processor 806 captures another image of the scene in question, Sthis time using the flash illuminant 812 of the camera 800. This image is referred to as the flash image F, as above.
00 Mc, Then at the next step 1306, the processor 806 registers the images NFI and FI, and demosaics the images, correcting NFI and the FI for shutter speed, aperture, and equivalent film speed setting so that stored pixel values representing the scene measure light intensity using the same scale. This forms a reconstructed no-flash image NFI' and a registered flash image FI'.
At the next step 1307, the processor 806 determines a flash-only image FOI' by subtracting pixels in the reconstructed no-flash image NFI' from corresponding registered pixels in the registered flash image Fl'. The step 1306 and 1307 are described in more detail above with reference to Figs. 2 and 7.
Thereafter, at step 1309, the processor 806 determines a processing mask image MI, which identifies regions of both the reconstructed no-flash image NFI' and the flashonly image FOI' that are neither over-exposed, nor under-exposed, i.e. those regions that are referred to as being "well exposed".
At a following step 1310, the processor 806 determines spectral characteristics of the flash illuminant 812 used to capture the flash image F. Then at the next step 1311, the processor 806 corrects the flash only image FOI' for color bias, thereby forming the corrected flash-only image FOI". It is noted that the data required for determination of the spectral characteristics of the flash in the step 1310 may be captured in the step 1304 from the light emitted by the flash 812. Alternately, the spectral characteristics of the flash 812 are known beforehand and stored in memory 809, or are communicated from the flash 812 to the camera 800 in the case of an external flash unit. At a following step 726822 -49- 1312, the processor 806 determines a flash suitability measure (referred to as the flash power statistic FP), indicating the extent of flash illumination of the well-exposed regions in the corrected flash-only image FOI", using the processing mask MI, the reconstructed Cno-flash image NFI', and the flash-only image FOI'. At the next step 1313, if the processor 806 determines that the flash suitability measure FP does not meet certain pre- 00 Cc defined suitability criteria, then the method 1300 proceeds to the step 1308. Otherwise, Sthe method 1300 proceeds to step 1314. The steps 1312 and 1313 are described in more detail in regard to Figs. 15A and At step 1314, the processor 806 determines a white point estimate for the noflash image NF1 using a knowledge of the identified well-exposed regions from the processing mask MI, the corrected flash-only image FOI", and color transforms determined in a step 1440 in Fig. 14C. The step 1314 is described in more detail in regard to Figs. 3, 4 and Then at the next step 1315, if the processor 806 determines that the aforementioned white-point estimate is not reliable, then the method 1300 proceeds to step 1308. Otherwise, the method 1300 proceeds to step 1316. At step 1316, the processor 806 determines if a backlight statistic for the reconstructed no-flash image NFI' is acceptable. Step 1316 is described in more detail in regard to Figs. 16, 17A and 17B.
If the processor 806 determines that a backlight statistic for the reconstructed noflash image NFI' is not acceptable at step 1316, then the method 1300 proceeds to the step 1308. Otherwise, the method 1300 proceeds to step 1317. At step 1317, the processor 806 uses the calculated white point to correct the no-flash image NFI to form the desired digital image of the scene, this being referred to as the corrected no-flash image NFI". The method 1300 then concludes.
Figs. 14A 14C show a method 1400 for implementing the disclosed conditional white balancing method 1300. The method 1400 may be implemented as software 726822 tn' resident in the ROM 811, the software being executed by the processor 806 of the camera 800.
tb3 The method 1400 begins at step 1406, where the processor 806 captures image data using ambient light, the captured image being the no-flash image NF. At the next step 1405, if the processor 806 determines that the current photographic situation is 00 rn, suitable for the flash-no-flash white balance method, then the method 1400 proceeds to a ¢€3 N connectivity symbol that directs the method 1400 to a corresponding symbol in Fig.
S14B. If, however, at the testing step 1405 the processor 806 determines that the current photographic situation is not suitable, then the method 1400 proceeds to a connectivity symbol that directs the method 1400 to a corresponding symbol in Fig. 14C. The connectivity symbol in Fig. 14C is directed to a step 1454, where the processor 806 applies a conventional white balance method such as the single image automatic white balancing method, after which the method 1400 of Fig. 14C concludes.
At step 1410, the processor 806 captures the second flash image FI of the scene that has been captured in the form of the no-flash image NFI in the step 1406 in Fig. 14A.
The step 1410 uses the flash 812 to illuminate the scene while the step 1406 is implemented without using the flash 812, using only the ambient illumination of the scene. The duration of the interval between the capture of the two images NFI and FI is made as short as possible to reduce the complexity of subsequent registration 1306 in Fig. 13).
In a following step 1420, the images NFI and FI are registered, in accordance with the method 200, to match each point in the flash image F1 to a corresponding point in the no-flash image NFI. The two images FI and NFI are then demosaiced, scaled and corrected (see 1306 in Fig. 13) for shutter speed, aperture, and equivalent film speed setting so that stored pixel values representing the scene measure light intensity using the same scale, to form the respective images NFI' and FI'. Pixel values of image NFI' are 726822 -51 then subtracted from respective pixel values of the flash image FI', to create the flash- N only image FOI'. The flash-only image FOI' represents an estimate of the image of the scene that would have been captured if the scene had only been illuminated with the flash 812 without the incorporation of any external ambient lighting.
At the next step 1425, the processor 806 determines the processing mask MI 00 Mc indicating regions in both NFI' and FI' which are neither underexposed (noisy) nor N overexposed (saturated). Such regions are also referred to as being well exposed.
(Ni Then at the next step 1430, the processor 806 determines, from spectral samples transmitted by the flash 812 to the camera 800, the effect of the spectrum of light provided by the flash 812 on the images NFI' and FI'. The step 1430 uses this information to correct the flash-only image FOI' to show the scene without any color bias, thereby forming the corrected flash-only image FOI".
Thereafter at step 1431, the processor 806 determines the flash power statistic FP taking into account the well-exposed regions identified by the processing mask MI, and the image pair NFI' and F'.
At a following step 1432, the processor 806 determines, using the flash power statistic FP, a measure of flash suitability as a function of the flash intensity (relative to the ambient illumination) and computed flash coverage. At step 1432, the processor 806 determines whether the flash-no-flash method will fail due to poor flash illumination of the scene. If the flash strength and coverage is determined to be suitable, then the method 1400 proceeds to a connectivity symbol that refers to a corresponding symbol in Fig.
14C. Otherwise, the method 1400 proceeds to the connectivity symbol that refers to the corresponding symbol in Fig. 14C, where the method 1400 proceeds to apply a more conventional method of white balance and concludes.
The step 1405 is, from a practical perspective, performed while the user directs the camera 800 towards a desired scene. The user then composes a shot using the view 726822 -52finder 804 and half presses the shutter release button using the user interface 808. In N response to the detection of the shutter release button being half pressed, the tb3 processor 806 performs various operations and sets various camera control parameters.
Such operations typically include detecting conditions external to the camera 800 at the scene for exposure metering, and auto focusing the lens 802 to make sure the 00 Mc, photographic scene or a subject of the scene is in focus. Based on the detected external N conditions, the processor 806 determines a set of control parameter values for capturing a photograph of the scene.
Upon detecting that the shutter release button has been fully depressed, the processor 806 captures pixel image data representing the no-flash image NFI of the scene based on the intensity of light falling on each of the photosensitive elements of the image sensor 805. The pixel image data representing the no-flash image NFI is preferably buffered in the memory 809 during subsequent processing but may be stored on the storage medium 813.
In the step 1405 the camera 800 performs preliminary testing to determine whether the flash-no-flash white balance method would produce a satisfactory result.
Since capturing the flash image FI uses battery power the flash image FI should only be captured if it provides useful information. Therefore, the testing step 1405 considers information that is on hand prior to the step 1410 (see Fig. 14B) in order to determine whether the flash image FI would provide additional useful additional information and thus should be captured. For example, the step 1405 may test the intensity of light falling on each of the photosensitive elements of the image sensor 805. The step 1405 may also determine the range to the focus point of the scene as determined by the camera 800 using the lens focus system or some additional range detection apparatus, such as an infrared range finder. If the intensity of the light falling on image sensor 805 or measured by an 726822 -53exposure metering sensor exceeds a threshold TLL or the range to the focus point is Sgreater than a threshold TFD, then the step 1405 determines that the flash will not have a significant effect on the intended subject of the captured images, and the flash-no-flash Swhite balance method will not produce an acceptable result. In this case, the step 1405 branches to the step 1454. Otherwise the step 1405 branches to the step 1410.
00 M The step 1405 can be implemented in a number of ways. In one embodiment, TLL may be set to four times the level of flash light reflected from a grey matte object Sat a distance equal to the distance between the camera 800 and the focus point when flash unit 812 fires. This approach takes into account the effects of the ISO rating of the camera 800 as well as aperture and shutter settings on the light striking image sensor 805.
The level of light reflected from an object at an unknown distance as a result of light emitted by a flash unit can be determined by a photosensitive diode or similar light sensor. In one embodiment, the threshold TFD is set to greater than 10 meters. The optimal values of TLL and TFD will in general depend on the properties of the camera 800, the image sensor 805, and the flash 812. The step 1405 can also incorporate information from the white balance sensor 810.
At the step 1410, the camera 800 captures further pixel image data representing the flash image FL. The flash F1 is captured using the flash 812. The flash image F can be captured as a result of user input using the user interface 808. Alternatively, the flash image F can be captured under automatic control. Considering automatic capture of the flash image F, the camera 800 can measure the intensity and color of the ambient light using the WB sensor 810, and if it is determined that the intensity and color of the ambient light have values outside a range of predetermined threshold values, the camera 800 can decide to capture the flash image FL.
726822 -54- As noted, the time interval between the capture of the no-flash image NFI and the flash image Fl in the method 1300 is preferably minimized less than 0.2 seconds). This reduces the difficulty in registering the flash image FI and the no-flash image NF. One method of minimizing the interval between successive capture of the s flash image F1 and the no-flash image NF is to firstly capture and store both images in 00 Mc, memory 809, and to defer image processing such as demosaicing until after both FI and N, NFI are captured. In this instance, the memory 809 or a portion thereof may be configured as fast buffer memory. In one embodiment, multiple readout circuits may be used to increase the speed of readout of the captured pixel image data from the sensor 805.
In the step 1420, the processor 806 removes the ambient light component from the captured flash image F to generate the flash-only image FOI'. The flash-only imageFOI' represents the scene as the scene would have been captured if the flash 812 was the only source of illumination. The flash-only imageFOI' takes the form of an image containing red green and blue data for each pixel location in a linear light color space of the camera 800. The method 200 of removing the ambient light components from the flash image FI' to generate the flash-only image FOI', as described above with reference to Fig. 2, may be executed at step 1420.
In the step 1425 the processor 806 generates the binary processing mask MI.
This processing mask MI contains non-zero values in pixel locations in which both the reconstructed no-flash image NFI' and the flash-only image FOI' are well exposed. The processing mask MI is used in the following step 1430 to ensure that only pixels in locations with a predetermined threshold level of exposure are used to determine the white point of the no-flash image NFl.
726822 In step 1430, the white balance of the flash-only image FOI' is adjusted using N, predetermined color properties of the light provided by the flash 812, in the color space of the camera 800, to determine a corrected flash-only image FOI". In general, color properties for a camera that is sensitive to N spectral bands (N being a positive integer) may be represented by N color factors. In the step 1430, N color factors representing the 00 Mc, response of N color filters of the camera 800 to the light provided by the flash 812 are IC used to adjust the white balance of the flash-only image FOI'.
-In one embodiment, the adjustment of the white balance of the flash-only image FOI' in the step 1430 to form the corrected flash-only FOI" may be performed by dividing the intensity of each pixel of the flash-only image FOI' in each color plane by a corresponding ratio. The ratio represents the ratio of a color factor determined for the flash 812 to a color factor of some predetermined standard illuminant. In one example, the camera 800 is sensitive to three spectral bands denoted as red green and blue and "D50" is selected as the standard illuminant. In this instance, the color component values for a single pixel at a location y) of the corrected flash only image FOI" can be determined in accordance with Equations to as described above Following the adjustment of the white balance of the image FO' at the step 1430, the colors of objects in the corrected flash-only image FOI" substantially represent pixel values that would have been measured had the scene been illuminated only with the standard "D50" illuminant.
In the step 1431 the processor 806 analyses the reconstructed no-flash image NFI', the mask image MI, and the flash-only image FOI' to determine the intensity of the flash illuminating the flash-only image FOI' compared to the reconstructed no-flash image NFI'. The term "reconstructed" relates to the demosaicing operation that is performed in the step 1420, which is described in more detail in regard to step 205 in the 726822 -56tn O method 200 of Fig. 2. The step 1431 operates in regard to the well exposed regions of the images NFI' and FOI' as indicated in the mask image MI. At step 1431 the processor 806 produces the flash power statistic FP. A method 1500 of determining the flash power 0 statistic FP is described below with reference to Figs. 15A and In a following step 1432 the processor 806 determines whether the flash power 00 C statistic FP is within acceptable levels. This is achieved by comparing the flash power Ci statistic FP to a flash power threshold denoted by the symbol T
F
P. If the flash power Sstatistic FP is less than the flash power threshold TF then it is likely that the power of the flash 812 illuminating the flash image FI will be insufficient to obtain an accurate white point estimate for the no-flash image NFI using the flash-no-flash method. If this situation is detected by step 1432, then the method 1400 proceeds to the step 1454 in Fig.
4C. In one embodiment, the flash power threshold is TFP 0.5, however depending on how the flash power statistic FP is calculated, other values of the flash power threshold TFP can also be used.
The step 1454 in Fig. 4C performs conventional white-balancing of the no-flash image NFI. This step can use information from the no-flash image NFI, the flash image FI, the WB sensor 810, user selected white balance coefficients, or other white balance information. For example, the step 1454 may white balance the reconstructed no-flash image NFI' using the white balance data from the WB sensor 810 according to the following equations (37) and (38): NFI"(x,y)r NFI'(x,y) rI 5 0 /WB, (36) NFI"(x,y)g NFI'(x,y) lgIS /WBg (37) NFI"(x,y)b NFI'(x,y)b I 5 0 IWB (38) where: 726822 57- 0 NFI'(x, NFI'(x,y), and NFI'(x,y)b represent the red, green, and blue t color component values of the pixel at the position to be modified in the reconstructed no-flash image NFI'; NFI"(x,y)g and NFI"(x,y)b represent the red, green, and blue color component values, respectively, of the pixel at the position in the corrected (or C white balanced) no-flash image NFI"; i WB,, WBg, and WBb represent the response of the WB sensor 810 to the C external illuminant in the camera's red, green, and blue spectral bands, respectively; and
ID
50 ID and I, 5 0 represent the color response of the camera 800 to the standard "D50" illuminant (normalized to a luminance of unity) in the red, green, and blue spectral bands, respectively.
In one embodiment, the step 1454 can apply the flash-no-flash white balance method and display a warning on the display 807 to indicate that the result may be in error so that the user can select a more suitable white balance method using the user interface 808.
Returning to the step 1432, if the flash power statistic FP is greater than or equal to TF, then the power of the flash illuminating the flash image FI is sufficient to obtain an accurate white point estimate for the no-flash image using the flash-no-flash method.
In this event, the method 1400 proceeds to step 1440 as seen in Fig. 14C.
In step 1440, the processor 806 determines a plurality of local color transform values that can be used to chromatically adapt color component values at the determined pixel locations in the reconstructed no-flash image NFI' to match the corresponding color values in the corrected flash-only image FOI". The method 300 described above with reference to Fig, 3, may be used to implement the step 1440 for determining local 726822 -58ttn color transform values to chromatically adapt color values in the reconstructed no-flash image NFI' to corresponding color values in the corrected flash-only image FOI".
tb3 At a next step 1450, the processor 806 determines averaged local color transform values for the reconstructed no-flash image NFI' by selectively aggregating the local color transform values determined at the step 1440 and then determining the average of 00 Mc, the aggregated local color transform values. The averaged local color transform values e¢3 Sare denoted by the symbols (I ,I ,I b The method 400 as described above with Sreference to Fig. 4, may be used to implement the step 1450 for selectively aggregating the local color transform values.
Then at the next step 1451, the processor 806 uses the reconstructed no-flash image NFI', the reconstructed and scaled flash image FI, and the results of the step 1450 to cornpute four statistical measures as follows.
Three of the statistical measures are white balance (WB) confidence statistics, denoted by the symbols WBC, WBCg, WBCb. The WB confidence statistics give measures of the level of uncertainty in the averaged local color transform values calculated in the step 1450 in each of the red, green and blue spectral bands. If the WB confidence statistics indicate that there are high levels of uncertainty in the averaged local color transform values, then the results of the flash-no-flash white balance method may be poor.
The fourth statistical measure is a backlight statistic, denoted by the symbol BC.
A backlight region, for the purposes of this description, is a region in the scene that is illuminated by a strong ambient light source with a different color to the ambient light source illuminating the foreground objects in the scene. The flash unit 812 on the camera 800 has little effect on the backlight region, since the region under consideration is generally too far away for the flash to reach, or alternately too bright for the flash to have 726822 -59a visible effect. For this reason accurate scene color estimation in backlight regions is Nproblematic when using the flash-no-flash white balance method.
One example of a backlight scenario has a foreground subject illuminated by an Cincandescent light, and in the background a window looking out onto bright daylight is in the same scene captured by the digital camera. In this example, the region of the window 00 Mc, is a backlight region. If the white balance is adjusted to suit the incandescently lit CI foreground subject, the white balance will be incorrect for the backlight region of the window, giving the backlight region an undesirable blue tint.
The backlight statistic gives a measure of the likelihood that a backlight region will have an unnatural color after the flash-no-flash white balance method is applied. A method 1600, which can be used in implementing the step 1451 for determining the backlight statistic, will be described with reference to Figs. 16, 17A and 17B.
Reviewing the described methods, the regions identified by the processing mask MI in the image NF' captured without the flash 812 are compared to the corrected flashonly image FI'. The results of this comparison are be used to estimate a white point for the no-flash image NF. The method 1400 determine measures of the reliability of the white point estimate and a measure of the likelihood that a backlight region in the imagery will produce an undesirable color shift following the flash-no-flash white balancing step. If any of the measures are outside their respective acceptable ranges, processing proceeds to apply a more conventional method of white balance and terminates, otherwise processing proceeds to use the white point estimated by the flashno-flash method to optimally correct the no-flash image to remove any color bias.
Returning to Fig. 14C, in the step 1452, the processor 806 tests whether the WB confidence statistics WBC, WBCg, and WBCb and the backlight statistic BC are within acceptable levels. This is achieved by comparing the WB confidence statistics to 726822 O respective WB confidence thresholds and comparing the backlight statistic BC to a backlight threshold.
The WB confidence thresholds are denoted by the symbols TC Tg and TWBC and the backlight threshold is denoted by the symbol T B c In one embodiment, 5 each statistic determined in the step 1451 is compared to its respective threshold in the 00 M step 1452.
SIt is likely that the flash-no-flash white balance method will produce undesirable N results if the following conditions are met: any of the WB confidence statistics WBC,, WBCg, and WBCb are less than their respective WB confidence thresholds TWC, TWBC and TWBC;
OR
the backlight statistic BC is greater than the backlight threshold T
B
If these conditions are met, then the method 1400 proceeds to step 1454 following step 1452. Following step 1454, the method 1400 concludes.
On the other hand, it is likely that the flash-no-flash white balance method will produce desirable results if the following conditions are met: all of the WB confidence statistics WBC,, WBCg, and WBCb are greater than or equal to their respective WB confidence thresholds T c
TWBC,
and T B C
AND
the backlight statistic BC is less than or equal to backlight threshold T
B
If these conditions are met, then the method 1400 proceeds to 1453 following step 1452.
726822 -61- O In one embodiment, the WB confidence thresholds are T Bc 2, T B 2, and b T WBc 2, and the backlight threshold is TBC 0. However, depending on how the WB _confidence statistics WBC,, WBCg, and WBCb and the backlight statistic BC are determined, other values of the WB confidence thresholds TB, TBC, and TWBC and the 00 5 backlight threshold T
B
c may be used.
,I In step 1453, the averaged local color transform values, (7I, Ig are applied Ni 0globally to the reconstructed no-flash image NFI' to produce the corrected no-flash image NFI". The color values for a single pixel of the corrected no-flash image NFI" are determined in the step 1453 using the "RGB scaling" method of chromatic adaptation described above with reference to Equations (23) and The method 1400 concludes following step 1453.
Following the step 1425 of the method 1400 in Fig. 14B, the mask image MI will contain zeros for any pixel that has been determined to be saturated or noisy, and all other pixels in the MI will be marked by As described above, the function min()returs a smallest component value from each of the red, green and blue component values of a pixel. Similarly the function max() described above returns a largest component value from each of the red, green and blue component values of a pixel. Alternative methods for determining the processing mask MI can be used. For example, the min) and max() functions of Equations (12) and (13) can be replaced by other pixel measures such as luminance or norm.
Figs. 15A and 15B show a method 1500 for determining the flash power statistic FP, as executed at step 1312. The method 1500 may be implemented as software resident in the ROM 811, the software being controlled in its execution by the processor 806.
726822 -62- O In the method 1500, pixel locations that are well-exposed in both the reconstructed no-flash image NFI' and the flash-only image FOI', as indicated by the processing mask image MI, are processed and an estimate of the flash power statistic is 0 determined. The steps of the method 1500 are applied to pairs of pixels from corresponding locations in the reconstructed no-flash image NFI' and the corrected flash- 00 ¢C only image FOI'.
CI As seen in Fig. 15A, the method 1500 begins at step 1501, where the processor 806 initializes a pixel location to an image origin At this point the variables LFO and LNF are each initialized to zero. In a following step 1503 the processor 806 retrieves pixel values from NFI'(x, FOI'(x, y) and MI(x,y). In a following step 1505, if the processor 806 determines that the value of MI(x,y) is a non-zero value, indicating that the pixel at the current pixel location is acceptably exposed in both the reconstructed no-flash image NFI' and the flash-only image FOI', then the method 1500 proceeds to a step 1507. Otherwise, if the method 1500 proceeds to step 1513.
Returning to the step 1507, here the luminance of the corresponding pixels in the reconstructed no-flash image NFI' and the flash-only image FOI' are determined in accordance with Equation follows: LF y) 0.3FOI'(x, 0.59FOI'(x, 0. 11FOI'(x, y)b (39) LNF y) 0.3NFI'(x, 0.59NFI'(x, 0.11NFI'(x,y), where: the subscripts r, g, and b represent the respective red, green and blue color components of the pixel; LFO y) denotes the luminance of the pixel at location y) in the flash-only image FOI'; and 726822 -63- LNF(x,y) denotes the luminance of the pixel, at location in the reconstructed no-flash image NFI'.
The coefficients of 0.3, 0.59 and 0.11 in the Equations (39) and (40) are selected Sto determine the luminance of a pixel based on the red, green, and blue color components of the pixel assuming serge chromaticities. Alternatively, for any given camera sensitive 00 Mc, to N spectral bands, a suitable set of N coefficients may be determined based on the Sspectral sensitivities of the particular camera. The luminance variables LFO and SLNF of the current pixel location are then added to the variables FO and LNF.
Returning to the step 1505, if the processor 806 determines that the value of MI(x,y) is a zero value, indicating that the current pixel location is unacceptably exposed in either the reconstructed no-flash image NFI' or the flash-only image FOI' then the method 1500 proceeds to step 1513.
As seen in Fig. 15B, at step 1513, the processor 806 increments the value of the current pixel location in a raster scan order. Then at a next step. 1515, if the processor 806 determines that each pixel of the processing mask image MI has been processed then the method 1500 proceeds to step 1520. Otherwise, the method 1500 returns step 1503.
At the step 1520, the processor 806 determines the flash power statistic using Equation (41) as follows: FP =FO (41)
LNF
where: FP is the flash power statistic; and 726822 -64- SLFO is the sum of the luminances of pixels in the flash-only image FOI' that are tb acceptably exposed in both the reconstructed no-flash image NF' and the flash-only image FO'.
LFO is hence proportional to the brightness of the flash for pixels that will be 5 subsequently used to determine the white balance using the flash-no-flash method. The 00oO M€ variable LNF is the sum of the luminance of pixels in the reconstructed no-flash image NFI' that are acceptably exposed in both the reconstructed no-flash image NFI' and the flash-only image FOI'. The variable LNF is hence proportional to the brightness of the ambient light for pixels that will be subsequently used to determine the white balance using the flash-no-flash method. The flash power statistic FP is hence the ratio of flash brightness in the flash-only image FOI' and ambient light brightness in the reconstructed no-flash image NFI'. If the flash power statistic is greater than 1.0, the flash in the flash image FI had more effect than the ambient light on the foreground subject in the captured images. If the flash power statistic is less than 1.0, the flash in the flash image FI had less effect than the ambient light on the foreground subject in the captured images.
The flash-no-flash method relies on the fact that the flash illumination in the image FI captured with the flash is bright enough to accurately measure the scene colors.
In one embodiment, if the flash power statistic FP is greater than 0.5 then the level of flash power in the flash image FI is considered to be great enough to allow an accurate white balance using the flash-no-flash white balance method.
The above description represents one arrangement for using the flash power statistic FP, however other methods may be used to obtain the same result. For example, if a camera has a sensor to detect the intensity of the flash light bounced off objects in a scene, that value may be incorporated into the calculation of the flash power statistic FP.
726822 Returning to Fig. 14C, it is recalled that the step 1450 described the selective aggregation of local color transform values to produce the averaged local color transform Z values. The method 500 described above shows one example of an aggregation method.
The aggregation method 500 involves dividing the processing mask image MI into nonoverlapping blocks and only including in the aggregate local color transform values from 00 Mc, blocks that satisfy a statistical criterion in each color plane. The aggregation procedure Sremoves noisy estimates from contributing to the averaged local color transform values.
SHowever, if the local color transform values are excessively noisy, too few local color transform values may be aggregated when implementing the step 1450 in Fig. 14C.
In this case the results of the flash-no-flash white balance maybe poor, due to too few local color transform values being used to determine the averaged local color transform values. In one embodiment, the WB confidence statistics are the ratios of local color transform values selected for inclusion in the aggregate by the method 500 over the total number of local color transform values determined in the step 1440 in Fig. 14C in each color plane. For a camera which is sensitive to N spectral bands, the step 1451 in Fig.
14C determines N WB confidence statistics. In the above example of a camera that is sensitive to three spectral bands denoted red, green, and blue, the WB confidence statistics are determined in accordance with Equations (43) and (44) as follows: WBC LC. x 100 (42) LCr
LC'
WBC= X100 (43) LCg
WBC
b b x 100 (44) LCb where: 726822 -66o LCr LCg, and LCb are respectively the total number of local color transform values determined in the step 1440 in Fig. 14C in the camera's red, green and blue spectral bands; LC,, LCg, and LC'denote the total number of local color transform values 5 selectively aggregated in the step 1450 in Fig. 14C in the camera's red, green and blue 00oO rn, spectral bands; and n WBCr, WBCg and WBCb denote the WB confidence statistic in the camera's N red, green and blue spectral bands respectively.
The flash-no-flash method relies on the averaged local color transform values computed in the step 1450 in Fig. 14C being of sufficient accuracy. The WB confidence statistics give the percentage of local color transform values that were not rejected by the selective aggregation performed in step 1450. If this percentage is too low, the averaged local color transform values are likely to be inaccurate. In the present arrangement, if all of the WB confidence statistics are greater than 2 then the level of accuracy of the averaged local color transform is considered great enough to allow an accurate white balance using the flash-no-flash white balance method.
The above description represents one embodiment of the method to determine the WB confidence statistics. Many methods may be used to obtain the same result by determining a measure of confidence in the averaged local color transform values or the local color transform values in general. For example, the variances or standard deviations of the local color transform values selectively aggregated by step 1450 may be determined and used to determine the WYB confidence statistics.
There are three main criteria that must be met by a backlight region to cause the flash-no-flash method to produce an undesirable result. Firstly, the backlight region must be large enough and bright enough to be noticed by a person viewing the image.
726822 -67- Secondly, the backlight region must be illuminated by a light source with a color N substantially different from the light source illuminating the foreground subjects. Thirdly, after the averaged local color values are used to adjust the white point of the backlight region, the backlight region must have an undesirable color tint.
In one embodiment, the backlight region is considered to have an undesirable 00 Mc, color tint, if average color of the backlight region moves away from gray after the flash- N no-flash white balance has been applied.
Fig. 16 shows a method 1600 for determining the backlight statistic BC. The method 1600 may be implemented as software resident in the ROM 811, the software being controlled in its execution by the processor 806. The process 1600 may be used in implementing the step 1451 in Fig. 14C.
The method 1600 begins at step 1605, where.the processor 806 initializes a backlight mask. The backlight mask is denoted by the symbol BM. The backlight mask BM is the same size as the reconstructed no-flash image NFI' and the reconstructed scaled and registered flash image FI'. The backlight mask is initialized to contain zero in every element.
The method 1600 then proceeds to step a 1610, where the processor 806 examines the reconstructed no-flash image NFI' and the reconstructed scaled and registered flash image FI' to determine the pixel locations belonging to a backlight region. Each pixel location is visited and tested. The luminance of the pixels in the reconstructed no-flash image NFI' and the reconstructed scaled and registered flash image FI' corresponding to the current pixel location are determined using Equations (45) and (46): NFL(x, y) 0.3NFI'(x,y)+ 0.59NFI'(x, O.11NFI'(x, y) 726822 -68- SFL(x,y) 0.3FI'(x,y) 0.59FI'(x,y) 0.11FI'(x, y) (46) 00 esr A pixel location is determined to belong to a backlight region if it satisfies 1 two conditions as follows: Condition 1: NFL(x, y) Z Condition 2: FL(x, y) Z 2 x NFL(x, y) The Condition 1 states that the luminance of the pixel at location in the reconstructed no-flash image NFI' should be greater than a constant This condition ensures that regions that are very dark are not classified as backlight regions. The second condition states that pixels in a backlight region in the reconstructed scaled and registered flash image FI' should not be brighter than some fraction of the luminance of the corresponding pixel in the reconstructed no-flash image NFI'. The fraction is given by the constant
Z
2 The Condition 2 accounts for the fact that backlight regions are characterized partly by the fact that the light from the flash unit does not reach these regions. Hence backlight regions should not appear significantly brighter in the reconstructed scaled and registered flash image FI' than they appear in the reconstructed no-flash image NFI'.
Every pixel location that satisfies both the Condition 1 and the Condition 2 is classified as belonging to a backlight region and the corresponding pixel location (x,y) in the backlight mask BM is set to one. In one embodiment, Z, 0 and Z 2 1., 726822 69 0 however the optimal values of Z, and Z 2 will depend on the particular camera 800 in question.
The process 1600 then proceeds to a step 1620 in which the processor 806 Oestimates the color of the backlight illuminant. This is the same as the white point of the backlight region identified by the backlight mask BM. Any suitable method to estimate 00 c the white point of an image may be used to determine the color of the backlight C1 illuminant. In one embodiment, the "Gray World" method is used at step 1620.
0 Figs. 17A and 17B show a method 1700 for implementing the "Gray World" method. The backlight estimate is denoted by the symbols b ,b where fb, lb and i~ represent the red, green, and blue components of the backlight estimate, respectively.
As seen in Fig. 17A, the method 1700 begins at step 1701, where the processor 806 initializes a pixel location to an image origin In this step the variables I7, Ib' and I b are each initialized to zero. In a following step 1703, the processor 806 retrieves pixel values fromNFl'(x,y) and BM(x,y). Then in a following testing step 1705, if the processor 806 determines that the value of BM(x,y) is a non-zero value, indicating that the pixel at the current pixel location has been determined to belong to a backlight region by step 1610, then the method 1700 proceeds to a step 1707. Otherwise, the method 1700 proceeds to step 1713.
The step 1707 in Fig. 17A determines the normalized color of the pixel at the current pixel location in the reconstructed no-flash image NFI' by normalizing the luminance of the pixel to unity in accordance with Equations (48) and as Sfollows: I( NF'(x, y)(47) 'r 0.3NFI'(x,y), 0.59NFI'(x, 0.11NFI'(x, y)b 726822 i NFI'(x,y), (48) 0.3NFI'(x, 0.59NFI'(x, y)g 0.11NFI'(x, y), SNFI'(x, )b (49) 0.3NFI'(x, y) 0.59NFI'(x, y) 0.11NFI'(x, y) 00 where the subscripts r, g, and b respectively represent the red, green and blue color components of the pixel.
t Since the effect of the pixel's luminance has been compensated for, the
O
symbols I(x,y)g and denote the color components of the current pixel. The color components are then used in the step 1707 to update the backlight estimate in accordance with Equation (51) and as follows: 7b'= rb' Ib b l I(x,y)b (51) I b Ibb I(X, y)b (52) As noted, if in the step 1705 the processor 806 determines that the value of BM(x,y) is a zero value, indicating that the current pixel location has been determined to not belong to a backlight region by the step 1610, then the method 1700 proceeds to the step 1713.
As seen in Fig. 17B, at step 1713, the processor 806 increments the value of the current pixel location in a raster scan order. Then at a following testing step 1715, if the processor 806 determines that each pixel of the processing mask image BM has been processed then the method 1700 proceeds to a step 1720 after which the method 1700 concludes. Otherwise, the method 1700 returns to the step 1703.
726822 -71tn O In the step 1720, the processor 806 adjusts the backlight estimate to compensate for the number of non-zero pixels in the backlight mask BM using Equations as follows: fbi Ibl (53) BMcount 00 b b Ibl IbI (54) S BMcount l bl I =i b BMcount where BMcount is the number of non-zero elements in the backlight mask BM.
As a consequence of performing the method 1700, the backlight estimate I bl,) contains the estimate of the color of the light source illuminating the backlight region in the scene.
In one embodiment, the backlight estimate is determined from the reconstructed no-flash image NFI'. However, it may be determined from any of the flash or no-flash images of the scene described above such as the flash image FI.
Returning to Fig. 16, the method 1600 proceeds from the step 1620 to a step 1630 which predicts the direction that the backlight color shift BLshift would take if the flash-no-flash white balance method would be applied in a step 1453 (see Fig. 14C). The color of the backlight region may shift toward or away from "gray" after the step 1453.
The reference gray may be any suitable gray color mapped to the camera's color space.
For the purposes of illustration, D50 is considered as the standard gray (white) given by the symbols ID 50 5I5, and ID 50 The distance between the backlight estimate and the standard gray D50 before step 1453 is given by: predist=(' -I 50 i I D 50 2 l bD50 )2 726822 -72- O The distance after step 1453 is estimated as: Lb, 2 2o oI 2 postdist rD 50 I 5 -2 b where the symbols (I7, ia, a) denote the color of the ambient illuminant determined in Sthe step 150 above. The backlight color shift is given by: 00 M 5 BLshift postdist predist SReturning to Fig. 16, the method 1600 then proceeds to step a 1640 that Sdetermines the backlight color difference using Equation (56) as follows: (ibl _a )2 (-bl a)2 (jblb BLdiff= i b (56) bl 2 )2 (a 2 2 where: BLdiffdenotes the backlight color difference; a a a o and denote the standard deviations of the estimate of the color of the ambient illuminant determined in the step 1450 of Fig. 14C; and bI bi bI r ag and ab denote the standard deviations of the estimate of the backlight color determined in the step 1620 of Fig. 16.
Although Equation (56) is the preferred method of determining the backlight color difference BLdiff, other measure of distance may be used such as Euclidean distance.
The step 1640 then sets the backlight statistic based upon the following three conditions: Condition 4: BMcount >r, Tcount Condition 726822 -73- 0 BLshift Y 2 Condition 6: BLdiff
Y
3 where Tcount denotes the total number of pixels in no-flash image NFI.
Condition 4 states that the ratio of the number of backlight region pixels to the 00 Men total number of image pixels should be larger than Condition 5 states that the value of lt the backlight color shift BLshift should be greater than Y 2 Condition 6 states that the CI value of the backlight color difference BLdiff should be greater than Y If all three conditions are satisfied, then the backlight statistic BC is set to one. If any or all of the conditions are not satisfied, then the backlight statistic BC is set to zero.
Returning to Fig. 14C, if the backlight statistic BC is equal to one after step 1640, then the flash-no-flash white balance method is likely to result in a corrected noflash image NFI" with a visible backlight region with an unnatural tint. Under this condition, the step 1452 directs the method 1400 to the step 1454 which implements an alternative method of white balancing the no-flash image NFI If the backlight statistic BC is equal to zero after step 1640 then the flash-no-flash white balance method is unlikely to result in a corrected no-flash image NFI" with a visible backlight region with an unnatural tint.
In one embodiment, Y, 0.02, Y2 and Y, However, different implementations may require different values for these parameters.
Returning to Fig. 16, following the step 1640, the method 1600 concludes.
In an alternate embodiment, and particularly with reference to Figs. 14A-14C, all of the steps of the method 1400 are identical apart from the step 1454.
In the step 1454 of an alternate method, instead of using a known single image white balance method such as "Gray World" to compute every component of the white 726822 -74point of the no-flash image NFI, the known white balance method is only used to compute those components of the white point of the no-flash image NFl for which the corresponding WB confidence statistics WBC, WBCg, and WBCb have fallen below the corresponding WB confidence thresholds, TWBc, Tg
B
C and TWBC.
For example, if WBC, is less than T Bc but WBCg and WBCbare within acceptable ranges, then the red component of the white point of the no-flash image would t be computed by some suitable alternative method of white balance such as "Gray World" C whilst the green and blue components of the white point of the no-flash image NFI are computed using the step 1453.
In a further alternate embodiment, all of the steps of the method 1400 are identical apart from the steps 1450 and 1454. In step 1450 of the alternate arrangement, in addition to calculating the average of the selective aggregate of the local color transform values, the step 1450 also calculates and stores the average of all of the local color transform values without the selective aggregation method described in the process 500 of Fig. 5. Denoting this average as the "total averaged local color transform values", then in the (alternate) step 1454, instead of using a known single image white balance method such as "Gray World" to compute every component of the white point of the noflash image NF, the total averaged local color transform values are used for those components of the white point of the no-flash image NF1 for which the corresponding WB confidence statistics WBC,, WBCg, and WBCb have fallen below the corresponding WB confidence thresholds, TWBC, Tg, and TbBC as per the second alternate arrangement above.
It should be noted that the proposed method described above to determine the suitability of a flash-no-flash pair for conditional white balancing is not restricted to the disclosed flash-no-flash white balance method, and may be modified to be used with 726822 other white balance methods making use of a flash image to aid the white balance determination for a no-flash image. In particular, a further alternate embodiment uses Z another flash-no-flash white balance method. This alternate arrangement is described below with reference to Fig. 13. In this alternate arrangement all of the steps in Fig. 13 remain the same, except for steps 1314 and 1315 which are modified as described below.
00 Mc, In step the 1314 average color estimates are computed for the corrected flash- N, only image FOI" and the no-flash image NFI using the "Gray World" algorithm Sdescribed above in relation to Figs. 17A and 17B. The description associated with Figs. 17A and 17B is directed to the "Gray World" method as it is applied in order to estimate the white point of the backlit region in the no-flash image. However, in the present alternate arrangement, the "Gray World" method is used to estimate the average color over all well exposed regions (as determined by the mask image MI) in the corrected flash-only and no-flash images (FOI" and NFI, respectively). While computing the average color estimates of the no-flash image NFI and the corrected flashonly image FOI", the (modified) step 1414 also records the variances of the two average color estimates in each of the color components. The average color estimates of the corrected flash-only image are respectively denoted as AFIR, AFIg, AFIb in the red, green, and blue color components. The variances of the average color estimates in each color component for the corrected flash-only image are respectively denoted as VF, VFIg, VFIb in the red, green, and blue color components. The average color estimates of the noflash image are respectively denoted as ANFI, ANFIg, ANFIb in the red, green, and blue color components. The variances of the average color estimates in each color component for the no-flash image are respectively denoted by VNFI, VNFIg, VNFIb in the red, green, and blue color components. The final white point estimate of the no-flash image NFI, is determined in accordance with Equations (58) and (59) as follows: 726822 -76- ANFIr x ISo
I
r (57) CN AFI, AFI x ID 5 0 ga (58)
ANFI,
0
AFI
b xID l b (59) ANFIb 00 tf 5 The process 1300 then proceeds to (a modified) step 1315 where the white CN, balance confidence statistics are determined in accordance with Equations (61) and as follows: VFI VNFI WBC AFI 'ANFI VFI, VNFI WBCg max( (61) g AFI ANFI VFI VNFI WBCb max(- -b FIb) (62) AFIb ANFI, The white balance confidence thresholds in this alternate arrangement are set to TBC TgW and TbWBC It is noted that the above alternate arrangement is merely one method for computing the white balance confidence statistics.
Any method suitable for producing a statistical measure of the reliability of the final white point estimate of the no-flash image NFI may be used. The remainder of the alternate arrangement proceeds as described above in relation to Fig. 13.
The aforementioned preferred method(s) comprise a particular control flow. There are many other variants of the preferred method(s) which use different control flows without departing the spirit or scope of the invention. Furthermore one or more of the steps of the preferred method(s) may be performed in parallel rather sequentially.
726822 -77- The foregoing describes only some embodiments of the present invention, and modifications and/or changes can be made thereto without departing from the scope and spirit of the invention, the embodiments being illustrative and not restrictive.
In the context of this specification, the word "comprising" means "including principally but not necessarily solely" or "having" or "including", and not "consisting 00 C only of'. Variations of the word "comprising", such as "comprise" and "comprises" have NS correspondingly varied meanings.
726822

Claims (13)

1. A method of processing a captured image of a scene, said method comprising the N steps of: determining photographic parameters of the scene; 00 M determining, if the parameters meet pre-defined criteria, flash-no-flash white N balance information for the captured image based on both a no-flash image of the scene captured at ambient light and on a flash-image of the scene captured using a flash illuminant; estimating a reliability of the determined flash-no-flash white balance information; and determining, if the parameters do not meet the pre-defined criteria or the reliability is lower than a predefined threshold, white balance information applicable to the captured image using a default white balance method.
2. A method according to claim 1, wherein the photographic parameters comprise at least one of: light intensity emitted from the scene; and range to the focus point of the scene;
3. A method according to claim 1, wherein the pre-defined criteria comprise at least one of: determining if the intensity of the light emitted by the scene exceeds a first threshold; and determining if the range to the focus point is greater than a second threshold. 1328157_1 726822_amends_02 -79- 00
4. A method according to claim 3, wherein: tb3 the first threshold is four times the level of flash light reflected from a grey matte object at a distance between a camera used to capture the image and the focus point; and the second threshold is greater than ten meters. 00 i
5. A method according to claim 1, further comprising the steps of: determining flash suitability dependent upon flash intensity relative to the ambient illumination and flash coverage; and determining the flash-no-flash white balance information if the flash suitability meets a pre-defined criterion.
6. A method according to claim 5 where the determination of flash suitability is based on an estimate of at least some part of an image of the scene illuminated only by the flash.
7. A method according to claim 5 further comprising the step of determining an additional suitability measure based on the effect of a first color transform on the captured image in one or more regions of the captured image.
8. An apparatus for processing a captured image of a scene, said apparatus comprising: means for determining photographic parameters of the scene; means for determining, if the parameters meet pre-defined criteria, flash-no-flash white balance information for the captured image based on both a no-flash image of the 1328157_1 726822_amends_02 00 scene captured at ambient light and on a flash-image of the scene captured using a flash illuminant; means for estimating a reliability of the determined flash-no-flash white balance C information; and means for determining, if the parameters do not meet the pre-defined criteria or 00 M the reliability is lower than a predefined threshold, white balance information applicable CI to the captured image using a default white balance method.
9. A computer readable storage medium having recorded thereon a computer program for directing a processor to execute a method for processing a captured image of a scene, said program comprising: code for determining photographic parameters of the scene; code for determining, if the parameters meet pre-defined criteria, flash-no-flash white balance information for the captured image based on both a no-flash image of the scene captured at ambient light and a flash-image of the scene captured using a flash illuminant; code for estimating a reliability of the determined flash-no-flash white balance information; and code for determining, if the parameters do not meet the pre-defined criteria or the reliability is lower than a predefined threshold, white balance information applicable to the captured image using a default white balance method.
A method of processing a captured image of a scene, said method being substantially as herein before described with reference to any one of the embodiments as that embodiment is described with reference to Figs. 1 to 10 and 12 to 17B. 1328157_1 726822_amends_02 -81 00
11. An apparatus for processing a captured image of a scene, said apparatus being substantially as herein before described with reference to any one of the embodiments as N'l that embodiment is described with reference to Figs. 1 to 10 and 12 to 17B. 00 C
12. A computer program for processing a captured image of a scene, said program C' being substantially as herein before described with reference to any one of the embodiments as that embodiment is described with reference to Figs. 1 to 10 and 12 to 17B.
13. A computer program product having a computer readable medium having a computer program recorded therein for processing a captured image of a scene, said computer program product being substantially as herein before described with reference to any one of the embodiments as that embodiment is described with reference to Figs. 1 to 10 and 12 to 17B. DATED this the Twenty First Day of August 2008 CANON KABUSHIKI KAISHA Patent Attorneys for the Applicant SPRUSON&FERGUSON 1328157_1 726822_amends_02
AU2005203381A 2004-08-05 2005-08-01 White balance adjustment Ceased AU2005203381B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
AU2005203381A AU2005203381B2 (en) 2004-08-05 2005-08-01 White balance adjustment

Applications Claiming Priority (7)

Application Number Priority Date Filing Date Title
AU2004904409A AU2004904409A0 (en) 2004-08-05 White Balance Adjustment
AU2004904409 2004-08-05
AU2004906020 2004-10-18
AU2004906020A AU2004906020A0 (en) 2004-10-18 Post-capture fill flash
AU2004906703A AU2004906703A0 (en) 2004-11-23 Selection of Images for White Balance Adjustment
AU2004906703 2004-11-23
AU2005203381A AU2005203381B2 (en) 2004-08-05 2005-08-01 White balance adjustment

Publications (2)

Publication Number Publication Date
AU2005203381A1 AU2005203381A1 (en) 2006-02-23
AU2005203381B2 true AU2005203381B2 (en) 2008-09-18

Family

ID=36084081

Family Applications (1)

Application Number Title Priority Date Filing Date
AU2005203381A Ceased AU2005203381B2 (en) 2004-08-05 2005-08-01 White balance adjustment

Country Status (1)

Country Link
AU (1) AU2005203381B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11995567B2 (en) * 2020-08-27 2024-05-28 Micron Technology, Inc. Apparatuses and methods for color matching and recommendations
CN114023274B (en) * 2021-11-26 2023-07-25 惠州视维新技术有限公司 Backlight adjustment method, device, display equipment and storage medium

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5568194A (en) * 1994-05-31 1996-10-22 Asahi Kogaku Kogyo Kabushiki Kaisha Adjusting a white balance in a camera using a flash

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5568194A (en) * 1994-05-31 1996-10-22 Asahi Kogaku Kogyo Kabushiki Kaisha Adjusting a white balance in a camera using a flash

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
DiCarlo et al., Illuminating Estimation, 2002, Ninth Color Imaging Conference, pp. 27-34. *

Also Published As

Publication number Publication date
AU2005203381A1 (en) 2006-02-23

Similar Documents

Publication Publication Date Title
US7551797B2 (en) White balance adjustment
Battiato et al. Exposure correction for imaging devices: an overview
Ramanath et al. Color image processing pipeline
US8488015B2 (en) Camera using preview image to select exposure
US8311362B2 (en) Image processing apparatus, imaging apparatus, image processing method and recording medium
US6727943B1 (en) Electronic camera with white balance adjustment recording medium storing image processing program for white balance adjustment
JP5497151B2 (en) Automatic backlight detection
US7916181B2 (en) Method and device for creating high dynamic range pictures from multiple exposures
US7889275B2 (en) System and method for continuous flash
JP6685188B2 (en) Imaging device, image processing device, control method thereof, and program
CN111739110B (en) Method and device for detecting image over-darkness or over-exposure
JP6521776B2 (en) Image processing apparatus, image processing method
CN102769761B (en) Image processing apparatus and image processing method
JP5693271B2 (en) Image processing apparatus and method
TW201345246A (en) Image processing apparatus and image processing method for performing image synthesis
JP2008104009A (en) Imaging apparatus and imaging method
JPWO2019111659A1 (en) Image processing equipment, imaging equipment, image processing methods, and programs
CN114143443B (en) Dual sensor camera system and camera method thereof
JP5048599B2 (en) Imaging device
JP4029206B2 (en) Imaging device
JP2003333616A (en) White balance adjustment method, imaging apparatus, program, and storage medium
US20110128404A1 (en) Imaging apparatus, image processing program, image processing apparatus, and image processing method
AU2005203381B2 (en) White balance adjustment
JP2015192179A (en) White balance adjusting device, photographing device, and white balance adjusting method
CN114697483B (en) Under-screen camera device and method based on compressed sensing white balance algorithm

Legal Events

Date Code Title Description
FGA Letters patent sealed or granted (standard patent)
MK14 Patent ceased section 143(a) (annual fees not paid) or expired