Some content of this application is unavailable at the moment.
If this situation persists, please contact us atFeedback&Contact
1. (WO2018005765) SYSTEMS AND METHODS FOR CAPTURING DIGITAL IMAGES
Note: Text based on automatic Optical Character Recognition processes. Please use the PDF version for legal matters

SYSTEMS AND METHODS FOR CAPTURING DIGITAL IMAGES

RELATED APPLICATIONS

[0001] The present application claims priority to U.S. Patent Application No. 15/201,283, titled "SYSTEMS AND METHODS FOR CAPTURING DIGITAL IMAGES," filed 7/1/2016.

FIELD OF THE INVENTION

[0003] Embodiments of the present invention relate generally to image processing, and more specifically to systems and methods for capturing digital images.

BACKGROUND

[0004] For a traditional camera module, higher sensitivity exposures are typically implemented using higher analog gain. In general, however, more analog gain results in more image noise. Consequently, digital images requiring higher sensitivity exposures generally exhibit more noise, which typically degrades image quality. Conventional digital image processing techniques may reduce certain forms of noise in a digital image. However, such techniques may degrade image quality by eliminating desirable texture and fine details in an image that convey actual scene information. Furthermore, conventional techniques may be computationally too intensive, for efficient implementation on mobile devices.

[0005] As the foregoing illustrates, there is a need for addressing this and/or other related issues associated with the prior art.

SUMMARY

[0006] A system, method, and computer program product are provided for capturing digital images. In use, at least one ambient exposure parameter is determined, and at least one flash exposure parameter based on the at least one ambient exposure parameter is determined. Next, via at least one camera module, an ambient image is captured according to the at least one ambient exposure parameter, and, via the at least one camera module, a flash image is captured according to the at least one flash exposure parameter. The captured ambient image and the

captured flash image are stored. Lastly, the captured ambient image and the captured flash image are combined to generate a first merged image. Additional systems, methods, and computer program products are also presented.

[0007] In one embodiment, a device may be configured such that the at least one ambient exposure parameter includes at least one of an exposure time, an exposure sensitivity (ISO value), a white balance, and a lens aperture. Additionally, one or more processors may execute instructions to implement at least one of de-noising the ambient image prior to the combining, de-noising the flash image prior to the combining, and de-noising the first merged image.

[0008] In another embodiment, a device may be configured such that at least one of de-noising of the ambient image prior to the combining of a captured ambient image and a captured flash image, denoising of the flash image prior to the combining of a captured ambient image and a captured flash image, and de-noising of the first merged image may generates at least one de-noised pixel, wherein one or more processors may further execute instructions to: calculate a first intermediate noise estimate based on an ambient image ISO value; calculate a second intermediate noise estimate based on the ambient image ISO value and an ambient pixel intensity; calculate a third intermediate noise estimate based on the ambient pixel intensity and a flash pixel intensity; and combine the first intermediate noise estimate, the second intermediate noise estimate, and the third intermediate noise estimate to create an overall pixel noise estimate.

[0009] In one embodiment, a device may be configured such that the first intermediate noise estimate is calculated as a smoothstep function configured to receive the ambient image ISO value as an input, a first ISO value as a left edge value, and a second ISO value as a right edge value. Additionally, a device may be configured such that the second intermediate noise estimate is calculated as a smoothstep function configured to receive the ambient pixel intensity as an input, a left edge value that is a function of the ambient image ISO value, and a right edge value that is an offset from the left edge value.

[0010] Additionally, in one embodiment, a device may be configured such that a third intermediate noise estimate is calculated according to a blend surface configured to receive the ambient pixel intensity and the flash pixel intensity. Further, one or more processors may further execute instructions to: compute a patch-space sample at a location in patch-space that corresponds to a location of the at least one de-noised pixel in a pixel-space; upon determining that the overall pixel noise estimate is above a predefined threshold, assign a value of the patch-space sample to the at least one de-noised pixel; and upon determining that the overall pixel noise estimate is below the predefined threshold, assign a value of an ambient pixel to the at least one de-noised pixel.

[0011] In another embodiment, a device may be configured such that determining the at least one ambient exposure parameter includes capturing a sequence of images wherein each image is captured with a successively refined estimate until an ambient exposure goal is satisfied. Additionally, a device may be configured such that the at least one flash exposure parameter includes at least one of an exposure time, an exposure sensitivity (ISO value), a white balance, a flash duration, and a lens aperture.

[0012] Still yet, in one embodiment, a device may be configured such that the at least one flash exposure parameter includes a flash image exposure lime which is less than or equal to an ambient image exposure time associated with the at least one ambient exposure parameter. A device may be configured such that the flash image is captured as one of a sequence of flash images captured according to successively refined flash exposure parameters, the sequence of flash images being captured until a flash exposure goal is satisfied. In another embodiment, a device may be configured such that at least one of a flash duration, a flash intensity, or a combination of the flash duration and the flash intensity is adjusted until a flash exposure goal is satisfied.

[0013] Additionally, in another embodiment, a device may be configured such that the ambient image is captured within a first analog storage plane of an image sensor and a flash image is captured within a second analog storage plane of the image sensor. Also, a device may be configured such that the ambient image is captured at a different resolution than a flash image.

[0014] In one embodiment, a device may be configured such that a first merged image includes interpolated pixels from pixel data of the ambient image, the interpolated pixels providing a higher effective resolution. Additionally, a device may be configured such that an ambient

image is captured at a lower resolution at a specific ISO value, and a flash image is captured at a higher resolution and a higher ISO value. Still yet, one or more processors may further execute instructions to perform an edge detection pass on ambient pixels of an ambient image to generate an edge-enhanced image, wherein a device may be configured such that the edge-enhanced image is used to assign de-noising weights.

BRIEF DESCRIPTION OF THE DRAWINGS

[0015] Figure 1 illustrates an exemplary method for generating a de-noised pixel, in accordance with one possible embodiment.

[0016] Figure 1A illustrates a method for generating a de-noised pixel comprising a digital image, according to one embodiment of the present invention.

[0017] Figure IB illustrates a method for estimating noise for a pixel within a digital image, according to one embodiment of the present invention.

[0018] Figure 1C illustrates a method for generating a de-noised pixel, according to one embodiment of the present invention.

[0019] Figure ID illustrates a method for capturing an ambient image and a flash image, according to one embodiment of the present invention.

[0020] Figure 2A illustrates a computational flow for generating a de-noised pixel, according to one embodiment of the present invention.

[0021] Figure 2B illustrates a noise estimation function, according to one embodiment of the present invention.

[0022] Figure 2C illustrates a pixel de-noise function, according to one embodiment of the present invention.

[0023] Figure 2D illustrates patch-space samples organized around a central region, according to one embodiment of the present invention.

[0024] Figure 2E illustrates patch-space regions organized around a center, according to one embodiment of the present invention.

[0025] Figure 2F illustrates a constellation of patch-space samples around a center position, according to one embodiment of the present invention.

[0026] Figure 2G illustrates relative weights for different ranks in a patch-space constellation, according to one embodiment of the present invention.

[0027] Figure 2H illustrates assigning sample weights based on detected image features, according to one embodiment.

[0028] Figure 3 illustrates a blend surface for estimating flash contribution at a pixel, according to one embodiment of the present invention.

[0029] Figure 4A illustrates a front view of a mobile device comprising a display unit, according to one embodiment of the present invention.

[0030] Figure 4B illustrates a back view of a mobile device comprising a front-facing camera and front-facing strobe unit, according to one embodiment of the present invention.

[0031] Figure 4C illustrates a block diagram of a mobile device, configured to implement one or more aspects of the present invention.

[0032] Figure 5 illustrates an exemplary method for generating a de-noised pixel based on a plurality of camera modules, in accordance with one possible embodiment.

DETAILED DESCRIPTION

[0033] Embodiments disclosed herein allow a photographic device to reduce noise associated with a captured image of a photographic scene. In one embodiment, two images are merged into one image (a merged image) having lower overall noise than either of the two images. In another embodiment, one image is processed to reduce noise associated with the one image. In one embodiment, the photographic device is configured to capture a first image and a second image of the same scene. The first image is captured with a flash illuminator device enabled, and the second image may be captured with the flash illuminator device either disabled completely or enabled to generate less light relative to that associated with capturing the first image. In the context of the present description, the first image may be referred to herein as a flash image and the second image may be referred to herein as an ambient image.

[0034] In certain embodiments, the first image may be captured prior to the second image in time sequence. In other embodiments, the second image may be captured prior to the first image in time sequence. In certain embodiments, the first image is captured by a first camera module and the second image is captured by a second, different camera module. In certain other embodiments, the first image is generated by combining two or more images that are captured by a first camera module, and the second image is generated by combining two or more images that are captured by a second camera module. In yet other embodiments, the first image is generated by combining two or more images, each captured by different corresponding camera modules; in related embodiments, the second image is generated by combining two or more images, each captured by the camera modules.

[0035] The first image may be captured according to a first set of exposure parameters and the second image may be captured according to a second set of exposure parameters. Each set of exposure parameters may include one or more of: exposure time, exposure sensitivity (ISO value), and lens aperture. Exposure parameters for a flash image may further include flash intensity, flash duration, flash color, or a combination thereof. The exposure parameters may also include a white balance, which may be determined according to a measured white balance for the scene, according to a known or measured white balance for the flash illuminator device, or a combination thereof. The measured white balance for the scene may be determined according to any technically feasible technique, such as estimating a gray world white balance, estimating illuminator white balance within the scene, and so forth. A capture process includes capturing the first image and the second image, and any associated images from which the first image and the second image are generated. The capture process may include a metering process to generate each set of exposure parameters. In one embodiment, the metering process is performed prior to the capture process and includes at least one ambient metering process and at least one flash metering process.

[0036] The metering process may be performed to determine one or more of the exposure parameters such that an exposure goal is satisfied. A sequential set of metering images may be captured and analyzed for comparison against the exposure goal to determine the exposure parameters, with each successive metering image in the set of metering images captured

according to a refined approximation of the exposure parameters until the exposure goal is adequately satisfied. In a live view implementation, refinement of exposure may continuously accommodate changes to scene lighting prior to a user taking a picture. A first exemplary exposure goal for a captured image is for the captured image to exhibit an intensity histogram having a median intensity value that is substantially half way between intensity extremes. For example, in a system where image intensity ranges from 0.0 to 1.0, then exposure parameters that cause an image to exhibit a histogram with a median of approximately 0.50 would satisfy the exposure goal. This first exemplary exposure goal is suitable for capturing certain ambient images. A second exemplary exposure goal may be specified to bound a maximum portion or number of poorly-exposed (e.g., over-exposed or under-exposed) pixels. Satisfying the above first and second exposure goals simultaneously may require a modified first exposure goal such that the median intensity goal may specify a range (e.g., 0.45 to 0.55) rather than a fixed value (e.g. 0.50).

[0037] In one embodiment, a first metering process is performed for the first image and a second metering process is being performed for the second image. The first metering process may operate according to different constraints than the second metering process. For example, the ambient image may be metered to achieve a median intensity of approximately 0.50, while the flash image may be metered to bound the portion of over-exposed pixels to less than a specified portion of image pixels. Alternatively, the flash image may be metered to bound the portion of over-exposed pixels additional to already over-exposed pixels in the ambient image to less than a specified portion of image pixels. In other words, the flash image may be metered to avoid increasing more than a specified portion of additional over-exposed pixels compared to the ambient image. In one embodiment, the specified portion is defined herein to be one percent of pixels for a given image. In other embodiments, the specified portion may be more than one percent or less than one percent of image pixels.

[0038] Enabling the flash illuminator device may cause flash reflection, such as specular reflection, on surfaces that are nearly perpendicular to illumination generated by the flash illuminator device, leading to locally over-exposed pixels within a reflection region. To reduce over-exposure due to flash reflection, the flash illuminator device may be enabled to sweep or otherwise vary intensity over a sequence of metering images, with different metering images captured using a different flash intensity. Reflection regions can be identified in the different metering images as over-exposed regions that grow or shrink based on flash intensity, but with an over-exposed central region that remains over-exposed over the different flash intensities. Over-exposed central regions may be masked out or excluded from consideration for exposure. Furthermore, regions that remain under-exposed or consistently-exposed over different flash intensities may also be excluded from consideration for exposure. In one embodiment, an exposure histogram is generated for each metering image using pixels within the metering image that are not excluded from consideration for exposure. In certain embodiments, the exposure histogram is an intensity histogram generated from pixel intensity values. Other technically feasible exposure histograms may also be implemented without departing the scope of various embodiments. Multiple metering images are captured with varying exposure parameters and corresponding exposure histograms are generated from the metering images. Based on the exposure histograms, exposure parameters are identified or estimated to best satisfy an exposure goal. In one embodiment, the exposure goal is that the exposure histogram has a median intensity value that is substantially half way between intensity extremes. One or more pixels may be excluded from consideration in the histogram as described above. This and related embodiments allow the capture of a flash image with appropriately illuminated foreground subjects. More generally, exposure parameters for illuminated foreground subjects are determined without compromising between exposure for the foreground and exposure for the background regions, while a separately exposed ambient image may be captured to provide data for appropriately exposed background regions and other regions insignificantly hit by the flash illuminator device. In one embodiment,

[0039] In one embodiment, exposure parameters for an ambient image and exposure parameters for a flash image are determined before the ambient image is captured and before the flash image is captured. For example, to capture an ambient image and a flash image, an ambient metering process and a flash metering process are first performed to generate exposure parameters for capturing an ambient image and, exposure parameters for capturing a flash image. The ambient metering process and the flash metering process may be performed in either order, according to specific implementation requirements, if any. After the ambient metering process and the flash metering process have both completed, the ambient image and the flash image are captured. The ambient image and the flash image may be captured in any order; however, human factors generally favor capturing the flash image last because people tend to hold a pose only until they see a flash. By completing the metering process for both the ambient image and the flash image prior to capturing the ambient image and the flash image, any delay between the capture times for the ambient image and the flash image can be essentially eliminated.

[0040] In certain embodiments, a camera module used to capture a flash image incorporates an image sensor configured to generate two or more exposures of the same captured image. In one embodiment, the two or more exposures are generated by performing analog-to-digital conversion on analog pixel values within the image sensor pixel for the captured image according to two or more different analog gain values. In another embodiment, the two or more exposures are generated by performing concurrent sampling into two or more different analog storage planes within the image sensor. The two or more exposures may be generated using different sensitivities for each analog storage plane or different equivalent exposure times for each analog storage plane.

[0041] An analog storage plane comprises a two-dimensional array of analog storage elements, each configured to store an analog value, such as a voltage value. At least one analog storage element should be configured to store an analog value for each color channel of each pixel of the image sensor. Two analog storage planes can coexist within the same image sensor, wherein each of the two analog storage planes provides a different analog storage element for the same color channel of each pixel. In one embodiment, each analog storage element comprises a capacitor configured to integrate current from a corresponding electro-optical conversion structure, such as a pholodiode. An image sensor with two analog storage planes can capture and concurrently store two different images in analog form. The two different images may be captured sequentially or at least partially concurrently. In one embodiment, an ambient image is captured within one analog storage plane and a flash image is captured in a different analog storage plane. Each analog storage plane is sampled by an analog-to-digital converter to

generate a digital representation of an image stored as analog values within the analog storage plane.

[0042] In certain embodiments, an ambient metering process is performed to determine ambient exposure parameters for an ambient image. In addition to the ambient metering process, a flash metering process is performed to determine flash exposure parameters for a flash image. Having determined both the ambient exposure parameters and the flash exposure parameters, the photographic device captures an ambient image according to the ambient exposure parameters, and a flash image according to the flash exposure parameters. This specific sequence comprising: first metering for the ambient image and the flash image, followed by capturing the ambient image and the flash image may advantageously reduce an inter-frame time between the ambient image and the flash image by scheduling the relatively time-consuming steps associated with each metering process to be performed prior to time-critical sequential image capture steps. In one embodiment, the ambient image and the flash image are stored in different analog storage planes within a multi-capture image sensor.

[0043] In one embodiment, the ambient metering process is performed prior to the flash metering process, and the flash metering process is constrained to determining an exposure time that is less than or equal to the exposure time determined by the ambient metering process. Furthermore, the flash metering process may be constrained to determining an ISO value that is less than or equal to the ISO value determined by the ambient metering process. Together, these constraints ensure that regions of the flash image primarily lit by ambient illumination will be less intense than those lit by flash illumination, thereby generally isolating the relative effect of flash illumination in a merged image generated by combining the flash image and the ambient image. The flash metering process may vary flash duration, flash intensity, flash color, or a combination thereof, to determine flash exposure parameters that satisfy exposure goals for the flash image, such as bounding the portion or number of over-exposed pixels within the flash image.

[0044] In one embodiment, a designated image (e.g., the first image, the second image, or a combination thereof) is processed according to de-noising techniques to generate a de-noised image comprising de-noised pixels. A de-noised pixel is defined herein as a pixel selected from a designated image at a selected pixel location and processed according to a de-noising technique. The de-noised image may be stored (materialized) in a data buffer for further processing or storage within a file system. Alternatively, de-noised pixels comprising the de-noised image may be processed further before being stored in a data buffer or file system.

[0045] In one embodiment, a pixel noise estimate may be calculated and used to determine a de-noising weight for an associated pixel in a designated image to generate a corresponding de-noised pixel in a de-noised image. A given de-noising weight quantifies an amount by which a corresponding pixel is made to appear visually similar to a surrounding neighborhood of pixels, thereby reducing perceived noise associated with the pixel. A high de-noising weight indicates that a pixel should appear more like the surrounding neighborhood of pixels, while a low de-noising weight allows a pixel to remain visually distinct (e.g., in color and intensity) relative to the surrounding neighborhood of pixels. In one embodiment, de-noising weight is represented as a numeric value between 0.0 and 1.0, with higher de-noising weights indicated with values closer to 1.0 and lower de-noising weights indicated by values closer to 0.0. Other technically feasible representations of a de-noising weight may also be implemented without departing the scope of various embodiments.

[0046] In one embodiment, the designated image is an ambient image and de-noising produces a de-noised ambient image. The captured image of the photographic scene may be generated by combining the flash image with the de-noised ambient image. The flash image may be combined with the de-noised ambient image by blending the two images. In certain embodiments, blending the two images may be performed according to a mix function having a mix function weight that is calculated according to a blend surface described below in Figure 3. Alternatively, a different or similar blend surface may implement the mix function. The blend surface of Figure 3 may be used in calculating an estimated noise value for a pixel (pixel noise estimate). Alternatively, a different or similar blend surface may be used in calculating an estimated noise value for a pixel.

[0047] In another embodiment, a combined image generated by combining the flash image and the ambient image is de-noised. Any technically feasible technique may be implemented to generate the combined image, such as blending according to the blend surface of Figure 3.

[0048] In yet another embodiment, an input image is de-noised according to the techniques described herein. The input image may be the flash image, the ambient image, or an arbitrary image such as a previously generated or previously captured image.

[0049] Although certain aspects of the disclosed de-noising techniques are described in conjunction with de-noising a specific type or source of image, such as an ambient image, the techniques may be applied to de-noising other, arbitrary images. For example, in another embodiment, the designated image may be generated by combining the flash image with the ambient image (e.g. using a mix function between each flash pixel and each corresponding ambient pixel, and mix weights from the blend surface of Figure 3). A captured image of the photographic scene may be generated by de-noising the designated image. In other embodiments, the designated image may be captured by a first camera module and de-noised in conjunction with a second image, captured by a second module (with or without flash illumination), using a sequential or substantially simultaneous capture for both camera modules. In multi-camera implementations, one or more images may be a designated image to be de-noised. In still other embodiments, the designated image may include a generated HDR image or an image within an image stack, which may be associated with an HDR image. In yet other embodiments, the designated image may comprise one or more images generated by a multi-capture image sensor configured to capture two or more analog planes ( e.g., with and without flash, higher and lower ISO, or a combination thereof) of the same photographic scene. Certain embodiments implement a complete set of techniques taught herein, however other embodiments may implement a subset of these techniques. For example, certain subsets may be implemented to beneficially operate on one image rather than two images.

[0050] Each pixel in the de-noised image may be generated by performing a de-noising operation on the pixel. In one embodiment, the de-noising operation comprises blurring the pixel with neighboring pixels according to a corresponding pixel noise estimate. A pixel noise estimate threshold may be applied so that pixels with a sufficiently low estimated noise are not de-noised (not blurred). As estimated noise increases, blurring correspondingly increases according to a de-noise response function, which may be linear or non-linear. Noise in a given image may vary over the image and only those pixels with sufficiently large estimated noise are subjected to de-noising, leaving pixels with sufficiently less estimated noise untouched. In other words, only regions (e.g., pixels or groups of pixels) of the image assessed to be sufficiently noisy are subjected to a de-noising effect, while regions of the image that are not assessed to be sufficiently noisy are not subjected to de-noising and remain substantially unaltered. Determining that a pixel is sufficiently noisy may be implemented as a comparison operation of estimated noise against a quantitative noise threshold, which may be adjusted for a given implementation to correlate with a threshold for visually discernible noise. In a practical setting, a flash image provides foreground regions with low noise, while background regions tend to be out of focus and naturally blurry. Consequently, blurring out chromatic noise (commonly appears in an image as off-color speckles) in pixels with high estimated noise causes those regions to appear much more natural.

[0051] Figure 1 illustrates an exemplary method 101 for generating a de-noised pixel, in accordance with one possible embodiment. As an option, the exemplary method 101 may be implemented in the context of the details of any of the Figures. Of course, however, the exemplary method 101 may be carried out in any desired environment.

[0052] As shown, an ambient image comprising a plurality of ambient pixels and a flash image comprising a plurality of flash pixels is captured, via a camera module. See operation 103. Next, at least one de-noised pixel based on the ambient image is generated. See operation 105. Lastly, a resulting image is generated comprising a resulting pixel generated by combining the at least one de-noised pixel and a corresponding flash pixel. See operation 107.

[0053] In one embodiment, a flash image may be captured while an associated strobe unit is enabled. In the context of the present description, a de-noised pixel includes a pixel selected from a designated image at a selected pixel location that is processed according to a de-noising technique. Additionally, in the context of the present description, a noise estimate value includes a calculated and estimated noise value for a pixel.

[0054] Figure 1A illustrates a method 100 for generating a de-noised pixel comprising a digital image, according to one embodiment of the present invention. Although method 100 is described in conjunction with the systems of Figures 4A-4C, persons of ordinary skill in the art will understand that any imaging system that performs method 100 is within the scope and spirit of embodiments of the present invention. In one embodiment, a mobile device, such as mobile device 470 of Figures 4A-4C, is configured to perform method 100 to generate a de-noised pixel within a de-noised image. In certain implementations, a graphics processing unit (GPU) within the mobile device is configured to perform method 100. Alternatively, a digital signal processing (DSP) unit or digital image processing (DIP) unit may be implemented within the mobile device and configured to perform method 100. Steps 114 through 120 may be performed for each pixel comprising the de-noised image.

[0055] Method 100 begins at step 110, where the mobile device captures an ambient image and a flash image. In one embodiment, the ambient image comprises a two-dimensional array of ambient pixels and the flash image comprises a two-dimensional array of flash pixels. Furthermore, the de-noised image comprises a two-dimensional array of de-noised pixels. In certain embodiments, the ambient image, the flash image, and the de-noised image have substantially identical row and column dimensions (e.g. resolution). Additionally, in one embodiment, the ambient image may comprise a three-dimensional array of ambient pixels and the flash image may comprise a three-dimensional array of flash pixels.

[0056] In some embodiments, the ambient image and the flash image are aligned in an image alignment operation in step 110. For example, the ambient image may comprise an aligned version of an unaligned ambient image captured in conjunction with the flash image, wherein the flash image serves as an alignment reference. In another example, the flash image may comprise an aligned version of an unaligned flash image captured in conjunction with the ambient image, wherein the ambient image serves as an alignment reference. Alternatively, both the ambient image and the flash image may be co-aligned so that neither serves as the only alignment reference. Aligning the ambient image and the flash image may be performed using any technically feasible technique. In certain embodiments, the ambient image and the flash image are captured in rapid succession (e.g., with an inter-frame time of less than 50 milliseconds) within an image sensor configured to capture the two images with reduced content movement between the two images. Here, the flash image and the ambient image may still undergo alignment to fine-tune alignment, should fine-tuning be deemed necessary either by static design or by dynamic determination that alignment should be performed. In one embodiment, capturing the ambient image and the flash image may proceed according to steps 170-178 of method 106, described in Figure ID.

[0057] At step 112, the mobile device generates a patch-space ambient image from the ambient image. In one embodiment, the patch-space ambient image is a lower-resolution representation of the ambient image. For example, each pixel of the patch-space ambient image may be generated from an NxN (e.g., N=2, N=4, N=8, etc.) patch of pixels in the ambient image. In the case of N=4, each patch represents a 4-pixel by 4-pixel region, and the patch-space ambient image consequently has one fourth the resolution in each dimension of the ambient image. Any technically feasible technique may be used to generate pixels in the patch-space ambient image. For example, a simple or weighted average of corresponding 4x4 patch of ambient image pixels may be used to generate each pixel in the patch-space ambient image. The patch-space ambient image may be generated and materialized (e.g., explicitly stored in a drawing surface or texture map surface), or, alternatively, pixels comprising the patch-space ambient image may be generated when needed.

[0058] At step 114, the mobile device selects a pixel location corresponding to an ambient pixel within the ambient image and a flash pixel within the flash image. The pixel location may further correspond to a de-noised pixel within the de-noised image. In certain embodiments, the pixel location comprises two normalized coordinates, each ranging from 0.0 to 1.0, which specify a location within an associated image. At step 116, the mobile device calculates a pixel noise estimate associated with the pixel location. In one embodiment, the pixel noise estimate is calculated as a function of an intensity for the ambient pixel, an ISO value (photographic sensitivity value) associated with the ambient pixel (e.g. from ambient image metadata), and an intensity for the flash pixel. An ISO value may be selected in an exposure process for a given photographic scene and used to determine an analog gain applied to analog samples from an image sensor to generate amplified analog samples, which are then converted to corresponding digital values. In one embodiment, step 116 is implemented according to method 102, described in greater detail below in Figure IB. At step 118, the mobile device generates a de-noised pixel (e.g., a de-noised ambient pixel or a de-noised pixel generated by merging an ambient pixel and a flash pixel) based on the pixel noise estimate and an input pixel. In one embodiment, the input pixel is the ambient pixel. In another embodiment, the input pixel is generated by combining an ambient pixel and a flash pixel. In one embodiment, step 118 is implemented according to method 104, described in greater detail below in Figure 1C.

[0059] At step 120, the mobile device stores the de-noised pixel to a de-noised image. In one embodiment, the de-noised pixel may be stored in a random access memory device, configured to implement an image buffer or texture map. In another embodiment, the de-noised pixel may be stored in a file system, implemented using non-volatile memory devices such as flash memory devices. In certain embodiments, the de-noised pixel is stored in a de-noised image along with a plurality of other de-noised pixels, also generated according to method 100. In one embodiment, the de-noised pixel is generated based on the ambient pixel and the de-noised pixel is combined with the flash pixel to generate a resulting output pixel. A plurality of output pixels generated in this way may be stored in an output image, which may be displayed to a user.

[0060] In certain embodiments, steps 114 through 120 are performed for each pixel comprising the de-noised image. The selection process for a given pixel may comprise selecting a new pixel location along a row dimension and the column dimension in a rasterization pattern until each pixel location has been selected and corresponding pixels in the de-noised image have been generated. In certain embodiments, a plurality of pixels is selected for concurrent processing and steps 116 through 120 are performed concurrently on different selected pixels. For example, in a graphics processing unit, a rasterization unit may generate a plurality of fragments (select a plurality of pixel locations) associated with different corresponding pixel locations, and steps 116 through 120 are performed concurrently on the plurality of fragments to generate associated pixels.

[0061] Figure IB illustrates a method 102 for estimating noise for a pixel within a digital image, according to one embodiment of the present invention. Although method 102 is described in conjunction with the systems of Figures 4A-4C, persons of ordinary skill in the art will understand that any image processing system that performs method 102 is within the scope and spirit of embodiments of the present invention. In one embodiment, a mobile device, such as mobile device 470 of Figures 4A-4C, is configured to perform method 102 to estimate noise for a pixel within a digital image. In certain implementations, a processing unit, such as a graphics processing unit (GPU) within the mobile device is configured to perform method 102. Alternatively, a digital signal processing (DSP) unit or digital image processing (DIP) unit may be implemented within the mobile device and configured to perform method 102. Method 102 may be performed for each pixel comprising the de-noised image of Figure 1A. While embodiments discussed herein are described in conjunction with an ambient pixel, persons of ordinary skill in the art will understand that a noise estimate may be calculated for any pixel in accordance with method 102.

[0062] Method 102 begins at step 130, where a processing unit within the mobile device receives an ambient pixel, an ISO value for the ambient pixel, and a flash pixel. The ambient pixel may be received from a memory unit configured to store a captured (or aligned) ambient image, the ISO value may be stored in the memory unit as metadata associated with the ambient image, and the flash pixel may be from a memory unit configured to store a captured flash image.

[0063] At step 132, the processing unit calculates a first intermediate noise estimate (isoPsi) based on the ISO value. The first intermediate noise estimate may be calculated using the OpenGL code shown in Table 1. In this code, isoPsi ranges from a value of 0 (no noise) to a value of 1 (high noise). An image ISO value, given as ambientlso below, ranges within the standard range definition for photographic ISO values (100, 200, and so forth). In general, the isoPsi noise estimate increases with increasing ISO values. An ISO value floor, given at LI in the OpenGL code of Table 1, may define an ISO value below which image noise is considered insignificant, indicating no de-noising should be applied. An ISO ceiling, given at HI, may define an ISO value above which image noise is considered highly significant and de-noising should be applied in accordance with other factors. In one embodiment, LI is equal to an ISO value of 250 and HI is equal to an ISO value of 350. In other embodiments, LI and HI may be assigned different ISO values, based on noise performance of an associated camera module. As is known in the art, a smoothstep function receives a "left edge" (LI), a "right edge" (HI), and input value (ambientlso). The smoothstep function generates an output value of zero (0.0) for input values below the left edge value, an output value of one (1.0) for input values above the right edge, and an smoothly interpolated output value for input values between the left edge and the right edge.


[0064] At step 134, the processing unit calculates a second intermediate noise estimate (intPsi) based on the ISO value and an intensity of the ambient pixel. The second intermediate noise estimate may be calculated using the OpenGL code shown in Table 2. In this code intPsi ranges from a value of 0 (no noise) to a value of 1 (high noise). In general, the intPsi noise estimate increases with increasing ISO values and decreases with increasing ambient intensity values, given as alnt. In one embodiment, L2 is equal to an ISO value of 800, H2 is equal to an ISO value of 1600, CI is equal to a value of 0.4, C2 is equal to a value of 0.7, and C3 is equal to a value of 0.1. In other embodiments, L2, H2, CI, C2, and C3 may be assigned different values, based on noise performance of an associated camera module. Furthermore, while a constant value of 1.0 is specified in the code, a different value may be implemented as appropriate to the camera module, numeric range of intensity values, or both.


[0065] At step 136, the processing unit calculates a third intermediate noise estimate (alphaPsi) based on an intensity of the ambient pixel and an intensity of the flash pixel. For example, the third intermediate noise estimate may be calculated using the OpenGL code shown in Table 3. In this code alphaPsi ranges from a value of 0 (no noise) to a value of 1 (high noise), and a value for alpha may be calculated according to the discussion of Figure 3. In general, the value of alpha reflects a contribution of flash intensity versus ambient intensity at a selected pixel location, with a higher value of alpha indicating a higher flash contribution. In one embodiment, L4 is set to 0.4 and H4 is set to 0.5. In other embodiments, L4 and H4 may be assigned different values, based on noise performance of an associated camera module. Furthermore, while a constant value of 1.0 is specified in the code, a different value may be implemented as appropriate to the camera module, numeric range of intensity values, or both. In certain embodiments, alphaPsi is computed directly from a blend surface function configured to incorporate the smoothstep function illustrated in Table 3.


[0066] At step 138, the processing unit generates an overall pixel noise estimate (Psi) by combining the first intermediate noise estimate, the second intermediate noise estimate, and the third intermediate noise estimate. In other words, the pixel noise estimate is generated based on a pixel ISO value (e.g., for the ambient pixel), an ambient intensity value, and a flash intensity value. The first intermediate noise estimate may be calculated based on the pixel ISO value. The second intermediate noise estimate may be calculated based on the pixel ISO value and the ambient intensity value. The third intermediate noise estimate may be calculated from the ambient intensity value and the flash intensity value. In one embodiment, the combining operation may be performed as an arithmetic multiplication of the three intermediate noise estimates (Psi = isoPsi * intPsi * alphaPsi).

[0067] A final pixel noise estimate may be further defined to include additional terms. For example, a user input term received from a UI variable control element (e.g., slider, control knob, swipe gesture, etc.) may be combined (e.g. multiplied) by the pixel noise estimate for all de-noised pixels in the de-noised image to allow a user to control the strength of the de-noising effect on a given image. In another example, image features may be used to generate another noise estimation term, which may be multiplied or otherwise combined by the pixel noise estimate term. For example, if the pixel intersects a sharp edge detected in the image, the noise estimate may be reduced to reduce blurring associated with de-noising. In certain instances some noise along an edge may be preferable to a blurred edge.

[0068] Figure 1C illustrates a method 104 for generating a de-noised pixel, according to one embodiment of the present invention. Although method 104 is described in conjunction with the systems of Figures 4A-4C, persons of ordinary skill in the art will understand that any image processing system that performs method 104 is within the scope and spirit of embodiments of the present invention. In one embodiment, a mobile device, such as mobile device 470 of Figures 4A-4C, is configured to perform method 104 to generate a de-noised pixel based on an input (e.g., ambient) pixel, a noise estimate for the input pixel (e.g., as estimated by method 102), and patch-space samples associated with the input pixel. The patch-space samples may comprise a region in patch-space encompassing a coordinate in patch-space that corresponds to a coordinate in pixel space for the input pixel. In certain implementations, a processing unit, such as a graphics processing unit (GPU) within the mobile device is configured to perform method 104. Alternatively, a digital signal processing (DSP) unit or digital image processing (DIP) unit may be implemented within the mobile device and configured to perform method 104. Method 104 may be performed for each pixel comprising the de-noised image. While embodiments discussed herein are described in conjunction with an ambient pixel and an ambient image, persons of ordinary skill in the art will understand that a de-noised pixel may be generated for any type of pixel associated with any type of image in accordance with method 104.

[0069] Method 104 begins at step 150, where the processing unit receives an ambient pixel, a pixel noise estimate for the ambient pixel, and a set of surrounding patch-space samples. The pixel noise estimate may be calculated according to method 102. The patch-space samples may be generated using any resolution re-sampling technique.

[0070] If, at step 152, the noise estimate is above a predefined or pre-calculated threshold, the method proceeds to step 154, wherein the processing unit computes a patch-space weighted-sum pixel and a sum of weights contributing to the patch-space weighted-sum pixel. At step 156, the processing unit computes a de-noised pixel by scaling the patch space weighted sum pixel by the sum of weights. In one embodiment, the patch-space weighted-sum pixel comprises a vec3 of red, green, and blue components, which is divided by the sum of weights (a scalar). In another embodiment, the patch-space weighted-sum pixel comprises a vec3 of red, green, and blue components, which is multiplied by a reciprocal of the sum of weights. An opacity value of 1.0 may also be assigned to the de-noised pixel to yield a vec4 de-noised pixel. One technique for generating the patch-space weighted-sum pixel is described in greater detail in Figures 2D through 2F.

[0071] Returning to step 152, if the noise estimate is not above the threshold, then the method proceeds to step 160, where the processing unit assigns the de-noised pixel equal to the input ambient pixel. In one embodiment, the input ambient pixel comprises a vec3 of red, green, and blue components, and assigning comprises assigning corresponding components. An opacity value of 1.0 may also be assigned to the de-noised pixel to yield a vec4 de-noised pixel.

[0072] Figure ID illustrates a method 106 for capturing an ambient image and a flash image, according to one embodiment of the present invention. Although method 106 is described in conjunction with the systems of Figures 4A-4C, persons of ordinary skill in the art will understand that any imaging system that performs method 106 is within the scope and spirit of embodiments of the present invention. In one embodiment, a mobile device, such as mobile device 470 of Figures 4A-4C, is configured to perform method 106 to generate an ambient image and a flash image of a photographic scene. In certain implementations, a processor complex within the mobile device controls an associated camera module and strobe unit to perform method 106.

[0073] Method 106 begins at step 170, where the mobile device determines ambient exposure parameters for an ambient image of the scene. The ambient exposure parameters may include at least one of: exposure time, exposure sensitivity (ISO value), and lens aperture. The ambient exposure parameters may also include white balance. In one embodiment, step 170 is performed by capturing a sequence of images, each captured by a camera module within the mobile device, wherein each image is captured with a successively refined estimate for the ambient exposure parameters until an ambient exposure goal is satisfied. In step 172, the mobile device determines flash exposure parameters for a flash image of the scene. The flash exposure parameters may include at least one of: exposure time, exposure sensitivity (ISO value), and lens aperture. The flash exposure parameters may also include white balance and flash duration. The flash exposure parameters may be constrained according to at least one ambient exposure parameter. In one embodiment, the flash ISO value is constrained to be equal to or greater than the ambient ISO value, as determined in step 170. In certain embodiments, the flash exposure time is constrained to be equal to or shorter than the ambient exposure time. In one embodiment, step 172 is performed by capturing a sequence of images, each captured by a camera module within the mobile device, with a strobe unit enabled to illuminate the scene. Each image in the sequence of images is captured with a successively refined estimate for the flash exposure parameters until an exposure goal is satisfied. In one embodiment, flash duration, flash intensity, or a combination thereof is adjusted to until a flash exposure goal is satisfied.

[0074] In step 174, the mobile device captures an ambient image in accordance with the ambient exposure parameters. In step 176, the mobile device captures a flash image in accordance with the flash exposure parameters. In one embodiment, the ambient image is captured within a first analog storage plane of a multi-capture image sensor and the flash image is captured within a second analog storage plane of the multi-capture image sensor. In step 178, the mobile device stores the ambient image and the flash image within a memory subsystem of the mobile device. The memory subsystem may comprise volatile memory devices (e.g., DRAM chips) or nonvolatile memory devices (e.g., flash memory chips).

[0075] In step 180, the mobile device processes the ambient image and the flash image. In one embodiment, processing includes combining the ambient image and the flash image to generate a merged image. In another embodiment, processing includes de-noising the ambient image, the merged image, or the flash image. De-noising a given image may proceed according to Figures 1A-1C. In certain low-light scenarios, a relatively high ambient ISO value (e.g., ISO 1600 or higher) may be determined necessary to meet one or more ambient exposure goals. The relatively high ambient ISO value may result in increased ambient image noise. A lower flash ISO value may be determined to meet one or more flash exposure goals, which may naturally result in reduced flash image noise in regions of the image substantially lit by flash illumination. Therefore, in certain embodiments, processing may include combining the ambient image and the flash image to generate a merged image, as well as de-noising at least the ambient image or the merged image. Different de-noising techniques may be implemented as appropriate. In one embodiment generating de-noised pixels comprising a designated image (e.g., an ambient

image) is performed in accordance with techniques described herein in conjunction with Figures 1A-1C, and 2A-3.

[0076] In certain embodiments, the ambient image is captured at a lower resolution than the flash image. For example, the ambient image may be captured at one-half the horizontal resolution and one-half the vertical resolution. In such embodiments, reducing resolution of the ambient image has the beneficial effect of reducing overall image noise in the ambient image. In low-light settings, the ambient image may be captured at or near specified sensitivity limits of an image sensor (or camera module including the image sensor), resulting in higher overall image noise than when the image sensor is operating with more available illumination.

[0077] When the flash image is combined with the ambient image to generate the merged image, pixel data from the ambient image may be interpolated to provide additional pixels for a higher effective resolution that may be equivalent to the flash image. In the context of embodiments where a lower resolution ambient image is captured, pixels from the lower resolution ambient image may be de-noised to provide further reductions in ambient image noise. Interpolating pixels from the lower resolution ambient image to generate higher resolution ambient pixels may be performed before or after a de-noising operation. In one embodiment, resulting de-noised pixels of the same resolution as the flash image are used to generate the merged image.

[0078] In one embodiment, the ambient image is captured at a lower resolution to achieve lower overall image noise at a selected ISO value for the ambient image, and the flash image is captured at a higher resolution and a higher ISO value. With more abundant illumination provided by the flash illuminator on foreground subjects, an ISO value with lower inherent noise (lower ISO value) may be selected for the flash image. In an exemplary capture process, an image sensor (e.g., within a camera module) may be directed to capture the ambient image in a low resolution mode and also capture a flash image in a high resolution mode. In the high resolution mode, the flash image is captured at a native (physical) pixel resolution for the image sensor. In the low resolution mode, intensity or color channel signals from groups of native resolution pixels (e.g. groups of 2x2, 1x2, 2x1, 3x3, 4x4, etc. native resolution pixels) are combined to generate each low resolution pixel. Combining signals from native resolution

pixels may be performed at the analog level so that photodiode output current of each color channel of each native resolution pixel is combined into a corresponding analog sample for a color channel sample of a low resolution pixel.

[0079] In one embodiment, photodiode currents from photodiodes within a group of native resolution pixels are combined and integrated in capacitors associated with one or more of the photodiodes.

[0080] For example, in one mode of operation a group comprises a 2x2 pattern of native resolution pixels. Four photodiode currents are generated by four different photodiodes per color channel (one for each pixel in the 2x2 pattern) are combined and integrated in four corresponding analog storage circuits (one for each pixel in the 2x2 pattern). In one embodiment, four photodiode currents for a red color channel are combined and integrated within four corresponding analog storage circuits (e.g. including a capacitor to integrate current into a voltage). Green and blue color channels may be identically implemented. Such a mode of operation may provide lower overall image noise but lower resolution at an ISO value equivalent to native resolution operation.

[0081] In a second mode of operation using a 2x2 pattern of native resolution pixels, the four photodiode currents are combined and integrated in one analog storage circuits residing within one of the native resolution pixels. Such a mode of operation may allow image capture at a higher ISO value with comparable noise to native resolution operation. In the context of one embodiment, this second mode of operation may be selected to provide a higher ISO value that allows a faster shutter speed (shorter exposure time) in low light settings to reduce image blur associated with camera shake.

[0082] In certain embodiments, the ambient image is captured by combining and integrating photodiode currents from each color channel into a single intensity value per pixel. The photodiode currents may be combined from color channels associated with one pixel or a group of pixels. In one embodiment, photodiode currents associated with a 2x2 pattern of native resolution pixels are combined and integrated within one analog storage circuits residing within one of the native resolution pixels. These photodiode currents include current from red, green, and blue color channels from the 2x2 pattern of native resolution pixels. Such embodiments are operable in very low light and generate a gray scale ambient image, and may generate either a color flash image or a gray scale flash image. The gray scale ambient image may be generated with an effective sensitivity of almost sixteen (four photographic stops) times the sensitivity of a native resolution color image. In one embodiment, a lower resolution gray scale ambient image is combined with a full resolution color image to generate a merged image. A specific color may be applied to the gray scale ambient image so that ambient illumination appears, for example white/gray, beige, green or amber. Such embodiments may allow an ambient image to be captured using a much shorter (e.g., almost one sixteenth) overall exposure time than conventional techniques. A shorter overall exposure time advantageously reduces motion blur and other motion artifacts leading to a higher-quality ambient image. An associated flash image may then be combined with the ambient image to generate a merged image.

[0083] Figure 2A illustrates a computational flow 200 for generating a de-noised pixel, according to one embodiment of the present invention. Computational flow 200 illustrates one embodiment of method 100 of Figure 1A. A mobile device comprising a camera module, an electronic flash (e.g., one or more light-emitting diodes or a xenon strobe tube) and a processing unit may be configured to perform computational flow 200. At function 210, the mobile device captures a pixel-space ambient image 212 and a pixel-space flash image 214. In one embodiment, the mobile device captures an ambient image and a flash image according to method 106 of Figure ID. The ambient image is stored as pixel-space ambient image 212 and the flash image is stored as pixel-space flash image 214. A patch-space filter 220 generates a patch-space image 222 by performing any technically feasible resolution reduction operation on the pixel-space ambient image 212. Functions 216 and 218 select a pixel from their respective image source at the same, selected coordinate in both image sources. In one embodiment, functions 216 and 218 perform a simple raster scan to select pixels.

[0084] Noise estimation function 230 receives as inputs a selected ambient pixel (along with ISO metadata) and a selected flash pixel, and generates a pixel noise estimate from these these inputs. In one embodiment, the noise estimate is principally a function of the exposure conditions (e.g., ISO and intensity) for the pixels.

[0085] Pixel de-noise function 250 generates a de-noised pixel using the ambient pixel, patch-space ambient pixels sampled from the patch-space ambient image, and the pixel noise estimate as inputs. The de-noised pixel may be stored at the selected coordinate within a de-noised ambient image 252. In one embodiment, each pixel of de-noised ambient image 252 is generated according to computational flow 200. In certain embodiments, de-noised ambient image 252 may be combined with pixels-space flash image 214 to generate a merged image that may be stored and subsequently displayed.

[0086] Figure 2B illustrates a noise estimation function 230, according to one embodiment of the present invention. One embodiment of method 102 of Figure IB is illustrated as noise estimation function 230 in the form of a computational flow diagram. As shown, three intermediate noise estimate values (isoPsi, intPsi, alphaPsi) are multiplied together to generate a pixel noise estimate (Psi). In one embodiment, the isoPsi intermediate noise estimate value may be generated according to the OpenGL code of Table 1, using a smoothstep function, indicated here as an "SStep" functional block. The intPsi intermediate noise estimate value may be generated according to the OpenGL code of Table 2. The alphaPsi intermediate noise estimate value may be generated according to the OpenGL code of Table 3. An intensity value (alnt) for a pixel-space ambient pixel (PixelA) is calculated and used as one input into an alpha look-up table (LUT) function. An intensity value (flnt) for a pixel-space flash pixel (PixelF) is calculated and used as a second input to the alpha LUT function. A resulting alpha value is then passed through a smoothstep function to calculate the alphaPsi value. The alpha LUT function is described in greater detail below in Figure 3.

[0087] Figure 2C illustrates a pixel de-noise function 250, according to one embodiment of the present invention. One embodiment of method 104 of Figure 1C is illustrated as noise estimation function 250 in the form of a computational flow diagram. As shown, the pixel de-noise function receives a set of patch-space samples (PatchesA), a pixel noise estimate (Psi), and a pixel-space ambient pixel as input and generates a de-noised pixel as output. In one embodiment, patch-space samples comprise lower resolution samples of the image associated with the pixel-space ambient pixel. Patch-space samples may be associated with a pixel-space pixel based on relative position (e.g., normalized coordinates ranging from 0.0 to 1.0) within the image. Each patch-space sample may be similar to, and representative of a small neighborhood of pixels comprising a patch. A de-noise operation may be performed by sampling a surrounding neighborhood of patch-space samples associated with an input pixel to generate a de-noised pixel that is similar to neighboring pixels. Using patch-space samples advantageously reduces computation associated with generating a de-noised pixel by pre-computing neighboring pixel similarity in the form of a patch-space sample. However, in certain embodiments, neighboring pixel similarity may be computed as needed for each input pixel.

[0088] In one embodiment, if Psi is below a threshold, Tl, then the de-noised pixel is set equal to input PixelA. Otherwise, the de-noised pixel is computed from a weighted sum of pixels scaled according to a sum of corresponding weights, with the result clamped between 0.0 and a maximum color channel intensity value (e.g. 1.0). Consequently, a resulting de-noised pixel may vary from being an exact numeric copy of PixelA if Psi is below threshold Tl, and a weighted sum of neighboring pixels. The threshold Tl may be assigned value based on camera module noise performance. In one embodiment, Tl is set to 0.3. Computing the patch-space weighted sum sample and sum of weights is described in greater detail below.

[0089] Figure 2D illustrates patch-space samples organized around a central region, according to one embodiment of the present invention. As shown, eight patch-space samples form a substantially circular region about a center. The center may be located according to coordinates of the pixel-space pixel (input PixelA) of Figure 2B-2C. The patch-space samples may be generated from a patch-space image using any technically feasible technique, such as bilinear sampling, that provides for substantially arbitrary placement of sample coordinates between discrete samples in patch-space.

[0090] Figure 2E illustrates patch-space regions organized around a center, according to one embodiment of the present invention. The patch-space regions may be organized in ranks as an outer rank, a mid rank, an inner rank, and a center. In one embodiment, eight samples are generated for each rank, as illustrated above in Figure 2D.

[0091] Figure 2F illustrates a constellation of patch-space samples around a center position, according to one embodiment of the present invention. As shown, eight sample positions for each rank are positioned in patch-space in a ring.

[0092] In one embodiment, a weight is calculated for each rank and each sample on a given rank contributes a correspondingly weighted value to the patch-space weighted sum sample of Figure 2C. The sum of weights corresponds to a sum of all weights associated with samples contributing to the patch-space weighted sum sample. A center sample may be included in the patch-space weighted sum sample. The center sample may have an independent center weight. The center sample weight is added to the sum of weights. The center weight and rank weights may be calculated for each de-noised pixel. In certain implementations, the center weight is larger than an inner rank weight; the inner rank weight is larger than the mid rank weight; and, the mid rank weight is larger than the outer rank weight. The weights may be varied according to pixel noise estimate, Psi.

[0093] In one embodiment, the constellation as shown in Figure 2F depicts a contribution zone around a pixel point. In one embodiment, the contribution zone may be manipulated (e.g. increased/decreased, etc.) to control the contribution of surrounding pixels, the weight of each surrounding sample in the constellation being determined as a function of estimated image noise at the pixel point, and optionally through a user input parameter (e.g., through a user interface slider control). For example, the greater an estimated noise at the pixel point, the greater the weight of mid and outer ranks. In regions of an image where estimated noise is high, the estimated noise values should vary relatively slowly over a span of many pixels (many tens of pixels), meaning the overall visual effect of de-noising scene content should remain consistent and change only slightly in response to small scene changes or camera movement. Consequently, the above technique for de-noising may generally provide stable, consistent appearance for de-noised scene content through multiple frames, such as multiple video frames.

[0094] Figure 2G illustrates relative weights for different ranks in a patch-space constellation, according to one embodiment of the present invention. As shown, when pixel noise estimate Psi is smaller, the inner, mid, and outer ranks may be assigned lower weights. When Psi is larger, the inner, mid, and outer ranks may be assigned higher weights. Samples at each angular position (top mid, top right, etc.) around the constellation of Figure 2F may be weighted with the same weight, or a weight that is relatively higher or lower than other samples in the same rank, as a function of image content. Each rank and angle weight may be calculated independently to contribute to an overall patch-space weighted sum sample. In certain embodiments, image content determines sample weights for each angular position within a given rank. For example, an edge running through or along the center position should be preserved, even for pixels with high estimated noise. In such an instance, weights of samples that are more similar in color to the path of the edge closest to intersecting the center may be assigned higher weights, while dissimilar samples may be assigned low weights. Such weights may follow an overall scheme that adheres to the concentric rank weights, but is further refined to preserve a distinct edge. Various techniques may be implemented to detect similarity between a center sample and other patch-space samples within the constellation. In particular, techniques that preserve larger image patterns such as edge detection may be implemented to selectively assign weights to constellation samples.

[0095] In one embodiment, an edge detection pass is performed to generate an edge-enhanced image of the ambient image. The edge-enhanced image may be a single channel (gray scale) image where higher intensity indicates a more distinct edge, while lower intensity indicates a lack of a distinct edge. In regions where a more distinct edge is present, samples along the edge should be assigned higher weights, while samples not associated with an edge should be assigned lower weights. Alternatively, samples within the constellation having similar color and intensity to a representative (e.g., average, media, or other) color associated with samples along the edge should be assigned higher weights, while dissimilar samples may be assigned lower weights. For example, higher weights could range from 0.5 to 1.0 and lower weights could range from 0.0 to 0.5.

[0096] Figure 2H illustrates assigning sample weights based on detected image features, according to one embodiment. In certain embodiments, different samples in the same rank (within the same ring) are assigned different weights to better preserve detected image features. In one embodiment, if the center sample is positioned in close proximity to (e.g., intersecting or within a few pixels of intersecting) a detected edge (e.g., as indicted by higher intensity values in a corresponding edge-enhanced image) in an image being de-noised, then weights of samples that are close to the edge (e.g., si at distance dl) may be calculated to be higher than weights of samples that are further from the edge (e.g., s2 at distance d2). In one embodiment, weights

may be calculated to be an inverse function of proximity to the edge so that sample si with distance dl from the edge is assigned a higher weight than sample s2 with a larger distance d2 from the edge. Weighting samples according to similarity along an edge as discussed in Figure 2G or based on proximity to an edge as discussed here in Figure 2H may be implemented to preserve edges and texture of an image being de-noised by distinguishing identifiable image features from noise.

Generating Alpha

[0097] Figure 3 illustrates a blend surface 304 for blending two pixels, according to another embodiment of the present invention. Blend surface 304 comprises a flash dominant region 352 and an ambient dominant region 350 within a coordinate system defined by an axis for each of ambient intensity 324, flash intensity 314, and an alpha value 344.

[0098] As shown, upward curvature at the origin (0,0) and at (1,1) may be included within the ambient dominant region 350, and downward curvature at (0,0) and (1,1) may be included within the flash dominant region 352. As a consequence, a smoother transition may be observed for very bright and very dark regions, where color may be less stable and may diverge between a flash image and an ambient image. Upward curvature may be included within the ambient dominant region 350 along diagonal 351 and corresponding downward curvature may be included within the flash dominant region 352 along diagonal 351.

[0099] In certain embodiments, downward curvature may be included within ambient dominant region 350 at (1,0), or along a portion of the axis for ambient intensity 324. Such downward curvature may have the effect of shifting the weight of mix operation 346 to favor ambient pixel 322 when a corresponding flash pixel 312 has very low intensity.

[00100] In one embodiment, a blend surface 304, is pre-computed and stored as a texture map that is established as an input to a fragment shader configured to implement step 136 of method 102. A surface function that describes a blend surface having an ambient dominant region 350 and a flash dominant region 352 may be implemented to generate and store the texture map. The surface function may be implemented on a CPU core or a GPU core, or a combination thereof of cores residing within processor complex 410 of Figure 4C. The

fragment shader executing on a GPU core may use the texture map as a lookup table implementation of the surface function. In alternative embodiments, the fragment shader implements the surface function and computes an alpha value 344 as needed for each combination of a flash intensity 314 and an ambient intensity 324. One exemplary surface function that may be used to compute an alpha value 344 (alphaValue) given an ambient intensity 324 (ambient) and a flash intensity 314 (flash) is illustrated below as pseudo-code in Table 4. A constant "e" is set to a value that is relatively small, such as a fraction of a quantization step for ambient or flash intensity, to avoid dividing by zero. Height 355 corresponds to constant 0.125 divided by 3.0.


[00101] In certain embodiments, the blend surface is dynamically configured based on image properties associated with a given flash image and associated ambient image. Dynamic configuration of the blend surface may include, without limitation, altering one or more of heights 354 through 359, altering curvature associated with one or more of heights 354 through 359, altering curvature along diagonal 351 for ambient dominant region 350, altering curvature along diagonal 351 for flash dominant region 352, or any combination thereof.

[00102] One embodiment of dynamic configuration of a blend surface involves adjusting heights associated with the surface discontinuity along diagonal 351. Certain images disproportionately include gradient regions having flash pixels and ambient pixels of similar or identical intensity. Regions comprising such pixels may generally appear more natural as the surface discontinuity along diagonal 351 is reduced. Such images may be detected using a heat-map of ambient intensity 324 and flash intensity 314 pairs within a surface defined by ambient intensity 324 and flash intensity 314. Clustering along diagonal 351 within the heat-map indicates a large incidence of flash pixels and ambient pixels having similar intensity within an associated scene. In one embodiment, clustering along diagonal 351 within the heat-map indicates that the blend surface should be dynamically configured to reduce the height of the discontinuity along diagonal 351. Reducing the height of the discontinuity along diagonal 351 may be implemented by adding downward curvature to flash dominant region 352 along diagonal 351, adding upward curvature to ambient dominant region 350 along diagonal 351, reducing height 358, reducing height 356, or any combination thereof. Any technically feasible technique may be implemented to adjust curvature and height values without departing the scope and spirit of the present invention. Furthermore, any region of blend surface 304 may be dynamically adjusted in response to image characteristics without departing the scope of the present invention.

[00103] In one embodiment, dynamic configuration of the blend surface comprises mixing blend values from two or more pre-computed lookup tables implemented as texture maps. For example, a first blend surface may reflect a relatively large discontinuity and relatively large values for heights 356 and 358, while a second blend surface may reflect a relatively small discontinuity and relatively small values for height 356 and 358. Here, blend surface 304 may be dynamically configured as a weighted sum of blend values from the first blend surface and the second blend surface. Weighting may be determined based on certain image characteristics, such as clustering of flash intensity 314 and ambient intensity 324 pairs in certain regions within the surface defined by flash intensity 314 and ambient intensity 324, or certain histogram attributes for the flash image and the ambient image. In one embodiment, dynamic configuration of one or more aspects of the blend surface, such as discontinuity height, may be adjusted according to direct user input, such as via a UI tool.

System Overview

[00104] Figure 4A illustrates a front view of a mobile device 470 comprising a display unit 412, according to one embodiment of the present invention. Display unit 412 is configured to display digital photographs and user interface (UI) elements associated with software applications that may execute on mobile device 470. The digital photographs may include digital images captured or otherwise generated by the mobile device 470, digital images transmitted to the mobile device 470, or any combination thereof. As shown, mobile device 470 may include a user-facing (back-facing) camera 472, with a lens configured to face back towards a user; that is, the lens may face the same direction that display unit 412 is configured to face. User-facing camera 472 may also be referred to as a "selfie" camera. Mobile device 470 may also include a user-facing strobe unit 474, configured to provide illumination in the same direction as user-facing camera 472, thereby providing strobe illumination for taking a "selfie" picture. User facing camera 472 may capture images with or without strobe illumination. Furthermore, the images may be captured with a combination of both strobe illumination and no strobe illumination. In certain embodiments, display unit 412 may be configured to provide strobe illumination and/or augment strobe illumination from user-facing strobe unit 474. In certain embodiments, mobile device 470 may include two or more user-facing cameras that are configured to capture one or more images each; these images may be stored within an image stack and fused to generate a merged image. One or more of the images may be de-noised, such as according to the de-noising techniques of Figures 2A-2H. For example, in one embodiment, an ambient image is captured using one or more of the two or more user-facing cameras, and a flash image is captured using one or more of the two or more user-facing cameras. The ambient image may be de-noised using any technically feasible technique, and merged with the flash image to generate a merged image. The merged image may comprise a final image the user may view, save, share, or otherwise utilize. Alternatively, the merged image rather than the ambient image may be de-noised.

[00105] Figure 4B illustrates a back view of mobile device 470 comprising a front-facing camera 476 and a front-facing strobe unit 478, according to one embodiment of the present invention. Front-facing camera 476 and front-facing strobe 478 may both face in a direction that is opposite to that of display unit 412 and/or user-facing camera 472. The front-facing camera 476 and front-facing strobe unit 478 may operate as described previously regarding user-facing camera 472 and user-facing strobe unit 474, respectively.

[00106] Figure 4C illustrates a block diagram of mobile device 470, according to one embodiment of the present invention. As shown, mobile device 470 includes a processor complex 410 coupled to display unit 412. Mobile device 470 may also include, without limitation, a camera module 430, a strobe (flash) unit 436, a set of input/output devices 414, non-volatile memory 416, volatile memory 418, a wireless unit 440, and sensor devices 442, each coupled to processor complex 410. In one embodiment, a power management subsystem 420 is configured to generate appropriate power supply voltages for each electrical load element within mobile device 470, and a battery 422 is configured to supply electrical energy to power management subsystem 420. Battery 422 may implement any technically feasible battery, including primary or rechargeable battery technologies. Alternatively, battery 422 may be implemented as a fuel cell, or high capacity electrical capacitor.

[00107] In one usage scenario, strobe (flash) illumination 437 comprises at least a portion of overall illumination in a scene being photographed by camera module 430. Optical scene information 439, which may include strobe illumination 437 reflected from objects in the scene, is focused onto an image sensor 432 as an optical image. Image sensor 432, within camera module 430, generates an electronic representation of the optical image. The electronic representation comprises spatial color intensity information, which may include different color intensity samples for red, green, and blue light.

[00108] Display unit 412 is configured to display a two-dimensional array of pixels comprising a digital image. Display unit 412 may comprise a liquid-crystal display, an organic LED display, or any other technically feasible type of display. Input/output devices 414 may include, without limitation, a capacitive touch input surface, buttons, knobs, or any other technically feasible device or devices for receiving user input and converting the input to electrical signals. Input/output devices 414 may also comprise components for converting electrical signals to human-perceptible signals. For example, Input/output devices 414 may include an audio speaker. In one embodiment, display unit 412 and a capacitive touch input surface are manufactured together to form a touch entry display system.

[00109] Non-volatile (NV) memory 416 is configured to store data when power is interrupted. The NV memory 416 therefore implements a non-transitory computer-readable medium. In one embodiment, NV memory 416 comprises one or more flash memory devices. NV memory 416 may be configured to include programming instructions for execution by one or more processing units within processor complex 410. The programming instructions may include, without limitation, an operating system (OS), user interface (UI) modules, imaging processing and storage modules, and modules implementing one or more embodiments of techniques taught herein. In particular, the NV memory 416 may be configured to store instructions that implement method 100 of Figure 1A and method 102 of Figure IB. The instructions, when executed by processing units within processor complex 410, cause the processing units to perform these methods. One or more memory devices comprising NV memory 416 may be packaged as a module that can be installed or removed by a user. In one embodiment, volatile memory 418 comprises dynamic random access memory (DRAM) configured to temporarily store programming instructions, image data, and the like needed during the course of normal operation of mobile device 470.

[00110] Sensor devices 442 include sensors configured to detect at least device orientation of the mobile device 470. For example, sensor devices 442 may include an accelerometer to detect motion and orientation, an electronic gyroscope to detect motion and orientation, or a combination thereof. Sensor devices 442 may also include, without limitation, a magnetic flux detector to detect orientation, a global positioning system (GPS) module to detect geographic position, or any combination thereof.

[00111] Wireless unit 440 may include one or more digital radios configured to send and receive digital data. In particular, wireless unit 440 may implement wireless standards known in the art as "WiFi" based on institute for electrical and electronics engineers (IEEE) standard 802.11, and may implement digital cellular telephony standards for data communication such as the well-known "3G" and long term evolution ("LTE"), or "4G" suites of standards. In one embodiment, mobile device 470 is configured to transmit one or more digital photographs residing within either NV memory 416 or volatile memory 418 to an online photographic media service via wireless unit 440. In such an embodiment, a user may possess credentials to access the online photographic media service and to transmit the one or more digital photographs for storage and presentation by the online photographic media service. The credentials may be stored or generated within mobile device 470 prior to transmission of the digital photographs. The online photographic media service may comprise a social networking service, photograph sharing service, or any other web-based service that provides storage and download of digital photographs. In certain embodiments, mobile device 470 is configured to receive one or more incoming digital photographs via wireless unit 440, and store the incoming digital photographs in the NV memory 416, or the volatile memory 418, or a combination thereof.

[00112] In certain embodiments, a non-transitory computer-readable medium is configured to store programming instructions that, when executed by a processer, perform the methods described herein. Specifically, the programming instructions direct one or more processing units within processor complex 410 to perform methods 100, 102, 104, 106, or any combination thereof. The non-transitory computer-readable medium should include instructions to direct camera module 430 and strobe unit 436 to capture an ambient image and a flash image, according to methods 100 and 106. The non-transitory computer-readable medium should include instructions to direct a specialized multi-threaded processing unit, such as a graphics processing unit (GPU) or digital signal processing unit (DSP) to perform methods 102 and 104 to de-noise the ambient image or an image generated by combining the ambient image and the flash image.

[00113] In one embodiment, camera module 430 implements user-facing camera 472 and strobe unit 436 implements user-facing strobe unit 474. In another embodiment camera module 430 implements user-facing camera 476 and strobe unit 436 implements user-facing strobe unit 478. In certain embodiments, mobile device 470 may include two or more instances each of camera module 430 and one or more instance of strobe unit 436. For example, mobile device 470 may include one instance of camera module 430 in a user-facing configuration (e.g. user-facing camera 472) and two different instances of camera modules 430 in a front-facing configuration (two front-facing cameras 476). Similarly, mobile device 470 may include an instance of strobe unit 436 in a user-facing configuration (e.g., user-facing strobe unit 474) and a different instance of strobe unit 436 in a front-facing configuration (front-facing strobe unit 478).

[00114] In certain embodiments, two or more instances of mobile device 470 may communicate to generate temporally-coordinated flash illumination using corresponding instances of a strobe unit 436. In such an embodiment, at least one instance of strobe unit 436 is included within each of the two or more mobile devices 470, and the two or more strobe units 436 are enabled concurrently, and at least one image is captured by one or more of the two or

more mobile devices 470 while two strobe units 436 are enabled. Furthermore, at least one image is captured by one or more of the two or more mobile devices 470 while two strobe units 436 are disabled. A merged image may be generated by fusing at least one image captured while the strobe units are enabled (flash image) with at least one image captured while the strobe units are disabled (ambient image). Furthermore, the ambient image may be de-noised prior to being fused with a flash image. Alternatively, or additionally, the fused image may be de-noised. Any technically feasible de-noising technique may be applied to the ambient image and/or fused image. For example, in one embodiment, the de-noising techniques of Figures 2A-2H are applied to the ambient image prior to being fused with the flash image.

[00115] In one embodiment, mobile device 470 is configured to sample images in visible and infrared wavelengths. For example, mobile device 470 may include two or more different camera modules 430, with each configured to be sensitive to different photonic wavelength ranges. Furthermore, mobile device 470 may include two front-facing camera modules 430, with a first of the two camera modules 430 conventionally sensitive to at least visible light and a second of the two camera modules 430 sensitive to at least infrared (IR) light. In such an embodiment, the second camera module 430 may be sensitive to near infrared (NIR) light in at least a portion of the range 0.75 to 1.4 microns, and/or sensitive to short-wave infrared light (SWIR) light in at least a portion of the range 1.4 - 3.0 microns. Alternatively, one or more of the two camera modules may be sensitive to both visible light and IR light. A front-facing strobe unit 478 may be configured to generate NIR light, SWIR light, visible light, or a combination thereof. The mobile device 470 may sample a set of images comprising an IR (e.g., NIR, SWIR) image, a visible light image, or a combination thereof. The mobile device 470 may fuse at least two of the images to generate a merged image.

[00116] In one embodiment, front-facing strobe unit 478 generates IR (e.g., NIR, SWIR) strobe illumination and visible illumination concurrently. Furthermore, an IR image captured using the IR strobe illumination may provide an intensity image, while a visible light image generated using visible strobe illumination may provide color data that is fused with the intensity image to generate a merged image. In such an embodiment, the visible strobe illumination may have a relatively low intensity because only per-pixel color information that may be independent of intensity information is needed. Furthermore, per-pixel intensity information may be provided, at least in part, by the IR image. A fused image that combines color information and intensity information may yield an image having a natural color appearance, but with a lower requirement of visible flash intensity during capture. Such an embodiment may advantageously provide superior flash images in low light-settings without unpleasantly bright visible flash illumination hitting photographic subjects. In certain embodiments, an IR image provides a portion of intensity information and a visible light image also provides a portion of intensity information. Determining each portion may be computed per pixel or per scene, or determined by a user interacting with a UI control. At each pixel, an intensity value may be generated based on both IR and visible intensity information.

[00117] Of course, in another embodiment, an IR image captured using the IR strobe illumination may provide information associated with intensity, sharpness, one or more points of focus, and/or brightness, any of which may be fused with a visible image to create a merged image.

[00118] In certain embodiments, an image sensor implements an RGB-IR color sensitivity pattern and the IR image and the visible light image may be sampled using the same image sensor within camera module 430.

[00119] In one embodiment, a UI slider control is provided to allow the user to control a contribution of the IR image to a merged image. Furthermore, a UI slider control may be provide to allow the user to control an overall flash contribution to the merged image. Any combination of such sliders may also be provided.

[00120] Figure 5 illustrates an exemplary method 500 for generating a de-noised pixel based on a plurality of camera modules, in accordance with one possible embodiment. As an option, the exemplary method 500 may be implemented in the context of the details of any of the Figures. Of course, however, the exemplary method 500 may be carried out in any desired environment. For example, method 500 may be carried out by a mobile device such as a smartphone or a stand-alone digital camera, each configured to include the plurality of camera modules. Furthermore, the plurality of camera modules may be configured to operate with one or more flash illumination modules.

[00121] Step 502 shows capturing, via a plurality of camera modules, at least one ambient image comprising at least one ambient pixel and at least one flash image comprising at least one flash pixel. Next, at least one de-noised pixel is generated based on the at least one ambient image for each of the plurality of camera modules. See step 504. Lastly, a resulting image is generated comprising a resulting pixel generated by combining the at least one de-noised pixel and a corresponding flash pixel. See step 506.

[00122] In one embodiment, a plurality of camera modules may be found within one device (e.g. multiple circuits, etc.). In another embodiment, a plurality of camera modules may be found in more than one device (e.g. within a smartphone and within a tablet, etc.).

[00123] Further, in one embodiment, exposure may be harmonized between a plurality of camera modules, wherein the harmonizing includes normalizing the pixel intensity between one camera module and another, synchronizing capture time, and the like. In some embodiments, the pixel intensity may be based on a specific pixel (and corresponding pixel on other camera modules, etc.), on a grouping of pixels, on a histogram point (e.g. brightest/darkest point, etc.), exposure parameters, etc. Still yet, in another embodiment, exposure may be dependent on multi-metering. For example, spot, center, average, or partial metering may be used to determine the exposure for the captured image. Further, multiple points may be used when metering. For example, an object (e.g. face, etc.) in the foreground may be metered in addition to an object (e.g. tree, etc.) in the background. In each case, metering may be performed with any of the above described exposure goals and, optionally, implemented using any technically feasible metering techniques.

[00124] Further, multiple captures may be performed for each ambient image and each flash image. For example, in one embodiment, an ambient image may be captured at t=0 and a flash image may be captured at 1=1, and multiple images may be captured between t=0 and t=l such that as the flash is being increased/ramped up, or otherwise modulated while the multiple images are sequentially and/or concurrently captured. Again, in each case, metering may be performed with any of the above described exposure goals. In one embodiment, a de-noise operation may be performed on one or more of the ambient images captured by the plurality of

camera modules. The de-noise operation generates corresponding de-noised images. One or more of the de-noised images may be combined with corresponding flash images captured by one or more camera modules of the plurality of camera modules to generate one or more merged images.

[00125] In certain embodiments, two or more ambient images are captured by a set of two or more camera modules, with each ambient image captured according to different exposure parameters. The two or more ambient images may be combined to generate an HDR ambient image. In certain embodiments, the HDR ambient image is one of a plurality of frames of HDR video, with additional frames similarly generated. In Other embodiments, two or more flash images are captured by two or more camera modules, which may comprise the set of two or more camera modules. In one embodiment, the two or more flash images are combined to generate an HDR flash image. In certain embodiments, the HDR flash image is one of a plurality of frames of an HDR video. In certain embodiments the HDR ambient image and the HDR flash image are combined to generate an HDR merged image. In one embodiment the HDR merged image is one of a plurality of frames of HDR merged video.

[00126] In certain embodiments, the camera subsystem of a mobile device is configured to take a flash photo by default in most indoors and low-light settings, unless otherwise directed to not take a flash photo. However, certain venues where a user may be inclined to take a photo (e.g., restaurants, museums, art galleries, and the like) may have no flash policies in place that direct guests to not use their camera flash. Certain embodiments address this constraint on the use of flash photography by determining whether a venue associated with a current device location has a no flash policy. For example, the mobile device may be configured to perform a geolocale operation to determine the current location of the device and a geolocalion query to determine whether the venue has a no flash policy. The geolocate operation may be performed using any technique or combination of techniques, such as global positioning satellite (GPS) location, cellular tower triangulation, and the like. The geolocation query may be performed using any technically feasible technique that retrieves location-based information. In one embodiment, the location-based information includes at least a status flag for the venue that indicates whether the venue has a no flash policy. Alternatively, a wireless transmission device, such as a WiFi access point, located on or near the premises may be configured to advertise a flag that indicates whether the venue has a no flash policy. In such an embodiment, the mobile device is configured to detect the flag indicating a no flash policy. More generally, the wireless transmission device may be configured to advertise other venue-specific policies such as no outgoing cellular phone calls, no speaker phone calls, no music played through a device's speaker, etc. The wireless transmission device may be configured to advertise such policies through an administrative webpage, physical control inputs on the transmission device, and the like.

[00127] In certain embodiments, a user asserts a shutter release action (e.g., presses a virtual button on a UI interface) and the mobile device 470 initiates an image capture sequence to capture an ambient image and a flash image. In one embodiment, the capture sequence includes monitoring an accelerometer and/or electronic gyroscope to estimate when camera motion is at a minimum prior to capturing final ambient and flash images. In this way, the user may, in certain cases, perceive a modestly increased shutter lag, but a resulting image may be crisper overall, having had the benefit of less camera motion during at least a portion of the ambient, and/or flash exposures. In certain embodiments, camera module 430 and processor complex 410 may coordinate functions to perform exposure metering and focus operations while waiting for a time when camera motion is at a minimum.

[00128] While the techniques disclosed herein are described in conjunction with a mobile device, persons skilled in the art will recognize that any digital imaging system comprising a digital camera (camera module), digital display, and signal processing resources may be configured to implement the techniques.

[00129] While the foregoing is directed to embodiments of the present invention, other and further embodiments of the invention may be devised without departing from the basic scope thereof, and the scope thereof is determined by the claims that follow.