Merging multiple exposures to generate a high dynamic range image
A method of generating a high dynamic range (HDR) image is provided that includes capturing a long exposure image and a short exposure image of a scene, computing a merging weight for each pixel location of the long exposure image based on a pixel value of the pixel location and a saturation threshold, and computing a pixel value for each pixel location of the HDR image as a weighted sum of corresponding pixel values in the long exposure image and the short exposure image, wherein a weight applied to a pixel value of the pixel location of the short exposure image and a weight applied to a pixel value of the pixel location in the pixel long exposure image are determined based on the merging weight computed for the pixel location and responsive to motion in a scene of the long exposure image and the short exposure image.
1 . A system comprising:
an image sensor configurable to output a first signal having first pixel values of a long exposure image of a scene and a second signal having second pixel values of a short exposure image of the scene; and
an image signal processing circuit coupled to the image sensor to receive the first signal and the second signal,
wherein the image signal processing circuit is operable to:
determine a first per-pixel weight based on a difference of luminance of a pixel of the long exposure image and a corresponding pixel of the short exposure image, wherein the first per-pixel weight is not a block-based weight; and
generate a high dynamic range (HDR) image of n-bit data by merging the first pixel values with the first per-pixel weight and the second pixel values with a second per-pixel weight, and
wherein the image signal processing circuit is further operable to convert the HDR image of n-bit data to an HDR image of m-bit data with performing tone mapping by using a look-up table, wherein m is smaller than n.
2 . The system of claim 1 , wherein a ratio of exposure time of the long exposure image to exposure time of the short exposure image is set to power of two.
3 . The system of claim 1 , wherein a ratio of exposure time of the long exposure image to exposure time of the short exposure image is set to 16.
4 . The system of claim 1 , wherein the image signal processing circuit is further operable to adjust a gain difference between the long exposure image and the short exposure image.
5 . The system of claim 4 , wherein the gain difference is adjusted based on a difference of exposure time between the long exposure image and the short exposure image.
6 . The system of claim 1 , wherein the image signal processing circuit is further operable to perform different tone mappings on blocks in the HDR image of n-bit data based on the luminance of the blocks.
7 . The system of claim 1 , wherein the image signal processing circuit is further operable to apply different gains to blocks in the HDR image of n-bit data based on the luminance of the blocks.
8 . The system of claim 7 , wherein at least a first gain applied to a first block of the blocks is set to a higher value than a second gain applied to a second block of the blocks when the luminance of the first block is lower than the luminance of the second block.
9 . The system of claim 1 , wherein the first pixel values and the second pixel values include RBayer component, BBayer component, GrBayer component and GbBayer component.
10 . The system of claim 9 , wherein the image signal processing circuit is further operable to convert the HDR image of m-bit data to RGB format.
11 . The system of claim 1 , wherein the first per-pixel weight decreases when the difference of luminance increases at least in a part of a range of the difference of luminance.
12 . The system of claim 1 , wherein the image signal processing circuit is operable to determine the second per-pixel weight based on the first per-pixel weight.
13 . The system of claim 1 , wherein the image signal processing circuit is configured to determine the first per-pixel weight based on:
a luminance of the pixel of the long exposure image; and
the difference of luminance of the pixel of the long exposure image and the corresponding pixel of the short exposure image.