IP Library Granted Patent US 9,413,980
Granted Patent B1
US 9,413,980 · App. 14/802,231 · Granted Aug 9, 2016

Methods for generating HDR (high dynamic range) images and apparatuses using the same

Inventor: Nan Qi (Beijing, CN)
Assignee: VIA ALLIANCE SEMICONDUCTOR CO., LTD.
H04N5/2355H04N5/2353
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 9,413,980
App. No.
14/802,231
Granted
Aug 9, 2016
Kind
B1
Abstract

A method for generating HDR (High Dynamic Range) images, performed by a processing unit, the method at least containing: acquiring a frame 0 ; obtaining frame statistics information at least includes a first pixel count for a dark area and a second pixel count for a saturate area; calculating the ratio according to the first pixel count and the second pixel count; calculating a first expansion factor and a second expansion factor according to the ratio and the exposure setting of the frame 0 ; expanding the frame 0 to HDR space using the first expansion factor; expanding a frame 1 to the HDR space using the second expansion factor; and fusing the expanded frame 0 with the expanded frame 1.

Claims (88)

1. A method for generating HDR (High Dynamic Range) images, performed by a processing unit, the method comprising:

acquiring a frame 0 ;

obtaining frame statistics information comprising a first pixel count of a dark area and a second pixel count of a saturate area;

calculating a ratio according to the first pixel count and the second pixel count;

calculating a first expansion factor and a second expansion factor according to the ratio and an exposure setting of the frame 0 ;

expanding the frame 0 to HDR space using the first expansion factor;

expanding a frame 1 to the HDR space using the second expansion factor; and

fusing the expanded frame 0 with the expanded frame 1 .

2. The method of claim 1 , wherein the ratio is calculated by an Equation:

shiftRatio=pixelNumBin0/pixelNumBin3,

wherein shiftRatio indicates the ratio, pixelNumBin 0 indicates the first pixel count and pixelNumBin 3 indicates the second pixel count.

3. The method of claim 1 , wherein step for calculating a first expansion factor and a second expansion factor according to the ratio and an exposure setting of the frame 0 further comprises:

calculating a first exposure parameter and a second exposure parameter according to the ratio and the exposure setting;

calculating the first expansion factor using the second exposure parameter and the exposure setting; and

calculating the second expansion factor using the first exposure parameter and the second exposure parameter,

wherein the ratio of the second exposure parameter over the first exposure parameter is a fixed expansion value.

4. The method of claim 3 , wherein the first exposure parameter is calculated by Equations:

exp_times= a ×shiftRatio×shiftRatio+ b ×shiftRatio+ c;

Para1 =sht×ag×dg ×exp_times/expValue,

wherein Para 1 indicates the first exposure parameter, shiftRatio indicates the ratio, a, b and c are floating numbers, sht×ag×dg indicates the exposure setting of the frame 0 , and expValue indicates the fixed expansion value.

5. The method of claim 3 , wherein the second exposure parameter is calculated by Equations:

exp_times= a ×shiftRatio×shiftRatio+ b ×shiftRatio+ c;

Para2 =sht×ag×dg ×exp_times,

wherein Para 2 indicates the second exposure parameter, shiftRatio indicates the ratio, a, b and c are floating numbers, and sht×ag×dg indicates the exposure setting of the frame 0 .

6. The method of claim 3 , wherein the first expansion factor is calculated by Equations:

curveMapValNormal=curveTable_ AVR[ 0 ]×sht×ag×dg +curveTable_ AVR[ 1];

curveMapValHigh=curveTable_ AVR[ 0]×Para2+curveTable_ AVR[ 1]; and

slope_Normal=curveMapValHigh/curveMapValNormal,

wherein slope_Normal indicates the first expansion factor, curveTable_AVR[0] is a calibrated slope associated with an image sensor, curveTable_AVR[1] is a calibrated y-intercept associated with the image sensor, sht×ag×dg indicates the exposure setting of the frame 0 and Para 2 indicates the second exposure parameter.

7. The method of claim 3 , wherein the second expansion factor is calculated by Equations:

curveMapValLow=curveTable_ AVR[ 0]×Para1+curveTable_ AVR[ 1];

curveMapValHigh=curveTable_ AVR[ 0]×Para2+curveTable_ AVR[ 1]; and

slope_Low=curveMapValHigh/curveMapValLow,

wherein slope_Low indicates the second expansion factor, curveTable_AVR[0] is a calibrated slope associated with an image sensor, curveTable_AVR[1] is a calibrated y-intercept associated with the image sensor, Para 1 indicates the first exposure parameter and Para 2 indicates the second exposure parameter.

8. The method of claim 1 , wherein the step for expanding the frame 0 to HDR space using the first expansion factor further comprises multiplying each pixel value of the frame 0 with the first expansion factor, and the step for expanding a frame 1 to the HDR space using the second expansion factor further comprises multiplying each pixel value of the frame 1 with the second expansion factor.

9. The method of claim 1 , wherein the first exposure setting of the frame 0 is a normal-exposure setting and the frame 1 is a low-exposure frame.

10. The method of claim 1 , further comprising:

acquiring a frame 2 , wherein the frame 2 is a high-exposure frame; and

fusing the frame 2 with the fusing result of the expanded frame 0 with the expanded frame 1 .

11. The method of claim 10 , further comprising:

compensating saturated pixels and dark pixels of the expanded frame 0 using a first exposure compensation method;

compensating dark pixels of the expanded frame 1 using a second exposure compensation method; and

compensating saturated pixels of the frame 2 using a third exposure compensation method.

12. The method of claim 11 , wherein the first exposure compensation method replaces luminance values of the dark pixels of the expanded frame 0 with luminance pixel values of the frame 2 at the same locations and replaces luminance values of the saturated pixels of the expanded frame 0 with luminance pixel values of the frame 1 at the same locations, the second exposure compensation method replaces luminance values of the dark pixels of the expanded frame 1 with luminance pixel values of the expanded frame 0 at the same locations and the third exposure compensation method replaces luminance values of the saturated pixels of the frame 2 with the luminance pixel values of the expanded frame 0 at the same locations.

13. The method of claim 1 , further comprising:

dividing the frame 0 into a plurality of blocks;

obtaining block statistics information for each block of the frame 0 ;

recognizing a type of each block of the frame 0 according to the block statistics information;

setting a block weight according to the type of each block;

calculating pixel weight of each pixel of the frame 0 according to the block weights; and

fusing the expanded frame 0 with the expanded frame 1 according to the pixel weight.

14. The method of claim 13 , wherein the pixel weight is calculated by an Equation:

W p =D 1× D 2× W UL +D 1× D 4× W UR +D 3× D 2× W LL +D 3× D 4× W LR ,

where W p indicates the pixel weight of a pixel of the frame 0 , W UL indicates a block weight of an upper-left block, W UR indicates a block weight of an upper-right block, W LL indicates a block weight of a lower-left block, W LR indicates a block weight of a lower-right block, D 1 indicates a distance from the pixel to a lower edge, D 2 indicates a distance from the pixel to a right edge, D 3 indicates a distance from the pixel to an upper edge and D 4 indicates a distance from the pixel to a left edge.

15. An apparatus for generating HDR (High Dynamic Range) images, comprising:

a camera module controller, coupled to a camera module;

a processing unit acquiring a frame 0 via the camera module controller; obtaining frame statistics information comprising a first pixel count of a dark area and a second pixel count of a saturate area; calculating a ratio according to the first pixel count and the second pixel count; calculating a first expansion factor and a second expansion factor according to the ratio and an exposure setting of the frame 0 ; expanding the frame 0 to HDR space using the first expansion factor; expanding a frame 1 to the HDR space using the second expansion factor; and fusing the expanded frame 0 with the expanded frame 1 .

16. The apparatus of claim 15 , wherein the ratio is calculated by an Equation:

shiftRatio=pixelNumBin0/pixelNumBin3,

wherein shiftRatio indicates the ratio, pixelNumBin 0 indicates the first pixel count and pixelNumBin 3 indicates the second pixel count.

17. The apparatus of claim 15 , wherein the processing unit further calculates a first exposure parameter and a second exposure parameter according to the ratio and the exposure setting; calculates the first expansion factor using the second exposure parameter and the exposure setting; and calculates the second expansion factor using the first exposure parameter and the second exposure parameter, wherein the ratio of the second exposure parameter over the first exposure parameter is a fixed expansion value.

18. The apparatus of claim 17 , wherein the first exposure parameter is calculated by Equations:

exp_times= a ×shiftRatio×shiftRatio+ b ×shiftRatio+ c;

Para1 =sht×ag×dg ×exp_times/expValue,

wherein Para 1 indicates the first exposure parameter, shiftRatio indicates the ratio, a, b and c are floating numbers, sht×ag×dg indicates the exposure setting of the frame 0 , and expValue indicates the fixed expansion value.

19. The apparatus of claim 17 , wherein the second exposure parameter is calculated by Equations:

exp_times= a ×shiftRatio×shiftRatio+ b ×shiftRatio+ c;

Para2 =sht×ag×dg ×exp_times,

wherein Para 2 indicates the second exposure parameter, shiftRatio indicates the ratio, a, b and c are floating numbers, and sht×ag×dg indicates the exposure setting of the frame 0 .

20. The apparatus of claim 17 , wherein the first expansion factor is calculated by Equations:

curveMapValNormal=curveTable_ AVR[ 0 ]×sht×ag×dg +curveTable_ AVR[ 1];

curveMapValHigh=curveTable_ AVR[ 0]×Para2+curveTable_ AVR[ 1]; and

slope_Normal=curveMapValHigh/curveMapValNormal,

wherein slope_Normal indicates the first expansion factor, curveTable_AVR[0] is a calibrated slope associated with an image sensor, curveTable_AVR[1] is a calibrated y-intercept associated with the image sensor, sht×ag×dg indicates the exposure setting of the frame 0 and Para 2 indicates the second exposure parameter.

21. The apparatus of claim 17 , wherein the second expansion factor is calculated by Equations:

curveMapValLow=curveTable_ AVR[ 0]×Para1+curveTable_ AVR[ 1];

curveMapValHigh=curveTable_ AVR[ 0]×Para2+curveTable_ AVR[ 1]; and

slope_Low=curveMapValHigh/curveMapValLow,

wherein slope_Low indicates the second expansion factor, curveTable_AVR[0] is a calibrated slope associated with an image sensor, curveTable_AVR[1] is a calibrated y-intercept associated with the image sensor, Para 1 indicates the first exposure parameter and Para 2 indicates the second exposure parameter.

22. The apparatus of claim 15 , wherein the processing unit multiplies each pixel value of the frame 0 with the first expansion factor to expand the frame 0 to the HDR space and multiplies each pixel value of the frame 1 with the second expansion factor to expand the frame 1 to the HDR space.

23. The apparatus of claim 15 , wherein the first exposure setting of the frame 0 is a normal-exposure setting and the frame 1 is a low-exposure frame.

24. The apparatus of claim 15 , wherein the processing unit further acquires a frame 2 , wherein the frame 2 is a high-exposure frame; and fuses the frame 2 with the fusing result of the expanded frame 0 with the expanded frame 1 .

25. The apparatus of claim 24 , wherein the processing unit further compensates saturated pixels and dark pixels of the expanded frame 0 using a first exposure compensation method; compensates dark pixels of the expanded frame 1 using a second exposure compensation method; and compensates saturated pixels of the frame 2 using a third exposure compensation method.

26. The apparatus of claim 25 , wherein the first exposure compensation method replaces luminance values of the dark pixels of the expanded frame 0 with luminance pixel values of the frame 2 at the same locations and replaces luminance values of the saturated pixels of the expanded frame 0 with luminance pixel values of the frame 1 at the same locations, the second exposure compensation method replaces luminance values of the dark pixels of the expanded frame 1 with luminance pixel values of the expanded frame 0 at the same locations and the third exposure compensation method replaces luminance values of the saturated pixels of the frame 2 with the luminance pixel values of the expanded frame 0 at the same locations.

27. The apparatus of claim 15 , wherein the processing unit further divides the frame 0 into a plurality of blocks; obtains block statistics information for each block of the frame 0 ; recognizes a type of each block of the frame 0 according to the block statistics information; sets a block weight according to the type of each block; calculates pixel weight of each pixel of the frame 0 according to the block weights; and fuses the expanded frame 0 with the expanded frame 1 according to the pixel weight.

28. The apparatus of claim 27 , wherein the pixel weight is calculated by an Equation:

W p =D 1× D 2× W UL +D 1× D 4× W UR +D 3× D 2× W LL +D 3× D 4× W LR ,

where W p indicates the pixel weight of a pixel of the frame 0 , W UL indicates a block weight of an upper-left block, W UR indicates a block weight of an upper-right block, W LL indicates a block weight of a lower-left block, W LR indicates a block weight of a lower-right block, D 1 indicates a distance from the pixel to a lower edge, D 2 indicates a distance from the pixel to a right edge, D 3 indicates a distance from the pixel to an upper edge and D 4 indicates a distance from the pixel to a left edge.

Assignments (2)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Nov 18, 2021
From: SHANGHAI ZHAOXIN SEMICONDUCTOR CO., LTD.
To: GLENFLY TECH CO., LTD.
Reel/Frame 058965/0042 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jul 17, 2015
From: QI, NAN
To: VIA ALLIANCE SEMICONDUCTOR CO., LTD.
Reel/Frame 036124/0988 →
Priority Claims (1)
CN 2015 1 0116190 · Mar 17, 2015 · national