Image exposure fusion method, device and storage medium
By replacing the brightness distribution of the Laplace pyramid in multi-exposure fusion technology, the problem of unnatural brightness caused by insufficient dynamic range of image acquisition equipment is solved, and a more reasonable image brightness distribution and quality improvement are achieved.
Patent Information
- Application Number
- CN202111574767.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-21
- Publication Date
- 2025-09-12
- Estimated Expiration
- 2041-12-21
AI Technical Summary
The insufficient dynamic range of existing image acquisition equipment results in unnatural image brightness distribution and brightness inversion in multi-exposure fusion technology.
By acquiring a sequence of images to be fused, calculating a fused Laplacian pyramid, and replacing the brightness distribution of the second top image of the target Laplacian pyramid according to the brightness distribution of the first top image, a target fused Laplacian pyramid is generated to correct the brightness distribution.
The global brightness distribution of images in multi-exposure fusion technology is improved, brightness inversion is reduced, and image quality is improved.
Smart Images

Figure CN114240792B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of multi-exposure fusion technology, and in particular to an image exposure fusion method, device, and storage medium. Background Art
[0002] With the rapid development of electronic device technology, people are demanding higher and higher quality digital images. However, due to the hardware limitations of existing image acquisition devices, the dynamic range of brightness of natural scenes that these devices can capture is far smaller than that of real-world scenes. For example, in real-world scenes, from the stars in the night sky to the glaring sun, scene brightness varies over a dynamic range of approximately nine orders of magnitude. The dynamic range of image acquisition devices, on the other hand, is limited to 0-255. Therefore, to achieve high-quality images, multi-exposure fusion (EF) technology has emerged.
[0003] In related technologies, multi-exposure fusion technology is used to fuse multiple images with varying exposure levels into a single, high-quality image. This overcomes hardware limitations and has broad application value in areas such as consumer electronics. While multi-exposure fusion improves image quality, it can still produce unnatural or even irrational overall brightness distribution in the fused image. For example, brightness inversion may occur. Summary of the Invention
[0004] To overcome the problems existing in the related art, the present disclosure provides an image exposure fusion method, device and storage medium.
[0005] According to a first aspect of an embodiment of the present disclosure, a method for image exposure fusion is provided, the method comprising:
[0006] Acquire a sequence of images to be fused, wherein the sequence of images to be fused includes a plurality of images to be fused, and the plurality of images to be fused are images captured at different exposure levels for the same scene;
[0007] Calculating a fused Laplacian pyramid according to the image sequence to be fused;
[0008] replacing the brightness distribution of the second top-level image of the fused Laplacian pyramid according to the brightness distribution of the first top-level image of the target Laplacian pyramid to obtain a target fused Laplacian pyramid, wherein the target Laplacian pyramid is generated according to the target to-be-fused image in the to-be-fused image sequence;
[0009] The target image is reconstructed by fusing the Laplacian pyramid according to the target.
[0010] Optionally, the first top image and the second top image have the same number of pixels, and replacing the brightness distribution of the second top image of the fused Laplacian pyramid according to the brightness distribution of the first top image of the target Laplacian pyramid to obtain the target fused Laplacian pyramid includes:
[0011] Calculating the brightness mean and standard deviation of each pixel in the first top-level image to obtain a first brightness mean and brightness standard deviation;
[0012] Calculating the average brightness of each pixel in the second top-level image to obtain a second average brightness value;
[0013] Calculating a first target brightness value of each pixel in the first top-level image according to a magnitude relationship between the brightness standard deviation and a preset threshold value and the first brightness mean value, to obtain a first target brightness image;
[0014] Obtaining a second target brightness image according to the first target brightness image and the second brightness mean;
[0015] The second top-level image is updated according to the second target brightness image to obtain an updated second top-level image, and the top-level image of the target fused Laplacian pyramid is the updated second top-level image.
[0016] Optionally, calculating the first target brightness value of each pixel in the first top-level image according to the magnitude relationship between the brightness standard deviation and a preset threshold and the first brightness mean value includes:
[0017] When the brightness standard deviation of the first top-level image is less than or equal to the preset threshold, for each pixel in the first top-level image, the difference between the brightness value of the pixel and the first brightness mean is used as the first target brightness value of the pixel.
[0018] Optionally, calculating the first target brightness value of each pixel in the first top-level image according to the magnitude relationship between the brightness standard deviation and a preset threshold and the first brightness mean value includes:
[0019] When the brightness standard deviation of the first top-level image is greater than the preset threshold, for each pixel point in the first top-level image, the relative standard distance value between the brightness value of the pixel point and the first brightness mean is calculated, and the product of the relative standard distance value and the preset threshold is used as the first target brightness value of the pixel point.
[0020] Optionally, obtaining a second target brightness image according to the first target brightness image and the second brightness mean includes:
[0021] The brightness value of each pixel in the first target brightness image is increased by the second brightness mean value to obtain the second target brightness image.
[0022] Optionally, updating the second top-level image according to the second target brightness image to obtain an updated second top-level image includes:
[0023] For each pixel in the second target brightness image, the second target brightness value of the pixel is assigned to the pixel at the corresponding position in the second top-level image to obtain the updated second top-level image.
[0024] Optionally, the calculating a fused Laplacian pyramid according to the image sequence to be fused includes:
[0025] performing Laplacian pyramid decomposition on each to-be-fused image in the to-be-fused image sequence to obtain a first Laplacian pyramid sequence, where the first Laplacian pyramid sequence includes a plurality of first Laplacian pyramids, each of the first Laplacian pyramids corresponding to one of the to-be-fused images;
[0026] Acquire a weight image sequence corresponding to the image sequence to be fused, wherein the weight image sequence includes a plurality of weight images, each weight image corresponds to one image to be fused, and each weight image represents a weight for fusing the image sequence to be fused;
[0027] performing Gaussian pyramid decomposition on each weight image in the weight image sequence to obtain a first Gaussian pyramid sequence, where the first Gaussian pyramid sequence includes a plurality of first Gaussian pyramids, and each first Gaussian pyramid corresponds to one weight image;
[0028] The fused Laplacian pyramid is generated according to the first Laplacian pyramid sequence and the first Gaussian pyramid sequence.
[0029] Optionally, generating the fused Laplacian pyramid according to the first Laplacian pyramid sequence and the first Gaussian pyramid sequence includes:
[0030] For each of the first Laplacian pyramids, multiply the first Laplacian pyramid by the corresponding first Gaussian pyramid to obtain a second Laplacian pyramid, wherein the first Gaussian pyramid multiplied by the first Laplacian pyramid and the first Laplacian pyramid correspond to the same image to be fused;
[0031] All the second Laplacian pyramids are added together to obtain the fused Laplacian pyramid.
[0032] Optionally, the first Laplacian pyramid and the first Gaussian pyramid have the same number of layers, and multiplying the first Laplacian pyramid by the corresponding first Gaussian pyramid includes:
[0033] The Nth layer of the first Laplacian pyramid is multiplied by the Nth layer of the corresponding first Gaussian pyramid to obtain the Nth layer of the second Laplacian pyramid, where N is an integer greater than or equal to 0.
[0034] Optionally, the target Laplacian pyramid represents the first Laplacian pyramid of the target image to be fused;
[0035] The target image to be fused is determined by any of the following methods:
[0036] Randomly determining the target image to be fused from the sequence of images to be fused;
[0037] The image to be fused with the smallest brightness mean value in the sequence of images to be fused is determined as the target image to be fused.
[0038] According to a second aspect of an embodiment of the present disclosure, there is provided an image exposure fusion device, the device comprising:
[0039] an acquisition module configured to acquire a sequence of images to be fused, wherein the sequence of images to be fused includes a plurality of images to be fused, and the plurality of images to be fused are images captured at different exposure levels for the same scene;
[0040] a calculation module, configured to calculate a fused Laplacian pyramid according to the image sequence to be fused;
[0041] a replacement module configured to replace the brightness distribution of the second top-level image of the fused Laplacian pyramid according to the brightness distribution of the first top-level image of the target Laplacian pyramid, so as to obtain a target fused Laplacian pyramid, wherein the target Laplacian pyramid is generated according to the target to-be-fused image in the to-be-fused image sequence;
[0042] The reconstruction module is configured to reconstruct a target image by fusing the Laplacian pyramid according to the target.
[0043] Optionally, the first top-level image and the second top-level image have the same number of pixels, and the replacement module includes:
[0044] a first calculation submodule, configured to calculate a brightness mean and a standard deviation of each pixel in the first top-level image to obtain a first brightness mean and a brightness standard deviation;
[0045] A second calculation submodule is configured to calculate the brightness mean of each pixel in the second top-level image to obtain a second brightness mean;
[0046] a third calculation submodule, configured to calculate a first target brightness value of each pixel in the first top-level image according to a magnitude relationship between the brightness standard deviation and a preset threshold value and the first brightness mean value, to obtain a first target brightness image;
[0047] a first determining submodule, configured to obtain a second target brightness image according to the first target brightness image and the second brightness mean;
[0048] An updating submodule is configured to update the second top-level image according to the second target brightness image to obtain an updated second top-level image, where the top-level image of the target fused Laplacian pyramid is the updated second top-level image.
[0049] Optionally, the third calculation submodule includes:
[0050] The second determination submodule is configured to, when the brightness standard deviation of the first top-level image is less than or equal to the preset threshold, use the difference between the brightness value of each pixel point in the first top-level image and the first brightness mean as the first target brightness value of the pixel point.
[0051] Optionally, the third calculation submodule includes:
[0052] The third determination submodule is configured to calculate, for each pixel point in the first top-level image, a relative standard distance value between the brightness value of the pixel point and the first brightness mean when the brightness standard deviation of the first top-level image is greater than the preset threshold, and use the product of the relative standard distance value and the preset threshold as the first target brightness value of the pixel point.
[0053] Optionally, the first determining submodule is configured to increase the brightness value of each pixel in the first target brightness image by the second brightness mean value to obtain the second target brightness image.
[0054] Optionally, the update submodule is configured to: for each pixel in the second target brightness image, assign the second target brightness value of the pixel to the pixel at the corresponding position in the second top-level image to obtain the updated second top-level image.
[0055] Optionally, the calculation module includes:
[0056] a first decomposition submodule configured to perform Laplacian pyramid decomposition on each image to be fused in the sequence of images to be fused, to obtain a first Laplacian pyramid sequence, where the first Laplacian pyramid sequence includes a plurality of first Laplacian pyramids, each of the first Laplacian pyramids corresponding to one of the images to be fused;
[0057] an acquisition submodule configured to acquire a weight image sequence corresponding to the image sequence to be fused, wherein the weight image sequence includes a plurality of weight images, each weight image corresponds to one image to be fused, and each weight image represents a weight for fusing the image sequence to be fused;
[0058] a second decomposition submodule configured to perform Gaussian pyramid decomposition on each weight image in the weight image sequence to obtain a first Gaussian pyramid sequence, where the first Gaussian pyramid sequence includes a plurality of first Gaussian pyramids, each of the first Gaussian pyramids corresponding to one weight image;
[0059] The generating submodule is configured to generate the fused Laplacian pyramid according to the first Laplacian pyramid sequence and the first Gaussian pyramid sequence.
[0060] Optionally, the generating submodule includes:
[0061] a fourth computing submodule configured to, for each of the first Laplacian pyramids, multiply the first Laplacian pyramid by the corresponding first Gaussian pyramid to obtain a second Laplacian pyramid, wherein the first Gaussian pyramid multiplied by the first Laplacian pyramid and the first Laplacian pyramid correspond to the same image to be fused;
[0062] The fifth calculation submodule is configured to add all the second Laplacian pyramids to obtain the fused Laplacian pyramid.
[0063] Optionally, the first Laplacian pyramid and the first Gaussian pyramid have the same number of layers, and the fourth calculation submodule is configured to multiply the Nth layer of the first Laplacian pyramid by the corresponding Nth layer of the first Gaussian pyramid to obtain the Nth layer of the second Laplacian pyramid, where N is an integer greater than or equal to 0.
[0064] Optionally, the target Laplacian pyramid represents the first Laplacian pyramid of the target image to be fused;
[0065] The target image to be fused is determined by any of the following methods:
[0066] Randomly determining the target image to be fused from the sequence of images to be fused;
[0067] The image to be fused with the smallest brightness mean value in the sequence of images to be fused is determined as the target image to be fused.
[0068] According to a third aspect of an embodiment of the present disclosure, there is provided an image exposure fusion device, comprising:
[0069] processor;
[0070] a memory for storing processor-executable instructions;
[0071] Wherein, the processor is configured to:
[0072] Acquire a sequence of images to be fused, wherein the sequence of images to be fused includes a plurality of images to be fused, and the plurality of images to be fused are images captured at different exposure levels for the same scene;
[0073] Calculating a fused Laplacian pyramid according to the image sequence to be fused;
[0074] replacing the brightness distribution of the second top-level image of the fused Laplacian pyramid according to the brightness distribution of the first top-level image of the target Laplacian pyramid to obtain a target fused Laplacian pyramid, wherein the target Laplacian pyramid is generated according to the target to-be-fused image in the to-be-fused image sequence;
[0075] The target image is reconstructed by fusing the Laplacian pyramid according to the target.
[0076] According to a fourth aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided, on which computer program instructions are stored. When the program instructions are executed by a processor, the steps of the image exposure fusion method provided in the first aspect of the present disclosure are implemented.
[0077] The technical solutions provided by the embodiments of the present disclosure may have the following beneficial effects:
[0078] A sequence of images to be fused is obtained, wherein each image in the sequence is captured at different exposures for the same scene. A fused Laplacian pyramid is calculated based on the sequence of images to be fused. The brightness distribution of the second top image of the fused Laplacian pyramid is replaced with the brightness distribution of the first top image of the target Laplacian pyramid to obtain a target fused Laplacian pyramid. Since the target Laplacian pyramid is generated based on the target image to be fused in the sequence of images to be fused, the brightness distribution of the first top image of the target Laplacian pyramid represents the actual brightness distribution captured by the camera. By replacing the brightness distribution of the second top image obtained through multi-exposure fusion with the actual brightness distribution of the first top image, the brightness distribution of the second top image obtained through multi-exposure fusion can be corrected. That is, the brightness distribution of the top image of the fused Laplacian pyramid can be corrected to obtain a corrected target fused Laplacian pyramid. A target image is reconstructed based on the corrected target fused Laplacian pyramid. The disclosed method can improve the brightness inversion phenomenon in the reconstructed image that occurs when directly reconstructing the image based on the fused Laplacian pyramid in the related art, thereby achieving a more reasonable global brightness distribution of the target image.
[0079] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0080] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0081] Figure 1 The figure is a flowchart of an image exposure fusion method according to an exemplary embodiment.
[0082] Figure 2 An image is shown according to an exemplary embodiment.
[0083] Figure 3 The figure is a block diagram of an image exposure fusion device according to an exemplary embodiment.
[0084] Figure 4 The figure is a block diagram of a device for image exposure fusion according to an exemplary embodiment. DETAILED DESCRIPTION
[0085] Exemplary embodiments will be described in detail herein, with examples illustrated in the accompanying drawings. In the following description, when referring to the drawings, identical numerals in different figures represent identical or similar elements, unless otherwise indicated. The embodiments described in the following exemplary embodiments are not intended to represent all possible embodiments consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
[0086] In order to make it easier for ordinary technicians in this field to understand the technical solution of the present disclosure, the principle of the multi-exposure fusion technology involved in the embodiments of the present disclosure is briefly explained below.
[0087] High-dynamic range (HDR) images provide greater dynamic range and image detail than standard images. They are synthesized using the LDR (Low-Dynamic Range) images with the best detail at each exposure time to create the final HDR image. HDR images can better reflect the visual effects of real-world environments.
[0088] It should be noted that for an image, a corresponding Gaussian pyramid can be constructed. Accordingly, the image can be reconstructed based on the Gaussian pyramid. Based on this, the following multi-exposure fusion process can be understood:
[0089] First, determine multiple images with different exposures (exposure = illumination × time, where illumination is determined by the aperture and time is controlled by the shutter). These multiple images are taken from the same scene at the same shooting angle. For each image, use it as the 0th layer image of the Gaussian pyramid, and downsample this 0th layer image to obtain the 1st layer image of the Gaussian pyramid. Continue downsampling the 1st layer image of the Gaussian pyramid to obtain the 2nd layer image of the Gaussian pyramid, and repeat this process until a Gaussian pyramid with N layers is obtained. Here, downsampling refers to reducing the size of the image. The downsampling process involves performing a Gaussian kernel convolution on the image, and then removing all even rows and even columns in the image to obtain a downsampled image that is only one-quarter the size of the original image.
[0090] Next, for each image's Gaussian pyramid, the corresponding Laplacian pyramid is calculated. The calculation process includes: upsampling the first layer image of the Gaussian pyramid to obtain the upsampled result, subtracting the upsampled result from the 0th layer image of the Gaussian pyramid to obtain the 0th layer image of the Laplacian pyramid. This cycle can obtain the first N-1 layers of the Laplacian pyramid. Since the top layer of the Gaussian pyramid is the last layer, the N-1th layer image of the Gaussian pyramid (i.e., the top layer image) can be directly used as the top layer image of the Laplacian pyramid. Among them, upsampling refers to enlarging the image. The upsampling process includes expanding the image to twice its original size in each direction (horizontally and vertically), filling the newly added pixel rows and pixel columns with 0, and then using the same kernel as the downsampling (multiplied by 4) to convolve with the enlarged image to obtain an approximate value of the "newly added pixels". Thus, the upsampling result is obtained.
[0091] Next, for each image, the weight of each pixel is calculated in turn based on weight indicators (common weight indicators are contrast, saturation, and well exposedness), resulting in a weighted image corresponding to the image. For any pixel with the same position in multiple images, the sum of the weights of the pixel in the multiple images is 1 (i.e., weight normalization in related art). Gaussian pyramid decomposition is performed on the weighted image to obtain a weighted Gaussian pyramid.
[0092] Next, for each image, the Laplacian pyramid of that image is multiplied by the weighted Gaussian pyramid to obtain the corresponding image Laplacian pyramid. The image Laplacian pyramids of all images are summed together to obtain a fused Laplacian pyramid. The image is reconstructed based on the fused Laplacian pyramid, and the resulting image is the HDR image.
[0093] The following is a detailed description of the technical solution of the present disclosure based on the principles of the above-mentioned multi-exposure fusion technology.
[0094] Figure 1 This is a flow chart of an image exposure fusion method according to an exemplary embodiment. The image exposure fusion method is applied in a terminal. For example, it is applied in a terminal such as a camera, a mobile phone with a camera function, a tablet, a computer, etc. Figure 1 As shown, the image exposure fusion method may include the following steps.
[0095] In step S11 , a sequence of images to be fused is obtained, where the sequence of images to be fused includes a plurality of images to be fused, and the plurality of images to be fused are images captured at different exposure levels for the same scene.
[0096] In some embodiments, each image in a sequence of images to be fused is captured from the same scene at the same shooting angle, with each image corresponding to a different exposure. Exposure is the product of illumination and time. Illumination is determined by the aperture, and time is controlled by the shutter. That is, the aperture size and shutter length determine the exposure. Therefore, multiple images to be fused can be captured by the photographer controlling the aperture size and shutter length.
[0097] It should be noted that the present disclosure does not impose any restrictions on the relative order of the images to be fused in the image sequence to be fused. The order of the images to be fused in the image sequence to be fused can be arbitrary.
[0098] In step S12, a fused Laplacian pyramid is calculated according to the image sequence to be fused.
[0099] The implementation method of calculating the fused Laplacian pyramid based on the image sequence to be fused is similar to the multi-exposure fusion process in the aforementioned related art, and will not be repeated here.
[0100] In step S13, the brightness distribution of the second top image of the fused Laplacian pyramid is replaced according to the brightness distribution of the first top image of the target Laplacian pyramid to obtain a target fused Laplacian pyramid, wherein the target Laplacian pyramid is generated according to the target to-be-fused image in the to-be-fused image sequence.
[0101] Based on the principle of the above-mentioned multi-exposure fusion technology, it can be known that in the weight image of each image to be fused, the weight value of each pixel is independently calculated based on the weight index and has nothing to do with other pixels. That is, the overall brightness distribution of the image is not considered when generating the weight image. Correspondingly, in the fused Laplacian pyramid calculated based on the weight image, the brightness distribution of each layer of the image does not take into account the overall brightness distribution of the image. Therefore, brightness inversion will inevitably occur in the HDR image reconstructed based on the fused Laplacian pyramid. It should be noted that when the brightness inversion phenomenon does not occur in a small local area, the phenomenon is not easy to be discovered. Figure 2 Let's take an example to illustrate the brightness inversion phenomenon. Suppose there's a pixel A in the night sky and a pixel B on the ground illuminated by a streetlight. Normally, the brightness of pixel A should be lower than that of pixel B. If the brightness of pixel A is higher than that of pixel B, it indicates brightness inversion.
[0102] The target image to be fused can be any image in the sequence of images to be fused. Since the target image to be fused is a real image captured by a camera, the camera renders the image based on the brightness distribution of the real scene. Since the brightness distribution of the real scene is reasonable, the brightness distribution of the target image to be fused is reasonable and conforms to the overall brightness distribution of the real scene. The target fused Laplacian pyramid obtained by performing Laplacian pyramid decomposition on the target image to be fused conforms to the brightness distribution of the target image to be fused.
[0103] Because the fused Laplacian pyramid calculated using the multi-exposure fusion algorithm doesn't consider the overall brightness distribution, and because the weights have a high tolerance for brightness during the fusion process, the fused Laplacian pyramid can't effectively maintain the global brightness distribution of the image (sequence) to be fused. However, in the disclosed embodiment, by replacing the brightness distribution of the second top image of the fused Laplacian pyramid with the brightness distribution of the first top image of the target Laplacian pyramid, the brightness distribution of the top image of the resulting target fused Laplacian pyramid can be made more consistent with the objective phenomenon of the overall brightness distribution. This means that the brightness distribution of the top image of the target fused Laplacian pyramid is more consistent with the global brightness distribution of the target image to be fused.
[0104] It is worth noting here that in the fused Laplacian pyramid, the higher the layer, the more it affects the overall brightness distribution of the reconstructed image.
[0105] In step S14, the target image is reconstructed by fusing the Laplacian pyramid according to the target.
[0106] The method of reconstructing the target image by fusing the Laplacian pyramid according to the target is consistent with the method of reconstructing the HDR image by fusing the Laplacian pyramid in the related art, and will not be repeated here.
[0107] In this method, a sequence of images to be fused is obtained, each of which is captured at different exposures for the same scene. A fused Laplacian pyramid is calculated based on the sequence of images to be fused. The brightness distribution of the second top image of the fused Laplacian pyramid is replaced with the brightness distribution of the first top image of the target Laplacian pyramid to obtain a target fused Laplacian pyramid. Since the target Laplacian pyramid is generated based on the target image to be fused in the sequence of images to be fused, the brightness distribution of the first top image of the target Laplacian pyramid represents the actual brightness distribution captured by the camera. By replacing the brightness distribution of the second top image obtained through multi-exposure fusion with the actual brightness distribution of the first top image, the brightness distribution of the second top image obtained through multi-exposure fusion can be corrected. That is, the brightness distribution of the top image of the fused Laplacian pyramid can be corrected, resulting in a corrected target fused Laplacian pyramid. The target image is reconstructed based on the corrected target fused Laplacian pyramid. This method can improve the brightness inversion phenomenon that occurs in the reconstructed image when directly reconstructing the image based on the fused Laplacian pyramid in the related art, thereby achieving a more reasonable global brightness distribution of the target image.
[0108] Optionally, the first top image and the second top image have the same number of pixels, and replacing the brightness distribution of the second top image of the fused Laplacian pyramid according to the brightness distribution of the first top image of the target Laplacian pyramid to obtain a target fused Laplacian pyramid includes the following steps:
[0109] The method includes calculating a brightness mean and a standard deviation of each pixel in the first top-level image to obtain a first brightness mean and a brightness standard deviation; calculating a brightness mean of each pixel in the second top-level image to obtain a second brightness mean; calculating a first target brightness value for each pixel in the first top-level image based on a relationship between the brightness standard deviation and a preset threshold and the first brightness mean to obtain a first target brightness image; obtaining a second target brightness image based on the first target brightness image and the second brightness mean; and updating the second top-level image based on the second target brightness image to obtain an updated second top-level image, where the top-level image of the target fused Laplacian pyramid is the updated second top-level image.
[0110] The first target brightness image may represent the brightness distribution of the first top-level image. The second target brightness image may be obtained based on the first target brightness image and the second brightness mean. The second target brightness image may represent the brightness distribution after the brightness distribution of the first top-level image is mapped to the brightness distribution space of the second top-level image.
[0111] Optionally, calculating the first target brightness value of each pixel in the first top-level image according to the magnitude relationship between the brightness standard deviation and a preset threshold and the first brightness mean value includes:
[0112] When the brightness standard deviation of the first top-level image is less than or equal to the preset threshold, for each pixel in the first top-level image, the difference between the brightness value of the pixel and the first brightness mean is used as the first target brightness value of the pixel.
[0113] In related technologies, the brightness standard deviation and brightness mean of an image can be used to evaluate the quality of the image. The average value of the image pixels can reflect the average brightness of the image. The larger the average brightness, the better the image quality. The pixel standard deviation characterizes the degree of dispersion of the grayscale values of the image pixels relative to the mean. The larger the standard deviation, the more dispersed the grayscale distribution in the image, and the better the image quality. However, in some extreme cases, the standard deviation is too large, and when the standard deviation is too large and unreasonable, it will cause the image quality to deteriorate (similar to the principle of exposure transition). Therefore, in the embodiment of the present disclosure, the above-mentioned preset threshold is an empirical value used to avoid the situation where the standard deviation is too large.
[0114] The brightness standard deviation of the first top-level image is used to reflect the degree of dispersion of the brightness values of each pixel in the first top-level image. A larger brightness standard deviation of the first top-level image indicates a greater degree of dispersion of the brightness values of each pixel in the first top-level image. Correspondingly, a smaller brightness standard deviation of the first top-level image indicates a smaller degree of dispersion of the brightness values of each pixel in the first top-level image.
[0115] In some embodiments, the brightness standard deviation and first brightness mean of the first top-level image can be calculated based on the first top-level image. Similarly, the second brightness mean of the second top-level image can be calculated based on the second top-level image. When the brightness standard deviation of the first top-level image is less than or equal to a preset threshold, the difference between the brightness value of each pixel in the first top-level image and the first brightness mean can be calculated. This difference reflects the brightness distribution of the pixel in the brightness distribution space of the first top-level image. This difference represents the first target brightness value of the pixel.
[0116] Optionally, obtaining a second target brightness image according to the first target brightness image and the second brightness mean includes:
[0117] The brightness value of each pixel in the first target brightness image is increased by the second brightness mean value to obtain the second target brightness image.
[0118] In some embodiments, for each pixel in the first target brightness image, the sum of the first target brightness image and the second brightness mean of the pixel is calculated to obtain the second target brightness value of the pixel. The brightness value of each pixel in the second target brightness image is the second target brightness value.
[0119] Optionally, updating the second top-level image according to the second target brightness image to obtain an updated second top-level image includes:
[0120] For each pixel in the second target brightness image, the second target brightness value of the pixel is assigned to the pixel at the corresponding position in the second top-level image to obtain the updated second top-level image.
[0121] In some embodiments, for each pixel in the second target brightness image, the second target brightness value of that pixel is assigned to the pixel at the corresponding position in the second top-level image. For example, the brightness value of the pixel at the corresponding position in the second top-level image is replaced according to the second target brightness value of that pixel. In this way, the brightness distribution of that pixel in the first top-level image can be replaced with the corresponding pixel in the second top-level image. In this way, an updated second top-level image can be obtained, and thus the target fused Laplacian pyramid can be obtained.
[0122] Optionally, calculating the first target brightness value of each pixel in the first top-level image according to the magnitude relationship between the brightness standard deviation and a preset threshold and the first brightness mean value includes:
[0123] When the brightness standard deviation of the first top-level image is greater than the preset threshold, for each pixel point in the first top-level image, the relative standard distance value between the brightness value of the pixel point and the first brightness mean is calculated, and the product of the relative standard distance value and the preset threshold is used as the first target brightness value of the pixel point.
[0124] In some embodiments, the implementation of calculating the relative standard distance value between the brightness value of the pixel point and the first brightness mean value is as follows:
[0125] Relative standard distance value = (pixel brightness value - first brightness mean) / brightness standard deviation. It should be noted that the relative standard distance value is also called standard score or z-score, which represents the process of dividing the difference between a number and the mean by the standard deviation. The z-score can truly reflect the relative standard distance of the brightness value of a pixel from the first brightness mean. If we convert the brightness value of each pixel into a z-score, then each z-score will represent the distance or deviation from the brightness value of a specific pixel to the first brightness mean in units of one brightness standard deviation. The z-score of all pixels represents the brightness distribution of all pixels in units of brightness standard deviation.
[0126] The product of the relative standard distance value and the preset threshold represents the distance or deviation from the brightness value of a specific pixel to the first brightness mean in units of N brightness standard deviations, where N is the quotient of the preset threshold and the brightness standard deviation.
[0127] In some embodiments, the brightness standard deviation and first brightness mean of the first top-level image can be calculated, and the second brightness mean of the second top-level image can be calculated. When the brightness standard deviation of the first top-level image is greater than a preset threshold, for each pixel in the first top-level image, a relative standard distance value between the brightness value of the pixel and the first brightness mean is calculated. This determines the distance or deviation between the brightness value of the pixel and the first brightness mean. The product of the relative standard distance value and the preset threshold can be used as the first target brightness value of the pixel. In this way, the degree of dispersion between the brightness values of each pixel in the first target brightness image is controlled according to the preset threshold.
[0128] Optionally, the calculating a fused Laplacian pyramid according to the image sequence to be fused includes:
[0129] performing Laplacian pyramid decomposition on each to-be-fused image in the to-be-fused image sequence to obtain a first Laplacian pyramid sequence, where the first Laplacian pyramid sequence includes a plurality of first Laplacian pyramids, each of the first Laplacian pyramids corresponding to one of the to-be-fused images;
[0130] Acquire a weight image sequence corresponding to the image sequence to be fused, wherein the weight image sequence includes a plurality of weight images, each weight image corresponds to one image to be fused, and each weight image represents a weight for fusing the image sequence to be fused;
[0131] performing Gaussian pyramid decomposition on each weight image in the weight image sequence to obtain a first Gaussian pyramid sequence, where the first Gaussian pyramid sequence includes a plurality of first Gaussian pyramids, and each first Gaussian pyramid corresponds to one weight image;
[0132] The fused Laplacian pyramid is generated according to the first Laplacian pyramid sequence and the first Gaussian pyramid sequence.
[0133] It should be noted that each first Laplacian pyramid includes multiple image layers from high to low, with higher image layers indicating lower resolution. Correspondingly, each first Gaussian pyramid includes multiple image layers from high to low, with higher image layers indicating lower resolution. The first Laplacian pyramid and the first Gaussian pyramid have the same number of layers, and the image resolution of the same layer in the first Laplacian pyramid and the first Gaussian pyramid is the same. The specific number of layers in the first Laplacian pyramid and the first Gaussian pyramid can be customized based on requirements.
[0134] For example, if the resolution of the image to be fused is 4000*3000, the resolution of the top image of the first Laplacian pyramid and the first Gaussian pyramid may be 4*3.
[0135] For example, the resolution of the 0th layer image of the first Laplacian pyramid is 4000*3000, the resolution of the 1st layer image is 2000*1500, the resolution of the 2nd layer image is 1000*750, the resolution of the 3rd layer image is 500*375, and the resolution of the 3rd layer image is 250*200 (375 divided by 2 is 187.5, and 187.5 is rounded up to 200). This process is repeated to determine the resolution of the image of each layer of the first Laplacian pyramid.
[0136] Each image to be fused corresponds to a weight image, and the resolution of the weight image is the same as that of the image to be fused. The value of each pixel in the weight image is a weight value, which is calculated based on the weight index of the pixel at the same position in the corresponding image to be fused. As mentioned above, the weight index includes at least one of contrast, saturation, and well-exposedness.
[0137] In multiple images to be fused, the sum of the weight values corresponding to pixels at the same position is 1.
[0138] Optionally, generating the fused Laplacian pyramid according to the first Laplacian pyramid sequence and the first Gaussian pyramid sequence includes:
[0139] For each of the first Laplacian pyramids, the first Laplacian pyramid is multiplied by the corresponding first Gaussian pyramid to obtain a second Laplacian pyramid, wherein the first Gaussian pyramid multiplied by the first Laplacian pyramid and the first Laplacian pyramid correspond to the same image to be fused; and all the second Laplacian pyramids are added together to obtain the fused Laplacian pyramid.
[0140] In detail, the first Laplacian pyramid and the first Gaussian pyramid have the same number of layers, and the multiplying the first Laplacian pyramid with the corresponding first Gaussian pyramid includes: multiplying the Nth layer of the first Laplacian pyramid with the Nth layer of the corresponding first Gaussian pyramid to obtain the Nth layer of the second Laplacian pyramid, where N is an integer greater than or equal to 0.
[0141] For example, in the process of multiplying the Nth layer of the first Laplacian pyramid with the Nth layer of the corresponding first Gaussian pyramid, the pixel value of the pixel with coordinates (i, j) in the Nth layer of the first Laplacian pyramid may be multiplied by the weight value of the pixel with coordinates (i, j) in the Nth layer of the first Gaussian pyramid to obtain the pixel value of the pixel with coordinates (i, j) in the Nth layer of the second Laplacian pyramid. The pixel value includes a brightness value and R, G, and B color channel values.
[0142] An example of the process of adding all second Laplacian pyramids to obtain a fused Laplacian pyramid is given: the sum of the pixel values of the pixel points with coordinates (i, j) in the Nth layer of all second Laplacian pyramids is calculated to obtain the fused pixel value of the pixel point with coordinates (i, j) in the Nth layer of the fused Laplacian pyramid.
[0143] Optionally, the target Laplacian pyramid represents the first Laplacian pyramid of the target image to be fused; the target image to be fused is determined by any one of the following methods:
[0144] The target image to be fused is randomly determined from the sequence of images to be fused; and the image to be fused with the smallest brightness mean in the sequence of images to be fused is determined as the target image to be fused.
[0145] The image to be fused with the smallest average brightness value in the sequence of images to be fused is the darkest image to be fused in the sequence of images to be fused.
[0146] In some feasible implementations, the image with the largest brightness standard deviation in the image sequence to be fused can be determined as the target image to be fused based on requirements. Alternatively, the image with the median exposure value in the image sequence to be fused can be determined as the target image to be fused. This disclosure is not limited to this.
[0147] Figure 3 FIG. 1 is a block diagram of an image exposure fusion device according to an exemplary embodiment. Figure 3 , the apparatus 300 comprises:
[0148] An acquisition module 310 is configured to acquire a sequence of images to be fused, wherein the sequence of images to be fused includes a plurality of images to be fused, and the plurality of images to be fused are images captured at different exposure levels for the same scene;
[0149] A calculation module 320 is configured to calculate a fused Laplacian pyramid according to the image sequence to be fused;
[0150] a replacement module 330 configured to replace the brightness distribution of the second top image of the fused Laplacian pyramid according to the brightness distribution of the first top image of the target Laplacian pyramid to obtain a target fused Laplacian pyramid, wherein the target Laplacian pyramid is generated according to the target to-be-fused image in the to-be-fused image sequence;
[0151] The reconstruction module 340 is configured to reconstruct a target image based on the target fused Laplacian pyramid.
[0152] Using the above-described apparatus, a sequence of images to be fused is obtained, wherein each image in the sequence is captured at different exposures for the same scene. A fused Laplacian pyramid is calculated based on the sequence of images to be fused. The brightness distribution of the second top image of the fused Laplacian pyramid is replaced with the brightness distribution of the first top image of the target Laplacian pyramid to obtain a target fused Laplacian pyramid. Since the target Laplacian pyramid is generated based on the target image to be fused in the sequence of images to be fused, the brightness distribution of the first top image of the target Laplacian pyramid represents the actual brightness distribution captured by the camera. By replacing the brightness distribution of the second top image obtained through multi-exposure fusion with the actual brightness distribution of the first top image, the brightness distribution of the second top image obtained through multi-exposure fusion can be corrected, that is, the brightness distribution of the top image of the fused Laplacian pyramid can be corrected, thereby obtaining a corrected target fused Laplacian pyramid. The target image is reconstructed based on the corrected target fused Laplacian pyramid. The disclosed method can improve the brightness inversion phenomenon in the reconstructed image that occurs when directly reconstructing the image based on the fused Laplacian pyramid in the related art, thereby achieving a more reasonable global brightness distribution of the target image.
[0153] Optionally, the first top-level image and the second top-level image have the same number of pixels, and the replacement module 330 includes:
[0154] a first calculation submodule, configured to calculate a brightness mean and a standard deviation of each pixel in the first top-level image to obtain a first brightness mean and a brightness standard deviation;
[0155] A second calculation submodule is configured to calculate the brightness mean of each pixel in the second top-level image to obtain a second brightness mean;
[0156] a third calculation submodule, configured to calculate a first target brightness value of each pixel in the first top-level image according to a magnitude relationship between the brightness standard deviation and a preset threshold value and the first brightness mean value, to obtain a first target brightness image;
[0157] a first determining submodule, configured to obtain a second target brightness image according to the first target brightness image and the second brightness mean;
[0158] An updating submodule is configured to update the second top-level image according to the second target brightness image to obtain an updated second top-level image, where the top-level image of the target fused Laplacian pyramid is the updated second top-level image.
[0159] Optionally, the third calculation submodule includes:
[0160] The second determination submodule is configured to, when the brightness standard deviation of the first top-level image is less than or equal to the preset threshold, use the difference between the brightness value of each pixel point in the first top-level image and the first brightness mean as the first target brightness value of the pixel point.
[0161] Optionally, the third calculation submodule includes:
[0162] The third determination submodule is configured to calculate, for each pixel point in the first top-level image, a relative standard distance value between the brightness value of the pixel point and the first brightness mean when the brightness standard deviation of the first top-level image is greater than the preset threshold, and use the product of the relative standard distance value and the preset threshold as the first target brightness value of the pixel point.
[0163] Optionally, the first determining submodule is configured to increase the brightness value of each pixel in the first target brightness image by the second brightness mean value to obtain the second target brightness image.
[0164] Optionally, the update submodule is configured to: for each pixel in the second target brightness image, assign the second target brightness value of the pixel to the pixel at the corresponding position in the second top-level image to obtain the updated second top-level image.
[0165] Optionally, the calculation module 320 includes:
[0166] a first decomposition submodule configured to perform Laplacian pyramid decomposition on each image to be fused in the sequence of images to be fused, to obtain a first Laplacian pyramid sequence, where the first Laplacian pyramid sequence includes a plurality of first Laplacian pyramids, each of the first Laplacian pyramids corresponding to one of the images to be fused;
[0167] an acquisition submodule configured to acquire a weight image sequence corresponding to the image sequence to be fused, wherein the weight image sequence includes a plurality of weight images, each weight image corresponds to one image to be fused, and each weight image represents a weight for fusing the image sequence to be fused;
[0168] a second decomposition submodule configured to perform Gaussian pyramid decomposition on each weight image in the weight image sequence to obtain a first Gaussian pyramid sequence, where the first Gaussian pyramid sequence includes a plurality of first Gaussian pyramids, each of the first Gaussian pyramids corresponding to one weight image;
[0169] The generating submodule is configured to generate the fused Laplacian pyramid according to the first Laplacian pyramid sequence and the first Gaussian pyramid sequence.
[0170] Optionally, the generating submodule includes:
[0171] a fourth computing submodule configured to, for each of the first Laplacian pyramids, multiply the first Laplacian pyramid by the corresponding first Gaussian pyramid to obtain a second Laplacian pyramid, wherein the first Gaussian pyramid multiplied by the first Laplacian pyramid and the first Laplacian pyramid correspond to the same image to be fused;
[0172] The fifth calculation submodule is configured to add all the second Laplacian pyramids to obtain the fused Laplacian pyramid.
[0173] Optionally, the first Laplacian pyramid and the first Gaussian pyramid have the same number of layers, and the fourth calculation submodule is configured to multiply the Nth layer of the first Laplacian pyramid by the corresponding Nth layer of the first Gaussian pyramid to obtain the Nth layer of the second Laplacian pyramid, where N is an integer greater than or equal to 0.
[0174] Optionally, the target Laplacian pyramid represents the first Laplacian pyramid of the target image to be fused;
[0175] The target image to be fused is determined by any of the following methods:
[0176] Randomly determining the target image to be fused from the sequence of images to be fused;
[0177] The image to be fused with the smallest brightness mean value in the sequence of images to be fused is determined as the target image to be fused.
[0178] Regarding the apparatus in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0179] The present disclosure also provides a computer-readable storage medium having computer program instructions stored thereon. When the program instructions are executed by a processor, the steps of the image exposure fusion method provided by the present disclosure are implemented.
[0180] Figure 4 FIG8 is a block diagram of an apparatus 800 for image exposure fusion according to an exemplary embodiment. For example, the apparatus 800 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.
[0181] Reference Figure 4 , the apparatus 800 may include one or more of the following components: a processing component 802 , a memory 804 , a power component 806 , a multimedia component 808 , an audio component 810 , an input / output (I / O) interface 812 , a sensor component 814 , and a communication component 816 .
[0182] The processing component 802 generally controls the overall operation of the device 800, such as operations associated with display, phone calls, data communications, camera operation, and recording. The processing component 802 may include one or more processors 820 to execute instructions to perform all or part of the steps of the image exposure fusion method described above. Furthermore, the processing component 802 may include one or more modules to facilitate interaction between the processing component 802 and other components. For example, the processing component 802 may include a multimedia module to facilitate interaction between the multimedia component 808 and the processing component 802.
[0183] The memory 804 is configured to store various types of data to support the operations of the device 800. Examples of such data include instructions for any application or method operating on the device 800, contact data, phone book data, messages, pictures, videos, etc. The memory 804 can be implemented by any type of volatile or non-volatile storage device, or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk, or optical disk.
[0184] The power component 806 provides power to the various components of the device 800. The power component 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the device 800.
[0185] The multimedia component 808 includes a screen that provides an output interface between the device 800 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen can be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, slides, and gestures on the touch panel. The touch sensor can not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front camera and / or a rear camera. When the device 800 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera can receive external multimedia data. Each front camera and rear camera can be a fixed optical lens system or have focal length and optical zoom capabilities.
[0186] The audio component 810 is configured to output and / or input audio signals. For example, the audio component 810 includes a microphone (MIC), which is configured to receive external audio signals when the device 800 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signal can be further stored in the memory 804 or transmitted via the communication component 816. In some embodiments, the audio component 810 also includes a speaker for outputting audio signals.
[0187] I / O interface 812 provides an interface between processing component 802 and peripheral interface modules, such as a keyboard, click wheel, buttons, etc. These buttons may include but are not limited to: a home button, volume buttons, a start button, and a lock button.
[0188] The sensor assembly 814 includes one or more sensors for providing various aspects of the status assessment of the device 800. For example, the sensor assembly 814 can detect the open / closed state of the device 800, the relative positioning of components, such as the display and keypad of the device 800. The sensor assembly 814 can also detect changes in the position of the device 800 or a component of the device 800, the presence or absence of user contact with the device 800, the orientation or acceleration / deceleration of the device 800, and temperature changes of the device 800. The sensor assembly 814 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 814 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an accelerometer, a gyroscope, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0189] The communication component 816 is configured to facilitate wired or wireless communication between the device 800 and other devices. The device 800 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 816 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0190] In an exemplary embodiment, the device 800 can be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the above-mentioned image exposure fusion method.
[0191] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 804 including instructions. The instructions can be executed by the processor 820 of the apparatus 800 to perform the above-described image exposure fusion method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
[0192] In another exemplary embodiment, a computer program product is further provided. The computer program product includes a computer program executable by a programmable device, and has a code portion for performing the above-mentioned image exposure fusion method when executed by the programmable device.
[0193] Other embodiments of the present disclosure will readily occur to those skilled in the art after considering the specification and practicing the present disclosure. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art not disclosed herein. The description and examples are to be considered as exemplary only, with the true scope and spirit of the present disclosure being indicated by the following claims.
[0194] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes can be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims
1. An image exposure fusion method, characterized in that: The method comprises: Acquire a sequence of images to be fused, wherein the sequence of images to be fused includes a plurality of images to be fused, and the plurality of images to be fused are images captured at different exposure levels for the same scene; Calculating a fused Laplacian pyramid according to the image sequence to be fused; replacing the brightness distribution of the second top-level image of the fused Laplacian pyramid according to the brightness distribution of the first top-level image of the target Laplacian pyramid to obtain a target fused Laplacian pyramid, wherein the target Laplacian pyramid is generated according to a target image to be fused in the sequence of images to be fused, and the target image to be fused is any image in the sequence of images to be fused; Reconstructing a target image by fusing the Laplacian pyramid according to the target; The replacing the brightness distribution of the second top image of the fused Laplacian pyramid according to the brightness distribution of the first top image of the target Laplacian pyramid to obtain the target fused Laplacian pyramid includes: Calculating the brightness mean and standard deviation of each pixel in the first top-level image to obtain a first brightness mean and brightness standard deviation; calculating the brightness mean of each pixel in the second top-level image to obtain a second brightness mean; Calculating a first target brightness value of each pixel in the first top-level image according to a magnitude relationship between the brightness standard deviation and a preset threshold value and the first brightness mean value, to obtain a first target brightness image; A second target brightness image is obtained according to the first target brightness image and the second brightness mean value; and the second top-layer image is updated according to the second target brightness image to obtain an updated second top-layer image.
2. The method according to claim 1, characterized in that The first top-level image and the second top-level image have the same number of pixels.
3. The method according to claim 2, characterized in that The calculating, according to the magnitude relationship between the brightness standard deviation and the preset threshold value and the first brightness mean, a first target brightness value of each pixel in the first top-level image includes: When the brightness standard deviation of the first top-level image is less than or equal to the preset threshold, for each pixel in the first top-level image, the difference between the brightness value of the pixel and the first brightness mean is used as the first target brightness value of the pixel.
4. The method according to claim 2, characterized in that The calculating, according to the magnitude relationship between the brightness standard deviation and the preset threshold value and the first brightness mean, a first target brightness value of each pixel in the first top-level image includes: When the brightness standard deviation of the first top-level image is greater than the preset threshold, for each pixel point in the first top-level image, the relative standard distance value between the brightness value of the pixel point and the first brightness mean is calculated, and the product of the relative standard distance value and the preset threshold is used as the first target brightness value of the pixel point.
5. The method according to any one of claims 2 to 4, characterized in that The step of obtaining a second target brightness image according to the first target brightness image and the second brightness mean value includes: The brightness value of each pixel in the first target brightness image is increased by the second brightness mean value to obtain the second target brightness image.
6. The method according to claim 2, characterized in that Updating the second top-level image according to the second target brightness image to obtain an updated second top-level image includes: For each pixel in the second target brightness image, the second target brightness value of the pixel is assigned to the pixel at the corresponding position in the second top-level image to obtain the updated second top-level image.
7. The method according to claim 1, characterized in that The calculating the fused Laplacian pyramid according to the image sequence to be fused includes: performing Laplacian pyramid decomposition on each to-be-fused image in the to-be-fused image sequence to obtain a first Laplacian pyramid sequence, where the first Laplacian pyramid sequence includes a plurality of first Laplacian pyramids, each of the first Laplacian pyramids corresponding to one of the to-be-fused images; Acquire a weight image sequence corresponding to the image sequence to be fused, wherein the weight image sequence includes a plurality of weight images, each weight image corresponds to one image to be fused, and each weight image represents a weight for fusing the image sequence to be fused; performing Gaussian pyramid decomposition on each weight image in the weight image sequence to obtain a first Gaussian pyramid sequence, where the first Gaussian pyramid sequence includes a plurality of first Gaussian pyramids, and each first Gaussian pyramid corresponds to one weight image; The fused Laplacian pyramid is generated according to the first Laplacian pyramid sequence and the first Gaussian pyramid sequence.
8. The method according to claim 7, characterized in that Generating the fused Laplacian pyramid according to the first Laplacian pyramid sequence and the first Gaussian pyramid sequence includes: For each of the first Laplacian pyramids, multiply the first Laplacian pyramid by the corresponding first Gaussian pyramid to obtain a second Laplacian pyramid, wherein the first Gaussian pyramid multiplied by the first Laplacian pyramid and the first Laplacian pyramid correspond to the same image to be fused; All the second Laplacian pyramids are added together to obtain the fused Laplacian pyramid.
9. The method according to claim 8, characterized in that The first Laplacian pyramid and the first Gaussian pyramid have the same number of layers, and multiplying the first Laplacian pyramid by the corresponding first Gaussian pyramid includes: The Nth layer of the first Laplacian pyramid is multiplied by the Nth layer of the corresponding first Gaussian pyramid to obtain the Nth layer of the second Laplacian pyramid, where N is an integer greater than or equal to 0.
10. The method according to any one of claims 7 to 9, characterized in that The target Laplacian pyramid represents the first Laplacian pyramid corresponding to the target image to be fused; The target image to be fused is determined by any of the following methods: Method 1: randomly determining the target image to be fused from the sequence of images to be fused; Mode 2: Determine the image to be fused with the smallest brightness mean value in the sequence of images to be fused as the target image to be fused.
11. An image exposure and fusion device, characterized in that: The device comprises: an acquisition module configured to acquire a sequence of images to be fused, wherein the sequence of images to be fused includes a plurality of images to be fused, and the plurality of images to be fused are images captured at different exposure levels for the same scene; a calculation module, configured to calculate a fused Laplacian pyramid according to the image sequence to be fused; a replacement module configured to replace the brightness distribution of the second top-level image of the fused Laplacian pyramid according to the brightness distribution of the first top-level image of the target Laplacian pyramid, so as to obtain a target fused Laplacian pyramid, wherein the target Laplacian pyramid is generated according to a target image to be fused in the sequence of images to be fused, and the target image to be fused is any image in the sequence of images to be fused; A reconstruction module is configured to reconstruct a target image based on the target fused Laplacian pyramid; The replacement module includes: a first calculation submodule, configured to calculate a brightness mean and a standard deviation of each pixel in the first top-level image to obtain a first brightness mean and a brightness standard deviation; A second calculation submodule is configured to calculate the brightness mean of each pixel in the second top-level image to obtain a second brightness mean; a third calculation submodule, configured to calculate a first target brightness value of each pixel in the first top-level image according to a magnitude relationship between the brightness standard deviation and a preset threshold value and the first brightness mean value, to obtain a first target brightness image; a first determining submodule, configured to obtain a second target brightness image according to the first target brightness image and the second brightness mean; The updating submodule is configured to update the second top-level image according to the second target brightness image to obtain an updated second top-level image.
12. An image exposure and fusion device, characterized in that: include: processor; a memory for storing processor-executable instructions; Wherein, the processor is configured to: Acquire a sequence of images to be fused, wherein the sequence of images to be fused includes a plurality of images to be fused, and the plurality of images to be fused are images captured at different exposure levels for the same scene; Calculating a fused Laplacian pyramid according to the image sequence to be fused; replacing the brightness distribution of the second top-level image of the fused Laplacian pyramid according to the brightness distribution of the first top-level image of the target Laplacian pyramid to obtain a target fused Laplacian pyramid, wherein the target Laplacian pyramid is generated according to a target image to be fused in the sequence of images to be fused, and the target image to be fused is any image in the sequence of images to be fused; Reconstructing a target image by fusing the Laplacian pyramid according to the target; The replacing the brightness distribution of the second top image of the fused Laplacian pyramid according to the brightness distribution of the first top image of the target Laplacian pyramid to obtain the target fused Laplacian pyramid includes: Calculating the brightness mean and standard deviation of each pixel in the first top-level image to obtain a first brightness mean and brightness standard deviation; calculating the brightness mean of each pixel in the second top-level image to obtain a second brightness mean; Calculating a first target brightness value of each pixel in the first top-level image according to a magnitude relationship between the brightness standard deviation and a preset threshold value and the first brightness mean value, to obtain a first target brightness image; A second target brightness image is obtained according to the first target brightness image and the second brightness mean value; and the second top-layer image is updated according to the second target brightness image to obtain an updated second top-layer image.
13. A computer-readable storage medium having computer program instructions stored thereon, characterized in that: When the program instructions are executed by a processor, the steps of the method according to any one of claims 1 to 10 are implemented.
Citation Information
Patent Citations
Image processing method and device and storage medium
CN113191994A