This application claims the benefit of provisional patent application No. 61/544,240, filed Oct. 6, 2011 which is hereby incorporated by reference herein in its entirety.
The present invention relates to imaging devices and, more particularly, to high-dynamic-range imaging systems.
Image sensors are commonly used in electronic devices such as cellular telephones, cameras, and computers to capture images. In a typical arrangement, an electronic device is provided with an image sensor having an array of image pixels and a corresponding lens. Some electronic devices use arrays of image sensors and arrays of corresponding lenses.
In certain applications, it may be desirable to capture high-dynamic range images. While highlight and shadow detail may be lost using a conventional image sensor, highlight and shadow detail may be retained using image sensors with high-dynamic-range imaging capabilities.
Common high-dynamic-range (HDR) imaging systems use a multiple exposure (ME) image capture method. In a ME method, multiple images are captured by the image sensor, each image having a different exposure time. Short-exposure images may retain shadow detail while long-exposure images may retain highlight detail. In a typical device, image pixel values from short-exposure images and long-exposure images are selected to create an HDR image.
When combining sequentially captured images to form HDR images using conventional multiple exposure HDR image combination methods, changes in position of moving objects in the multiple images can result in motion artifacts in the combined HDR image.
It would therefore be desirable to provide improved imaging systems with motion-compensation capabilities for high-dynamic-range imaging.
Imaging systems are widely used in electronic devices such as digital cameras, computers, cellular telephones, and other electronic devices. These electronic devices may include image sensors that gather incoming light to capture an image. The image sensors may include at least one image pixel array. The pixels in the image pixel array may include photosensitive elements such as photodiodes that convert the incoming light into digital data. Image sensors may have any number of pixels (e.g., hundreds or thousands or more). A typical image sensor may, for example, have hundreds of thousands or millions of pixels (e.g., megapixels).
Processing circuitry 18 may include one or more integrated circuits (e.g., image processing circuits, microprocessors, storage devices such as random-access memory and non-volatile memory, etc.) and may be implemented using components that are separate from image sensor 16 and/or that form part of image sensor 16 (e.g., circuits that form part of an integrated circuit that controls or reads pixel signals from image pixels in an image pixel array on image sensor 16 or an integrated circuit within image sensor 16). Image data that has been captured by image sensor 16 may be processed and stored using processing circuitry 18. Processed image data may, if desired, be provided to external equipment (e.g., a computer or other device) using wired and/or wireless communications paths coupled to processing circuitry 18.
The dynamic range of an image may be defined as the luminance ratio of the brightest element in a given scene to the darkest element the given scene. Typically, cameras and other imaging devices capture images having a dynamic range that is smaller than that of real-world scenes. High-dynamic-range (HDR) imaging systems are therefore often used to capture representative images of scenes that have regions with high contrast, such as scenes that have portions in bright sunlight and portions in dark shadows.
An image may be considered an HDR image if it has been generated using imaging processes or software processing designed to increase dynamic range. As an example, HDR images may be captured by a digital camera using a multiple integration (or multiple exposure (ME)) process. In a multiple exposure process, multiple images (sometimes referred to as image frames) of the same scene may be captured using different exposure (or integration) times. A short-exposure image captured during a short integration time may better capture details of brightly lit portions of the scene, whereas a long-exposure image captured during a relatively longer integration time may better capture details of dark portions of the scene. The short-exposure and long-exposure images may be combined into a composite HDR image that accurately represents the brightly lit as well as the dark portions of the image.
When capturing HDR images using ME imaging methods, or any HDR imaging system using sequentially captured images, a moving object or stationary objects in a scene captured by a moving (e.g., shaking) camera will often be registered at different pixel positions in each image. When the images are combined using conventional multiple exposure HDR image combination methods, the discrepancy in position and/or shape of a moving object in the multiple exposures can result in motion artifacts in the combined HDR image. Common ME imaging systems use a Bayer color filter patterned image sensor. In high-dynamic-range imaging systems having an image sensor with an image pixel array with a Bayer pattern color filter, motion artifacts such as mis-registered objects can include color distortion of objects as well as positional distortions in combined HDR images.
In order to reduce these types of motion artifact, device 10 may include a motion-compensating high-dynamic-range image processing engine such as image processing engine 20 of
Each image (or image frame) may include regions of high light such as high light region 22, regions of low light such as low light region 24, regions including edges of objects such as edge region 26, and regions including moving objects such as motion region 28. Image processing engine 20 may be used to identify image pixels that make up regions 22, 24, 26, and/or 28 in each image. Image processing engine 20 may use image pixel values from image pixels in identified regions 22, 24, 26, and 28 in forming motion-compensated HDR image 30.
Regions 22, 24, 26, and 28 are shown as separate portions of images 1 and 2. However, this is merely illustrative. Regions 22, 24, 26, and/or 28 may be separate regions of an image or may be overlapping or partially overlapping regions of an image. For example, a moving object may be a brightly lit moving object having a sharp edge. Image pixels that include this type of brightly lit moving object having a sharp edge may be identified by image processing engine 20 as image pixels in highlight region 22, edge region 26, and motion region 28. Regions 22, 24, 26, and 28 are shown as square regions. However, this is merely illustrative. If desired, regions 22, 24, 26, and/or 28 may have other shapes, may be continuous regions or may be discontinuous regions.
Some HDR imaging systems use frame-sequential exposures in which an entire image frame is captured (i.e., all pixels in a pixel array accumulate image data) using a first exposure time before the subsequent image frame is captured using a second exposure time. Other HDR imaging systems use row-sequential exposures in which a selection of pixel rows capture an image of a portion of a scene (i.e. a portion of an image frame) using a first exposure time and the same selection of pixel rows is used to capture a second image of the same portion of the scene using a second exposure time before subsequent rows are used to repeat the multiple exposure imaging process.
If desired, row-sequential exposures may be performed in which a selection of pixel rows are used to capture an image of a portion of a scene (i.e., a portion of an image frame) using a first exposure time, a subsequent selection of pixel rows are used to capture an image of a an additional portion of the scene using a second exposure time and this process is repeated until pixel rows have been used to capture an image having image pixel values with interleaved exposure times. In this type of row-sequential image capture operation, a subsequent image may be captured using the second exposure time for the first selection of pixel rows, the first exposure time for the subsequent selection of pixel rows, and so on until all pixels rows have been used to capture a second image having image pixel values with interleaved exposure times.
As shown in
In the example of
Interleaved images of the type shown in
Interleaved images 1 and 2 may be processed and combined using image processing engine 20 as shown in
Interpolation engines 34 may be used for generating an interpolated long-exposure image and an interpolated short-exposure image from each of images 1 and 2. Motion detection engine 36 may be used to detect regions of motion between images 1 and 2. Edge detection engines 38 may be used to detect edge regions in images 1 and 2. Reconstruction mapping engine 40 may be used to combine detected edge regions and detected motion regions to generate reconstruction maps to be used in forming final short-exposure and long-exposure images from images 1 and 2. Image combining engine 42 may be used to form final short-exposure and long-exposure images using the reconstruction map, image 1, image 2, and the interpolated long-exposure and short-exposure images generated from a selected one of image 1 or image 2. Reconstruction engine 44 may be used to form a motion-compensated high-dynamic-range image such as image 30 of
As shown in
Some or all of interpolated images 35-1 and 35-2 may also be provided to motion detection engine 36. If desired, motion detection engine 36 may be used to detect differences between corresponding interpolated image pixel values in interpolated images 35-1 and 35-2 in addition to or in place of detecting differences between corresponding pixel values in images 1 and 2 to detection motion regions 28 in images 1 and 2. Motion detection engine 36 may generate motion map 50 based on the detected differences between corresponding image pixel values in image 1 and image 2, based on the detected differences between corresponding image pixel values in interpolated images 35-1 and 35-2, or based on the detected differences between corresponding image pixel values in images 1 and 2 and interpolated images 35-1 and 35-2.
Motion map 50 may be an array of motion map pixel values 51, each value 51 corresponding to a single overlapping image pixel in image 1 and image 2. Each value 51 in the motion mask may indicate the likelihood of the corresponding pixel in either image 1 or image 2 belonging to a moving object (e.g., a value of 1 may indicate a pixel belonging to a moving object while a value of 0 may indicate a pixel does not belong to a moving object).
As an example, a method for producing motion map 50 from two sequential image frames may include generating luma images from images 1 and 2, (e.g., by convolving each image frame with a luma operator such as a high-pass filter), combining the luma images to a mean-absolute-difference (MAD) image by computing, for each pixel, the MAD of a surrounding group of pixels in the luma images, and combining the MAD image with a noise model to generate motion map 50. The noise model may be based on one or both images 1 and 2, may be based on one or both luma images, may be based on a combination of images and the luma images, or may be based on a combination of pixel values from one of image 1 and 2 and one of the generated luma images. The pixels in motion mask 50 having non-zero values may make up detected motion regions 28.
For i=1, interpolated long-exposure image 52 may include image pixel values 32 from image 1 in rows in which exposure time T1 was used to capture the image pixel values and may contain interpolated long-exposure values in rows in which exposure time T2 was used to capture the image pixel values. Interpolated short-exposure image 53 may include image pixel values 32 from image 1 in rows in which exposure time T2 was used to capture the image pixel values and may contain interpolated short-exposure values in rows in which exposure time T1 was used to capture the image pixel values.
For i=2, interpolated long-exposure image 52 may include image pixel values 32 from image 2 in rows in which exposure time T1 was used to capture the image pixel values and may contain interpolated long-exposure values in rows in which exposure time T2 was used to capture the image pixel values. Interpolated short-exposure image 53 may include image pixel values 32 from image 2 in rows in which exposure time T2 was used to capture the image pixel values and may contain interpolated short-exposure values in rows in which exposure time T1 was used to capture the image pixel values.
As shown in
Edge detection engine 38 may generate edge map 54 by detecting edges in an interpolated image and generating an array of edge pixel values 49 that indicate whether an edge has been detected in each pixel and the direction in which that detected edge is oriented. For example, each edge pixel value 49 may be an integer value in the range 0-4 in which 0 indicates no edge has been detected at that pixel location, 1 indicates that a horizontal edge has been detected at that pixel location, 2 indicates that a vertical edge has been detected, 3 indicates that a 45 degree diagonal edge has been detected, and 4 indicates that a 135 degree diagonal edge has been detected.
The edge pixel value 49 may be determined by selecting a pixel value such as a green pixel value G (an original green pixel value or an interpolated green pixel value) and obtaining green pixel values G1, G2, G3, and G4, located at the four adjacent corners of the selected green pixel value G. A gradient value GR in the direction of each adjacent corner of the selected pixel may be determined (e.g., by subtracting the corresponding adjacent pixel value (G1, G2, G3 or G4) from the selected pixel value G and determining the absolute value of those subtractions), calculating the maximum of those gradient values (e.g., max(GR1=|G1−G|, GR2=|G2−G|, GR3=|G3−G|, GR4=|G4−G|)), and comparing the maximum of the gradient values to a threshold value. If the maximum of the gradient values is above the threshold value, edge detection engine 38 may determine that an edge has been detected at the location of the selected pixel. This process may be repeated for each pixel (or for each green pixel) until a map of edge detection pixel values corresponding to each pixel (or each green pixel) has been generated.
The edge pixel values 49 for edge pixels in which an edge has been detected (e.g., directional edge indices 1, 2, 3, or 4) may then be generated by determining whether the two smallest gradient values are horizontally, vertically, 45 degree diagonally or 135 degree diagonally oriented about the selected green pixel.
Based on edge maps 54 and motion map 50, either image 1 or image 2 may be selected as a reference frame. Motion-compensated high-dynamic-range images may be generated by image pixel values from image 1 and image 2 in non-motion regions and using image pixel values from the reference frame and the interpolated images 52 and 53 that were generated from that reference frame to form the image pixel values in a motion region for the motion-compensated high-dynamic-range images.
For example, a reconstruction map pixel value 55 that is equal to one may indicate that the corresponding pixel value in image 58 should be a long-exposure image pixel value taken directly from image 1 or image 2. The long-exposure image pixel value to be used to form the corresponding pixel value in image 58 may be taken from an overlapping image pixel in image 1 if the overlapping image pixel in image 1 is a long-exposure image pixel value. If the overlapping image pixel in image 1 is a short-exposure image pixel value, then the long-exposure image pixel value to be used to form the corresponding pixel value in image 58 may be taken from an overlapping image pixel in image 2.
A reconstruction map pixel value 55 that is equal to one may also indicate that the corresponding pixel value in image 60 should be a short-exposure image pixel value taken directly from image 1 or image 2. The short-exposure image pixel value to be used to form the corresponding pixel value in image 60 may be taken from an overlapping image pixel in image 1 if the overlapping image pixel in image 1 is a short-exposure image pixel value. If the overlapping image pixel in image 1 is a long-exposure image pixel value, then the short-exposure image pixel value to be used to form the corresponding pixel value in image 58 may be taken from an overlapping image pixel in image 2.
A reconstruction map pixel value 55 that is equal to zero may indicate that the corresponding pixel value in image 58 should be a long-exposure image pixel value taken from interpolated long-exposure image 52 and that the corresponding pixel value in image 60 should be a short-exposure image pixel value taken from interpolated short-exposure image 53. As described above in connection with
In this way, motion artifacts may be reduced by using image pixel values in images 58 and 60 that are based on multiple captured images in non-motion regions and based on a single captured image (i.e., image pixel values from the reference frame or interpolated long or short image pixel values based on the image pixel values from the reference frame) in motion regions.
Each image pixel value 31 in motion-compensated HDR image 30 (i.e., image pixel value 31 located at pixel positions (x,y) in image 30) may be determined using any linear combination of the pixel values in final long-exposure image (FLEI) 58 and final short-exposure image (FSEI) 60. In one embodiment, the pixel values 31 in motion-compensated HDR image (MCHDR) 30 may be determined using the following equation:
where R is a ratio of exposure times T1 and T2, and where S1 and S2 are preselected knee points for the HDR linear combination. The parameter kc may be a weighting factor that depends on the value of the pixel in image 58 at location (x,y), and knee points S1 and S2. For example, kc may be given by the equation kc=(FLEI(x,y)−S1)/(S2−S1).
Illustrative steps that may be used in generating a motion-compensated high-dynamic-range image such as image 30 by optimally combining two or more interleaved images such as images 1 and 2 are shown in
At step 100, a first image may be captured using an image sensor of the type shown in
At step 102, the first image may be stored (e.g., using a frame buffer on the image sensor).
At step 104, a second image may be captured. Capturing the second image may include capturing an interleaved image that includes image pixel values captured using the first exposure time and image pixel values captured using the second exposure time. The image pixel values captured using the first and second exposure times may be in alternating pixel rows, in alternating sets of pixel rows, or may be otherwise distributed within the second image and may be arranged opposite to the arrangement of the image pixel values in the first image.
At step 106, a motion map such as motion map 50 of
At step 116, the first image may be interpolated to form a first interpolated long-exposure image and a first interpolated short-exposure image as described above in connection with
At step 118, the second image may be interpolated to form a second interpolated long-exposure image and a second interpolated short-exposure image as described above in connection with
At step 108, first and second edge maps may be generated using the first and second interpolated long-exposure images as described above in connection with
At step 110, a reconstruction map may be generated using the motion map and the first and second edge maps as described above in connection with
At step 112, first and second combined images such as final long-exposure image 58 and final short-exposure image 60 may be generated using the reconstruction map. Generating the first and second combined images may include generating the first and second combined images using the reconstruction map, the first image, the second image, the interpolated long-exposure image generated from the image selected as the reference frame and the interpolated short-exposure image generated from the image selected as the reference frame as described above in connection with
At step 114, a motion-compensated high-dynamic-range image such as image 30 of
Processor system 300, which may be a digital still or video camera system, may include a lens such as lens 396 for focusing an image onto a pixel array such as pixel array 201 when shutter release button 397 is pressed. Processor system 300 may include a central processing unit such as central processing unit (CPU) 395. CPU 395 may be a microprocessor that controls camera functions and one or more image flow functions and communicates with one or more input/output (I/O) devices 391 over a bus such as bus 393. Imaging device 200 may also communicate with CPU 395 over bus 393. System 300 may include random access memory (RAM) 392 and removable memory 394. Removable memory 394 may include flash memory that communicates with CPU 395 over bus 393. Imaging device 200 may be combined with CPU 395, with or without memory storage, on a single integrated circuit or on a different chip. Although bus 393 is illustrated as a single bus, it may be one or more buses or bridges or other communication paths used to interconnect the system components.
Various embodiments have been described illustrating systems and methods for generating motion-compensated HDR images of a scene containing one or more moving objects using a camera module having an image sensor and processing circuitry. The motion-compensation method may include using an image pixel array on the image sensor to capture subsequent first and second interleaved images that include the moving object and using processing circuitry to generate a motion mask. Each interleaved image may include rows of long-exposure image pixel values that are interleaved with rows of short-exposure image pixel values. A portion of the array of image pixels (e.g., a set of rows of image pixels) may be used to generate the short-exposure image pixel values in the first interleaved image and the long-exposure image pixel values in the second interleaved image. A second portion of the array of image pixels (e.g., an additional set of rows of image pixels) may be used to generate the long-exposure image pixel values in the first interleaved image and the short-exposure image pixel values in the second interleaved image.
The first interleaved image may have short-exposure image pixel values at a first set of pixel locations and long-exposure image pixel values at a second set of pixel locations. The second interleaved image may have long-exposure image pixel values at the first set of pixel locations and short-exposure image pixel values at the second set of pixel locations.
The long-exposure image pixel values and the short-exposure image pixel values in each interleaved image may be interpolated to form interpolated long-exposure image pixel values and interpolated short-exposure image pixel values. A final (combined) long-exposure image and a final (combined) short-exposure image may be generated using the long-exposure image pixel values and the short-exposure image pixel values from the interleaved images along with the interpolated long-exposure image pixel values and short-exposure image pixel values from a selected one of the interleaved image frames. The final (combined) long-exposure image and the final (combined) short-exposure image may each include image pixel values from either or both of the first and second interleaved image frames in a non-motion region and image pixel values based only on image pixel values or interpolated values from the selected one of the interleaved images in a motion region. High-dynamic-range images may be generated using the final long-exposure and short-exposure images.
The foregoing is merely illustrative of the principles of this invention which can be practiced in other embodiments.
Number | Name | Date | Kind |
---|---|---|---|
5144442 | Ginosar et al. | Sep 1992 | A |
5247366 | Ginosar et al. | Sep 1993 | A |
6518558 | Bohm et al. | Feb 2003 | B1 |
7084905 | Nayar et al. | Aug 2006 | B1 |
7382407 | Cho et al. | Jun 2008 | B2 |
7397509 | Krymski | Jul 2008 | B2 |
7907209 | Au et al. | Mar 2011 | B2 |
7911518 | Yosefin | Mar 2011 | B2 |
8013919 | Yaffe et al. | Sep 2011 | B2 |
8059174 | Mann et al. | Nov 2011 | B2 |
8237813 | Garten | Aug 2012 | B2 |
8279328 | Lahav et al. | Oct 2012 | B2 |
8305487 | Cha et al. | Nov 2012 | B2 |
8405750 | Smith et al. | Mar 2013 | B2 |
8625013 | Jannard et al. | Jan 2014 | B2 |
8792019 | Yuyama | Jul 2014 | B2 |
8798395 | Jo | Aug 2014 | B2 |
8803985 | Kaizu et al. | Aug 2014 | B2 |
20020180875 | Guisdash | Dec 2002 | A1 |
20030038296 | Merrill | Feb 2003 | A1 |
20030103158 | Barkan et al. | Jun 2003 | A1 |
20030169359 | Merrill et al. | Sep 2003 | A1 |
20040189844 | McCaffrey et al. | Sep 2004 | A1 |
20050045980 | Guidash | Mar 2005 | A1 |
20050099504 | Nayar et al. | May 2005 | A1 |
20050128327 | Bencuya et al. | Jun 2005 | A1 |
20050167574 | He et al. | Aug 2005 | A1 |
20060145203 | Toros et al. | Jul 2006 | A1 |
20060192867 | Yosefin | Aug 2006 | A1 |
20070040922 | McKee et al. | Feb 2007 | A1 |
20070285526 | Mann et al. | Dec 2007 | A1 |
20080158398 | Yaffe et al. | Jul 2008 | A1 |
20080219585 | Kasai et al. | Sep 2008 | A1 |
20080267522 | Kobayashi | Oct 2008 | A1 |
20090021612 | Hamilton et al. | Jan 2009 | A1 |
20090040349 | Xu | Feb 2009 | A1 |
20090040364 | Rubner | Feb 2009 | A1 |
20090256942 | McCaffey et al. | Oct 2009 | A1 |
20090268063 | Ellis-Monaghan et al. | Oct 2009 | A1 |
20090273696 | Krymski | Nov 2009 | A1 |
20100259636 | Tzur et al. | Oct 2010 | A1 |
20110090365 | Cha et al. | Apr 2011 | A1 |
20120236169 | Choe et al. | Sep 2012 | A1 |
20120281111 | Jo et al. | Nov 2012 | A1 |
20120287294 | Kaizu et al. | Nov 2012 | A1 |
20120328025 | Chang et al. | Dec 2012 | A1 |
Number | Date | Country |
---|---|---|
2375383 | Dec 2011 | EP |
2515273 | Oct 2012 | EP |
Entry |
---|
Huai Dong Li et al., U.S. Appl. No. 13/755,988, filed Jan. 31, 2013. |
Huai Dong Li, U.S. Appl. No. 13/786,199, filed Mar. 5, 2013. |
Number | Date | Country | |
---|---|---|---|
20130100314 A1 | Apr 2013 | US |
Number | Date | Country | |
---|---|---|---|
61544240 | Oct 2011 | US |