CN110351489B - Method and device for generating HDR image and mobile terminal - Google Patents
Method and device for generating HDR image and mobile terminal Download PDFInfo
- Publication number
- CN110351489B CN110351489B CN201810301810.9A CN201810301810A CN110351489B CN 110351489 B CN110351489 B CN 110351489B CN 201810301810 A CN201810301810 A CN 201810301810A CN 110351489 B CN110351489 B CN 110351489B
- Authority
- CN
- China
- Prior art keywords
- exposure image
- long
- fused
- layer
- laplacian pyramid
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 30
- 238000007499 fusion processing Methods 0.000 claims abstract description 28
- 230000004927 fusion Effects 0.000 claims description 22
- 238000010276 construction Methods 0.000 claims description 2
- 238000004364 calculation method Methods 0.000 abstract description 4
- 238000010586 diagram Methods 0.000 description 6
- 238000004422 calculation algorithm Methods 0.000 description 4
- 238000003384 imaging method Methods 0.000 description 3
- 238000006073 displacement reaction Methods 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 239000000284 extract Substances 0.000 description 2
- 238000007500 overflow downdraw method Methods 0.000 description 2
- 238000004590 computer program Methods 0.000 description 1
- 238000007796 conventional method Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 230000005484 gravity Effects 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000005070 sampling Methods 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/50—Image enhancement or restoration using two or more images, e.g. averaging or subtraction
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/90—Dynamic range modification of images or parts thereof
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/90—Determination of colour characteristics
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N23/00—Cameras or camera modules comprising electronic image sensors; Control thereof
- H04N23/70—Circuitry for compensating brightness variation in the scene
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N23/00—Cameras or camera modules comprising electronic image sensors; Control thereof
- H04N23/70—Circuitry for compensating brightness variation in the scene
- H04N23/741—Circuitry for compensating brightness variation in the scene by increasing the dynamic range of the image compared to the dynamic range of the electronic image sensors
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N5/00—Details of television systems
- H04N5/222—Studio circuitry; Studio devices; Studio equipment
- H04N5/262—Studio circuits, e.g. for mixing, switching-over, change of character of image, other special effects ; Cameras specially adapted for the electronic generation of special effects
- H04N5/265—Mixing
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/20—Special algorithmic details
- G06T2207/20016—Hierarchical, coarse-to-fine, multiscale or multiresolution image processing; Pyramid transform
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Image Processing (AREA)
- Image Analysis (AREA)
- Studio Devices (AREA)
Abstract
The invention provides a method and a device for generating an HDR image and a mobile terminal. The method comprises the following steps: receiving two frames of LDR images, including a frame of short exposure image and a frame of long exposure image, and aligning the two frames of LDR images; respectively extracting brightness channels of the aligned two frames of LDR images, and performing fusion processing on the brightness channels to obtain fused brightness channels; respectively extracting color channels of the aligned two frames of LDR images, and carrying out fusion processing on the color channels to obtain fused color channels; and constructing the HDR image according to the fused brightness channel and the fused color channel. The method can reduce the calculation amount of the HDR image in the generation process, and is simple and efficient.
Description
Technical Field
The present invention relates to the field of image processing technologies, and in particular, to a method and an apparatus for generating an HDR image, and a mobile terminal.
Background
High Dynamic Range (HDR) imaging technology can provide more brightness and detail information, and is now one of the most important functions of a portable imaging device, and is also an important index for evaluating the performance of the imaging device. Due to the limitation of the manufacturing process, the dynamic range covered by the image sensor is much smaller than that of human eyes, and relatively, the acquired image is a Low Dynamic Range (LDR) image. In order to obtain an HDR image that is as close as possible to the human eye, a conventional method is to acquire a series of LDR images with different exposures, and then generate an HDR image by a multi-frame fusion method. In practical application, due to the shaking of the mobile phone and other reasons, the acquired multi-frame LDR images have inter-frame displacement, so that the multi-frame LDR images need to be aligned first. And after aligning the multiple frames of LDR images, fusing the multiple frames of LDR images to obtain a final HDR image.
In the process of implementing the invention, the inventor finds that at least the following technical problems exist in the prior art:
in the existing multi-frame fusion method, the more the number of frames processed is, the more the memory space is occupied, the larger the calculation amount is, and if local motion exists in the frame sequence, the more the number of frames is, the more serious the ghost condition of the result after fusion is, and the serious influence on the user experience is caused.
Disclosure of Invention
The method, the device and the mobile terminal for generating the HDR image can reduce the calculation amount of the HDR image in the generation process, and are simple and efficient.
In a first aspect, the present invention provides a method of generating an HDR image, comprising:
receiving two frames of LDR images, including a frame of short exposure image and a frame of long exposure image, and aligning the two frames of LDR images;
respectively extracting brightness channels of the aligned two frames of LDR images, and performing fusion processing on the brightness channels to obtain fused brightness channels;
respectively extracting color channels of the aligned two frames of LDR images, and carrying out fusion processing on the color channels to obtain fused color channels;
and constructing the HDR image according to the fused brightness channel and the fused color channel.
Optionally, the respectively extracting the luminance channels of the aligned two frames of LDR images, and performing fusion processing on the luminance channels to obtain a fused luminance channel includes:
respectively extracting brightness channels of the two aligned frames of LDR images, and generating a Gaussian pyramid and a Laplace pyramid which respectively correspond to the two frames of LDR images;
performing fusion processing on the Laplacian pyramids of the two frames of LDR images layer by layer to obtain fused Laplacian pyramids;
reconstructing the fused Laplacian pyramid layer by layer;
and outputting the reconstructed bottom layer image of the Laplacian pyramid to obtain a fused brightness channel.
Optionally, the pixel values of the pixel points at the positions of the layers of the fused laplacian pyramid are obtained by the following method:
when the pixel point at one position of one layer of the gaussian pyramid of the long exposure image is an overexposed point, the pixel values of the pixel points at the same layer and the same position of the fused laplacian pyramid are as follows: the weighted average value of the pixel values of the pixel points at the same layer and the same position of the laplacian pyramid of the short-exposure image and the weighted average value of the pixel values of the pixel points at the same layer and the same position of the laplacian pyramid of the long-exposure image are obtained, wherein the pixel values of the pixel points at the same layer and the same position of the laplacian pyramid of the short-exposure image use a larger weight, and the pixel values of the pixel points at the same layer and the same position of the laplacian pyramid of the long-exposure image use a smaller weight;
when the pixel point at one position of one layer of the gaussian pyramid of the long exposure image is a non-overexposure point, the pixel values of the pixel points at the same layer and the same position of the fused laplacian pyramid are as follows: and pixel values of pixel points on the same layer and the same position of the Laplacian pyramid of the long exposure image.
Optionally, the pixel value weight adopts a gaussian curve with a median value of 100.
Optionally, the value of the merged color channel at each position is obtained by:
when the pixel point of the brightness channel of the long exposure image at one position is an overexposure point, the value of the fused color channel at the same position is as follows: values of color channels of the short-exposure image at the same position;
when the pixel point of the brightness channel of the long exposure image at one position is a non-overexposure point, the value of the fused color channel at the same position is as follows: the color channel of the long exposure image has the same positional value.
In a second aspect, the present invention provides an apparatus for generating an HDR image, comprising:
the alignment module is used for receiving two frames of LDR images, including a frame of short exposure image and a frame of long exposure image, and aligning the two frames of LDR images;
the brightness channel fusion module is used for respectively extracting brightness channels of the two aligned frame LDR images and carrying out fusion processing on the brightness channels to obtain fused brightness channels;
the color channel fusion module is used for respectively extracting color channels of the aligned two frames of LDR images and carrying out fusion processing on the color channels to obtain fused color channels;
and the construction module is used for constructing the HDR image according to the fused brightness channel and the fused color channel.
Optionally, the luminance channel fusion module includes:
a pyramid generating unit, configured to extract luminance channels of the two aligned frames of LDR images, respectively, and generate a gaussian pyramid and a laplacian pyramid corresponding to each of the two frames of LDR images;
the fusion processing unit is used for carrying out fusion processing on the Laplacian pyramid of the two frames of LDR images layer by layer to obtain a fused Laplacian pyramid;
a reconstruction unit, configured to reconstruct the fused laplacian pyramid layer by layer;
and the output unit is used for outputting the reconstructed image of the bottom layer of the Laplacian pyramid to obtain the fused brightness channel.
Optionally, the fusion processing unit includes:
the judging subunit is used for judging whether pixel points at each position of each layer of the Gaussian pyramid of the long-exposure image are overexposed points or not;
an assigning subunit, configured to assign, when a pixel point at one position of one layer of the gaussian pyramid of the long-exposure image is an overexposed point, pixel values of pixel points at the same layer and the same position of the fused laplacian pyramid to: the weighted average value of the pixel values of the pixel points at the same layer and the same position of the laplacian pyramid of the short-exposure image and the weighted average value of the pixel values of the pixel points at the same layer and the same position of the laplacian pyramid of the long-exposure image are obtained, wherein the pixel values of the pixel points at the same layer and the same position of the laplacian pyramid of the short-exposure image use a larger weight, and the pixel values of the pixel points at the same layer and the same position of the laplacian pyramid of the long-exposure image use a smaller weight; and when the pixel point at one position of one layer of the gaussian pyramid of the long exposure image is a non-overexposed point, assigning the pixel values of the pixel points at the same layer and the same position of the fused laplacian pyramid as: and pixel values of pixel points on the same layer and the same position of the Laplacian pyramid of the long exposure image.
Optionally, the pixel value weights used by the assignment subunit use a gaussian curve with a median value of 100.
Optionally, the color channel fusion module includes:
the judging unit is used for judging whether pixel points of the brightness channel of the long exposure image at each position are overexposure points or not;
and the assignment unit is used for assigning the value of the fused color channel at the same position as follows when the pixel point of the brightness channel of the long exposure image at one position is an overexposure point: values of color channels of the short-exposure image at the same position; and when the pixel point of the brightness channel of the long exposure image at one position is a non-overexposure point, assigning the value of the fused color channel at the same position as: the color channel of the long exposure image has the same positional value.
In a third aspect, the present invention provides a mobile terminal comprising the above apparatus for generating HDR images.
The method, the device and the mobile terminal for generating the HDR image only use two frames of LDR images as input, comprise one frame of short exposure image and one frame of long exposure image, output is one frame of HDR image, in the image alignment and fusion stage, the memory space can be saved, the calculation amount is reduced, the algorithm efficiency is improved, the processing time is reduced, and meanwhile, because the input frame number is only two frames, the error influence caused by the inter-frame displacement difference is also reduced. In addition, by reasonably selecting the fusion area, the inter-frame local motion problem can be effectively solved, so that the visual effect of the algorithm is enhanced, and the user experience is improved. The invention is especially suitable for the mobile terminal with limited memory resources and emphasizing user experience.
Drawings
FIG. 1 is a flow diagram of one embodiment of a method of generating an HDR image of the present invention;
FIG. 2 is a flow diagram of another embodiment of a method of generating an HDR image of the present invention;
FIG. 3 is a schematic diagram illustrating an embodiment of an apparatus for generating HDR images according to the present invention;
FIG. 4 is a schematic structural diagram of the luminance channel fusion module shown in FIG. 3;
FIG. 5 is a schematic structural diagram of the fusion processing unit in FIG. 4;
fig. 6 is a schematic structural diagram of the color channel fusion module in fig. 3.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
An embodiment of the present invention provides a method for generating an HDR image, as shown in fig. 1, the method includes:
s11, receiving two frames of LDR images, including a frame of short exposure image and a frame of long exposure image, and aligning the two frames of LDR images;
s12, respectively extracting brightness channels of the aligned two-frame LDR images, and performing fusion processing on the brightness channels to obtain fused brightness channels;
s13, extracting color channels of the aligned two-frame LDR images respectively, and fusing the color channels to obtain fused color channels;
and S14, constructing the HDR image according to the fused brightness channel and the fused color channel.
Specifically, referring to fig. 2, in step S11, two frames of LDR images are input, including one frame of short-exposure image I0And a frame of long exposure image I1If the normal exposure image EV is 0, the short exposure image EV is-1 and the long exposure image EV is + 1. Respectively calculate I0And I1Luminance channel L of0And L1Then down-sampling them to respectively obtain I0And I1Image pyramid P of0And P1. In the image pyramid P0And P1First performing median binarization, then calculating the interframe shift quantity layer by layer from the topmost layer by using the least square difference until the global shift quantity (Deltax, Deltay) of two frame images is obtained after the bottommost layer, and aligning the two frame input images I by using the global shift quantity (Deltax, Deltay)0And I1Obtaining alignedAnd
in step S12, the respective extracts are obtainedAndluminance channel ofAndgenerating respective corresponding Gaussian pyramidsAndand laplacian pyramidAndthen two frames of images are aligned layer by layerAndof the laplacian pyramidAndand performing fusion processing to obtain a fused Laplacian pyramid P.
To process the Laplacian pyramidAndfor example, when a pixel point at a certain position (x1, y1) of the layer is to be processed, the long-exposure image is first determinedN layer image of Gaussian pyramidWhether the pixel point at the (x1, y1) position is an overexposed point (taking an 8-bit image as an example, the brightness value of the pixel can be determined>240 is defined as an overexposed point).
If the pixel point is an overexposed point, a short-exposure image with a large specific gravity is usedOf the nth layer image of the laplacian pyramidPixel value p of pixel point at (x1, y1) position0And long exposure images of small specific gravityOf the nth layer image of the laplacian pyramidPixel value p of pixel point at (x1, y1) position1A weighted average is performed and assigned to the output point p (x1, y1), wherein the pixel value weight may be a gaussian curve with a median value of 100.
If the pixel point is a non-overexposure point, the weighted average is not carried out, and p is directly added1Is assigned to the output point p (x1, y 1).
Laplacian pyramid for two frame images layer by layer using the same methodAndand performing fusion processing to obtain a fused Laplacian pyramid P.
And finally, reconstructing the Laplacian pyramid P from the top layer, wherein the bottom layer image L of the reconstructed Laplacian pyramid P 'is the luminance channel of the HDR image, and outputting the bottom layer image L of the reconstructed Laplacian pyramid P'.
In step S13, the respective extracts are obtainedAndcolor channel ofAndunlike the luminance channel, the color channel does not need to make gaussian pyramids and laplacian pyramids. In the fusion process, when a point at a certain position (x2, y2) is to be processed, a long-exposure image is first judgedLuminance channel ofWhether the pixel point at coordinate (x2, y2) is an overexposed point, and if so, the output C (p) is equal to the short-exposure imageIs at coordinate (x2, y2)If not, outputting C (p) equals to the long exposure imageIs at coordinate (x2, y2)
And combining the fusion result L of the brightness channel and the fusion result C of the color channel to obtain a final HDR image.
The method for generating the HDR image provided by the embodiment of the invention only uses two frames of LDR images as input, comprises one frame of short exposure image and one frame of long exposure image, outputs the frame of the HDR image, can save a large amount of memory space, reduce the calculated amount, improve the algorithm efficiency and reduce the time consumed by the whole process in the image alignment and fusion stage, and is more suitable for the mobile terminal with limited resources and emphasis on user experience. In addition, the invention adopts two-frame input, reduces the difficulty of alignment and fusion stages to the maximum extent, can effectively avoid ghost image generation for daily application by reasonably selecting the fusion area of the two frames, is simple and efficient compared with a complex deghost algorithm, has good effect, and further greatly improves the user experience of a software multi-frame HDR scheme on mobile terminals such as mobile phones and the like.
An embodiment of the present invention further provides an apparatus for generating an HDR image, as shown in fig. 3, the apparatus includes:
an alignment module 31, configured to receive two frames of LDR images, including one frame of short exposure image and one frame of long exposure image, and align the two frames of LDR images;
a luminance channel fusion module 32, configured to extract luminance channels of the aligned two frames of LDR images, respectively, and perform fusion processing on the luminance channels to obtain fused luminance channels;
a color channel fusion module 33, configured to extract color channels of the aligned two frames of LDR images, respectively, and perform fusion processing on the color channels to obtain fused color channels;
and a constructing module 34, configured to construct an HDR image according to the fused luminance channel and the fused color channel.
Optionally, as shown in fig. 4, the luminance channel fusion module 32 includes:
a pyramid generating unit 321, configured to extract luminance channels of the two aligned frames of LDR images, respectively, and generate a gaussian pyramid and a laplacian pyramid corresponding to each of the two frames of LDR images;
a fusion processing unit 322, configured to perform fusion processing on the laplacian pyramid of the two frames of LDR images layer by layer to obtain a fused laplacian pyramid;
a reconstruction unit 323 for reconstructing the fused laplacian pyramid layer by layer;
and an output unit 324, configured to output the reconstructed bottom-layer image of the laplacian pyramid, so as to obtain a fused luminance channel.
Further, as shown in fig. 5, the fusion processing unit 322 includes:
a determining subunit 3221, configured to determine whether pixel points at each position of each layer of the gaussian pyramid of the long-exposure image are overexposure points;
an assigning subunit 3222, configured to, when a pixel point at one position of one layer of the gaussian pyramid of the long-exposure image is an overexposed point, assign a pixel value of a pixel point at the same position and the same layer of the fused laplacian pyramid to be: the weighted average value of the pixel values of the pixel points at the same layer and the same position of the laplacian pyramid of the short-exposure image and the pixel values of the pixel points at the same layer and the same position of the laplacian pyramid of the long-exposure image is obtained, wherein the pixel values of the pixel points at the same layer and the same position of the laplacian pyramid of the short-exposure image use a larger weight value, and the pixel values of the pixel points at the same layer and the same position of the laplacian pyramid of the long-exposure image use a smaller weight value; and when the pixel point at one position of one layer of the Gaussian pyramid of the long-exposure image is a non-overexposed point, assigning the pixel values of the pixel points at the same layer and the same position of the fused Laplacian pyramid as: and pixel values of pixel points on the same layer and the same position of the Laplacian pyramid of the long-exposure image. Wherein, the weight of the pixel value adopts a Gaussian curve with a median value of 100.
Optionally, as shown in fig. 6, the color channel fusion module 33 includes:
the judging unit 331 is configured to judge whether pixel points of a luminance channel of the long exposure image at each position are overexposure points;
the assigning unit 332 is configured to, when a pixel point of the luminance channel of the long exposure image at one position is an overexposed point, assign the value of the fused color channel at the same position as: the value of the color channel of the short exposure image at the same position; and when the pixel point of the brightness channel of the long exposure image at one position is a non-overexposure point, assigning the value of the fused color channel at the same position as: the value of the color channel of the long exposure image at the same location.
The embodiment of the invention also provides a mobile terminal which comprises the device for generating the HDR image.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), or the like.
The above description is only for the specific embodiment of the present invention, but the scope of the present invention is not limited thereto, and any changes or substitutions that can be easily conceived by those skilled in the art within the technical scope of the present invention are included in the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.
Claims (9)
1. A method of generating an HDR image, comprising:
receiving two frames of LDR images, including a frame of short exposure image and a frame of long exposure image, and aligning the short exposure image and the long exposure image;
respectively extracting brightness channels of the aligned short exposure image and the aligned long exposure image, and fusing the brightness channels to obtain a fused brightness channel;
respectively extracting color channels of the aligned short-exposure image and the aligned long-exposure image, and performing fusion processing on the color channels to obtain fused color channels;
constructing an HDR image according to the fused brightness channel and the fused color channel;
the method comprises the following steps of respectively extracting brightness channels of the aligned short-exposure image and the aligned long-exposure image, and performing fusion processing on the brightness channels to obtain fused brightness channels, wherein the fused brightness channels comprise:
respectively extracting brightness channels of the short exposure image and the long exposure image which are aligned, and generating a Laplacian pyramid of the short exposure image, a Laplacian pyramid of the long exposure image and a Gaussian pyramid of the long exposure image;
fusing the Laplacian pyramid of the short exposure image and the Laplacian pyramid of the long exposure image layer by layer according to the exposure condition of each layer of pixel points of the Gaussian pyramid of the long exposure image to obtain a fused Laplacian pyramid;
reconstructing the fused Laplacian pyramid layer by layer;
and outputting the reconstructed bottom layer image of the Laplacian pyramid to obtain a fused brightness channel.
2. The method according to claim 1, wherein the pixel values of the pixel points at the positions of the layers of the fused laplacian pyramid are obtained by:
when the pixel point at one position of one layer of the gaussian pyramid of the long exposure image is an overexposed point, the pixel values of the pixel points at the same layer and the same position of the fused laplacian pyramid are as follows: the weighted average value of the pixel values of the pixel points at the same layer and the same position of the laplacian pyramid of the short-exposure image and the weighted average value of the pixel values of the pixel points at the same layer and the same position of the laplacian pyramid of the long-exposure image are obtained, wherein the weight of the pixel values of the pixel points at the same layer and the same position of the laplacian pyramid of the short-exposure image is greater than the weight of the pixel values of the pixel points at the same layer and the same position of the laplacian pyramid of the long-exposure image;
when the pixel point at one position of one layer of the gaussian pyramid of the long exposure image is a non-overexposure point, the pixel values of the pixel points at the same layer and the same position of the fused laplacian pyramid are as follows: and pixel values of pixel points on the same layer and the same position of the Laplacian pyramid of the long exposure image.
3. The method of claim 2, wherein the pixel value weights are gaussian with a median of 100.
4. The method of claim 1, wherein the fused color channel values at each position are obtained by:
when the pixel point of the brightness channel of the long exposure image at one position is an overexposure point, the value of the fused color channel at the same position is as follows: values of color channels of the short-exposure image at the same position;
when the pixel point of the brightness channel of the long exposure image at one position is a non-overexposure point, the value of the fused color channel at the same position is as follows: the color channel of the long exposure image has the same positional value.
5. An apparatus for generating an HDR image, comprising:
the alignment module is used for receiving two frames of LDR images, including a frame of short exposure image and a frame of long exposure image, and aligning the short exposure image and the long exposure image;
the brightness channel fusion module is used for respectively extracting brightness channels of the aligned short-exposure image and the aligned long-exposure image and carrying out fusion processing on the brightness channels to obtain fused brightness channels;
the color channel fusion module is used for respectively extracting color channels of the aligned short-exposure image and the aligned long-exposure image and carrying out fusion processing on the color channels to obtain fused color channels;
the construction module is used for constructing an HDR image according to the fused brightness channel and the fused color channel;
wherein the luminance channel fusion module comprises:
a pyramid generation unit, configured to extract luminance channels of the aligned short-exposure image and long-exposure image, respectively, and generate a laplacian pyramid of the short-exposure image, a laplacian pyramid of the long-exposure image, and a gaussian pyramid of the long-exposure image;
the fusion processing unit is used for performing fusion processing on the laplacian pyramid of the short-exposure image and the laplacian pyramid of the long-exposure image layer by layer according to the exposure condition of each layer of pixel points of the laplacian pyramid of the long-exposure image to obtain a fused laplacian pyramid;
a reconstruction unit, configured to reconstruct the fused laplacian pyramid layer by layer;
and the output unit is used for outputting the reconstructed image of the bottom layer of the Laplacian pyramid to obtain the fused brightness channel.
6. The apparatus according to claim 5, wherein the fusion processing unit includes:
the judging subunit is used for judging whether pixel points at each position of each layer of the Gaussian pyramid of the long-exposure image are overexposed points or not;
an assigning subunit, configured to assign, when a pixel point at one position of one layer of the gaussian pyramid of the long-exposure image is an overexposed point, pixel values of pixel points at the same layer and the same position of the fused laplacian pyramid to: the weighted average value of the pixel values of the pixel points at the same layer and the same position of the laplacian pyramid of the short-exposure image and the weighted average value of the pixel values of the pixel points at the same layer and the same position of the laplacian pyramid of the long-exposure image are obtained, wherein the weight of the pixel values of the pixel points at the same layer and the same position of the laplacian pyramid of the short-exposure image is greater than the weight of the pixel values of the pixel points at the same layer and the same position of the laplacian pyramid of the long-exposure image; and when the pixel point at one position of one layer of the gaussian pyramid of the long exposure image is a non-overexposed point, assigning the pixel values of the pixel points at the same layer and the same position of the fused laplacian pyramid as: and pixel values of pixel points on the same layer and the same position of the Laplacian pyramid of the long exposure image.
7. The apparatus of claim 6, wherein the pixel value weights used by the assignment subunit are gaussian with a median of 100.
8. The apparatus of claim 5, wherein the color channel fusion module comprises:
the judging unit is used for judging whether pixel points of the brightness channel of the long exposure image at each position are overexposure points or not;
and the assignment unit is used for assigning the value of the fused color channel at the same position as follows when the pixel point of the brightness channel of the long exposure image at one position is an overexposure point: values of color channels of the short-exposure image at the same position; and when the pixel point of the brightness channel of the long exposure image at one position is a non-overexposure point, assigning the value of the fused color channel at the same position as: the color channel of the long exposure image has the same positional value.
9. A mobile terminal characterized in that it comprises an apparatus for generating HDR images as claimed in any of claims 5 to 8.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810301810.9A CN110351489B (en) | 2018-04-04 | 2018-04-04 | Method and device for generating HDR image and mobile terminal |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810301810.9A CN110351489B (en) | 2018-04-04 | 2018-04-04 | Method and device for generating HDR image and mobile terminal |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110351489A CN110351489A (en) | 2019-10-18 |
CN110351489B true CN110351489B (en) | 2021-04-23 |
Family
ID=68172757
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810301810.9A Active CN110351489B (en) | 2018-04-04 | 2018-04-04 | Method and device for generating HDR image and mobile terminal |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110351489B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112528944A (en) * | 2020-12-23 | 2021-03-19 | 杭州海康汽车软件有限公司 | Image identification method and device, electronic equipment and storage medium |
CN116095509B (en) * | 2021-11-05 | 2024-04-12 | 荣耀终端有限公司 | Method, device, electronic equipment and storage medium for generating video frame |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8411938B2 (en) * | 2007-11-29 | 2013-04-02 | Sri International | Multi-scale multi-camera adaptive fusion with contrast normalization |
JP6119719B2 (en) * | 2014-02-05 | 2017-04-26 | カシオ計算機株式会社 | Medical skin inspection apparatus, method and program for inspecting skin lesions |
CN104301636B (en) * | 2014-10-30 | 2017-07-28 | 西安电子科技大学 | The synthetic method of low complex degree efficient high dynamic digital picture |
CN106204513B (en) * | 2016-08-15 | 2019-07-05 | 厦门美图之家科技有限公司 | The methods, devices and systems of image procossing |
CN106920221B (en) * | 2017-03-10 | 2019-03-26 | 重庆邮电大学 | Take into account the exposure fusion method that Luminance Distribution and details are presented |
-
2018
- 2018-04-04 CN CN201810301810.9A patent/CN110351489B/en active Active
Also Published As
Publication number | Publication date |
---|---|
CN110351489A (en) | 2019-10-18 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
KR102474715B1 (en) | Parallax Mask Fusion of Color and Mono Images for Macrophotography | |
US9451173B2 (en) | Electronic device and control method of the same | |
KR101365369B1 (en) | High dynamic range image combining | |
CN103518223B (en) | The white balance optimization of high dynamic range images | |
US20150350513A1 (en) | Constant Bracket High Dynamic Range (cHDR) Operations | |
CN111669514B (en) | High dynamic range imaging method and apparatus | |
CN109767413B (en) | HDR method and device for resisting motion artifacts and portable terminal | |
CN110929569A (en) | Face recognition method, device, equipment and storage medium | |
CN112602088B (en) | Method, system and computer readable medium for improving quality of low light images | |
CN112818732B (en) | Image processing method, device, computer equipment and storage medium | |
CN109636765B (en) | High dynamic display method based on image multiple exposure fusion | |
CN113962859B (en) | Panorama generation method, device, equipment and medium | |
CN110351489B (en) | Method and device for generating HDR image and mobile terminal | |
CN114820405A (en) | Image fusion method, device, equipment and computer readable storage medium | |
CN114581355A (en) | Method, terminal and electronic device for reconstructing HDR image | |
CN115147304A (en) | Image fusion method and device, electronic equipment, storage medium and product | |
CN117768774A (en) | Image processor, image processing method, photographing device and electronic device | |
CN116437222B (en) | Image processing method and electronic equipment | |
CN115471413A (en) | Image processing method and device, computer readable storage medium and electronic device | |
CN115115518A (en) | Method, apparatus, device, medium and product for generating high dynamic range image | |
CN111080543A (en) | Image processing method and device, electronic equipment and computer readable storage medium | |
CN115330658B (en) | Multi-exposure image fusion method, device, equipment and storage medium | |
CN115564694A (en) | Image processing method and device, computer readable storage medium and electronic device | |
CN113362381B (en) | Image processing method and device, readable medium and communication terminal | |
US20240155248A1 (en) | Method and apparatus for generating high-dynamic-range image, and electronic device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |