Multi-exposure image fusion algorithm based on gradient tensor guided adaptive edge preserving pyramid
Adaptive edge-keeping pyramid algorithm guided by gradient tensors solves the problem of inaccurate contrast information and the need for supervised training in the multi-exposure fusion algorithm, achieving higher quality image fusion, retaining detailed information and expanding Dynamic range.
Patent Information
- Application Number
- CN202411029189.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-30
- Publication Date
- 2024-11-15
AI Technical Summary
The existing multi-exposure fusion algorithm ignores the correlation between channels in RGB images, resulting in inaccurate contrast information, resulting in loss of detail and color degradation. The deep learning-based algorithm requires supervised training, making it difficult to obtain unsupervised conditions. Satisfied results.
The adaptive edge-keeping pyramid algorithm based on gradient tensor guidance is used to construct the initial weight graph through gradient tensor, adaptive Gaussian function and standard deviation between channels, and optimize the weight graph using gradient tensor guidance filter, and finally, the weight graph is optimized with Laplace Image Pyramid Fusion to generate a fusion image.
It effectively improves the local contrast of the image, retains edge and detail information, weakens halo phenomenon, significantly improves the quality of the fusion image, and expands the dynamic range.
Smart Images

Figure CN118967472A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the field of high dynamic range imaging and relates to a multi-exposure image fusion algorithm based on a gradient tensor guided adaptive edge-preserving pyramid. Background Art
[0002] High Dynamic Range (HDR) imaging is an important technology that allows for a wide dynamic range of exposures and is of great significance in the fields of image processing, computer graphics, and computer vision. Dynamic range refers to the range of brightness differences between the darkest and brightest parts of an image. The larger the value, the richer the details in the brightness of the image. Although natural scenes contain a wide dynamic range, general digital cameras are limited by the characteristics of the sensor and can only capture a limited dynamic range, resulting in the captured images usually failing to achieve ideal visual effects.
[0003] In order to overcome these limitations, high dynamic range (HDR) imaging technology came into being. Domestic and foreign scholars have conducted extensive research on this type of image processing algorithm and proposed many effective algorithms. A common method in HDR imaging is Multi-Exposure Fusion (MEF) technology. This technology generates HDR images with high-quality visual information and a wide brightness range by fusing a series of low dynamic range (Low Dynamic Range, LDR) images obtained at different exposures. However, there are still some problems in the multi-exposure fusion algorithm:
[0004] (1) Existing traditional algorithms ignore the correlation between the three channels in RGB images and only convert RGB images into single-channel grayscale images for calculation. In this conversion, the contrast information between the three channels is weakened. More specifically, considering that the contrast information to be extracted comes from multiple images, the limited information will cause the important features of the weight map to be weakened during the normalization process. Therefore, the estimated contrast information is not accurate enough, which will lead to detail loss and color degradation.
[0005] (2) Existing deep learning-based algorithms use neural networks to achieve powerful feature extraction capabilities. Although they can overcome the limitations of traditional hand-crafted methods and improve performance in different scenarios, there are still problems: First, most deep learning algorithms must use supervised methods to provide satisfactory results. This requires providing real high dynamic range images that match the input sequence of different exposure images to train the network. Although unsupervised deep learning algorithms are being proposed, it is still difficult to obtain satisfactory results. Summary of the invention
[0006] Purpose of the invention: The purpose of the present invention is to provide a multi-exposure image fusion algorithm based on a gradient tensor guided adaptive edge-preserving pyramid to improve the dynamic range and local contrast of an image.
[0007] Technical solution: To achieve the above-mentioned purpose, the multi-exposure image fusion algorithm based on gradient tensor guided adaptive edge-preserving pyramid described in the present invention comprises the following steps:
[0008] Step 1: Collect multiple input images I with different exposures k ;
[0009] Step 2: Use the gradient tensor, adaptive Gaussian function, and inter-channel pixel standard deviation to transform the input image I k Construct an initial weight graph;
[0010] Step 3: Use the gradient tensor to guide the filter to optimize the initial weight map;
[0011] Step 4: The image pyramid constructed by using the optimized weight map is merged with the Laplacian image pyramid constructed by the input image to obtain an optimized image pyramid;
[0012] Step 5: Use the optimized image pyramid to reconstruct the fused image.
[0013] Preferably, the input image in step 1 is a color image with different exposures.
[0014] Preferably, the method for collecting multiple input images with different exposures in step 1 is: controlling different exposure times to establish a color image model with different exposures, which is expressed as shown in the following formula:
[0015]
[0016] In the formula, I k represents the kth original input image, f c represents the camera response function of channel c, E k,c (p) represents the irradiance of pixel p in channel c of the kth original input image, Δt k represents the exposure time of the kth original input image, n q,k,c (p) represents the sensor noise of pixel p in channel c of the kth original input image, n f,k,c (p) represents the electronic noise of pixel p in channel c of the kth original input image.
[0017] Preferably, the step 2 uses the gradient tensor, the adaptive Gaussian function, and the standard deviation of the pixels between channels to calculate the input image I k Constructing the initial weight graph includes the following steps:
[0018] Step 21: Using each original input image I k Obtain the gradient tensor and construct the contrast parameter value as follows:
[0019]
[0020] in:
[0021]
[0022] In the formula, C k (p) is the contrast parameter value of pixel p in the kth original input image, where R, G, and B represent the pixel values of the red, green, and blue channels, respectively;
[0023] Step 22: Using each original input image I k Obtain the adaptive Gaussian function response value and construct a good exposure value as follows:
[0024]
[0025] In the formula, E k (p) is the good exposure value of pixel p in the kth original input image, Y k , Represents the original input image I k The pixel value of the Y channel after conversion to the YUV color space; σ g ,σ l are the global and local good exposure weight decay rate control parameters, with values of 0.5 and 0.2 respectively;
[0026] Step 23: Using each original input image I k Find the standard deviation of pixels between channels and construct the saturation value as follows:
[0027]
[0028] in:
[0029] μ(p)=[R(p)+G(p)+B(p)] / 3,
[0030] In the formula, S k (p),μ k (p) is the saturation value and inter-channel mean of pixel p in the k-th original input image;
[0031] Step 24: based on the contrast parameter value C of pixel p in the kth original input image k (p), good exposure value E k (p), saturation value S k (p) Construct the initial parameter value W of the weight graphk (p), as shown below:
[0032]
[0033] Where W k (p) is the initial parameter value of pixel p in the kth original input image, ω c ,ω s ,ω e are weight control parameters, and their values are 1, 1, and 1 respectively.
[0034] Preferably, the process of optimizing the initial weight map by using the gradient tensor to guide the filter in step 3 is: Perform function value minimization operation to solve and obtain the initial weight graph optimization formula as follows:
[0035] W * k (p) = a p Y k (p)+b p ;
[0036] In the formula, (a p ,b p ) represents the linear coefficient within the window when the center of the local filtering window is located at pixel p, ω p,r W represents a window with a radius of r and a center of the local filtering window at pixel p. k represents the parameter image of the kth input image, Y k represents the brightness image of the kth input image, W * k represents the optimized parameter image of the kth input image, represents the edge-aware constraint, g p represents the edge protection constraint, and λ represents the regularization parameter.
[0037] Preferably, the linear coefficients of the gradient tensor guided filter are solved as follows:
[0038]
[0039] In the formula, μ p Represents the brightness image Y k In the local window ω p,r The mean value in Denotes the parameter image W k Local Windowω p,r The mean in |ω| represents the local window ω p,r The total number of pixels in .
[0040] Preferably, the edge-aware constraint of the gradient domain weighted guided filtering As shown below:
[0041]
[0042] In the formula, Represents the brightness image Y k In the local window ω r , C represents the gradient tensor, ε is a hyperparameter set to 0.000001, and N represents the total number of pixels in the brightness image.
[0043] Preferably, the edge protection constraint g of the gradient domain weighted guided filtering is p , as shown below:
[0044]
[0045] in:
[0046]
[0047] In the formula, represents the edge perception constraint, and N represents the total number of pixels in the brightness image.
[0048] Preferably, the image pyramid constructed using the optimized weight map in step 4 is fused with the Laplacian image pyramid constructed by the input image to obtain an optimized image pyramid, including first obtaining a brightness image pyramid, obtaining an optimized parameter pyramid based on the brightness image pyramid, and fusing the Laplacian pyramid of the input image with the optimized parameter pyramid to obtain an optimized image pyramid.
[0049] Preferably, the optimized image pyramid specifically comprises the following steps:
[0050] Step 41, obtain the brightness image pyramid, as shown below:
[0051]
[0052] In the formula is the lth layer of the brightness image pyramid, l∈[1,L-1], L is the total number of pyramid layers, Down(·) represents the downsampling operation, Gauss(·) represents the Gaussian blur function, which is obtained by convolving the Gaussian kernel with the corresponding image, and a 5×5 Gaussian kernel is selected;
[0053] Step 42: Obtain the optimization parameter pyramid as shown below:
[0054]
[0055] In the formula is the lth layer of the optimized parameter pyramid, l∈[1,L]; where the first layer of the optimized parameter pyramid W * k represents the optimized parameter image of the kth input image, a of the 2-L layer l ,b l , l∈[1,L], then the linear parameter obtained by linear coefficient is downsampled;
[0056] Step 43: Use the optimized parameter pyramid to fuse the Laplacian pyramid of the original input image, as shown below:
[0057]
[0058] Where L l is the lth level of the optimized image pyramid, is the lth layer of the kth original input image pyramid.
[0059] Beneficial effects: The present invention has the following advantages: 1. The present invention uses the gradient tensor to solve the constraint information in the three color channels of the exposure image to extract more effective information, effectively improving the local contrast of the image;
[0060] 2. The present invention uses a gradient tensor guided filter and a pyramid decomposition method to adaptively optimize the constructed weight map at different scales, which helps to retain edge and detail information and effectively reduce the halo phenomenon that is easily caused by existing methods;
[0061] 3. The gradient tensor and adaptive Gaussian function used in the present invention can adjust their parameter values according to different scenes, thereby realizing adaptive adjustment of the weight information of the parameter map, effectively retaining the detail information in images with different exposures, significantly improving the quality of the fused image, and expanding the dynamic range. BRIEF DESCRIPTION OF THE DRAWINGS
[0062] Figure 1 It is a flow chart of a multi-exposure image fusion algorithm based on a gradient tensor guided adaptive edge-preserving pyramid of the present invention;
[0063] Figure 2 It is a specific algorithm flow chart of the multi-exposure image fusion algorithm based on the gradient tensor guided adaptive edge-preserving pyramid of the present invention;
[0064] Figure 3 This is a diagram showing the effect of the multi-exposure image fusion algorithm based on the gradient tensor guided adaptive edge-preserving pyramid of the present invention. DETAILED DESCRIPTION
[0065] The technical solution of the present invention is described in detail below in conjunction with the embodiments and drawings.
[0066] See also Figure 1 , Figure 2 , Figure 3 As shown, the multi-exposure image fusion algorithm based on gradient tensor guided adaptive edge-preserving pyramid described in the present invention includes the following steps:
[0067] Step 1: Collect multiple input images I with different exposures k ;
[0068] Step 2: Use the gradient tensor, adaptive Gaussian function, and inter-channel pixel standard deviation to transform the input image I k Construct an initial weight graph;
[0069] Step 3: Use the gradient tensor to guide the filter to optimize the initial weight map;
[0070] Step 4: The image pyramid constructed by using the optimized weight map is merged with the Laplacian image pyramid constructed by the input image to obtain an optimized image pyramid;
[0071] Step 5: Use the optimized image pyramid to reconstruct the fused image.
[0072] Preferably, the input image in step 1 is a color image with different exposures.
[0073] Preferably, the method for collecting multiple input images with different exposures in step 1 is: controlling different exposure times to establish a color image model with different exposures, which is expressed as shown in the following formula:
[0074]
[0075] In the formula, I k represents the kth original input image, f c represents the camera response function of channel c, E k,c (p) represents the irradiance of pixel p in channel c of the kth original input image, Δt k represents the exposure time of the kth original input image, n q,k,c (p) represents the sensor noise of pixel p in channel c of the kth original input image, n f,k,c (p) represents the electronic noise of pixel p in channel c of the kth original input image.
[0076] Preferably, the step 2 uses the gradient tensor, the adaptive Gaussian function, and the standard deviation of the pixels between channels to calculate the input image I k Constructing the initial weight graph includes the following steps:
[0077] Step 21: Using each original input image I kObtain the gradient tensor and construct the contrast parameter value as follows:
[0078]
[0079] in:
[0080]
[0081] In the formula, C k (p) is the contrast parameter value of pixel p in the kth original input image, R, G, B represent the pixel values of the red, green, and blue channels respectively;
[0082] Step 22: Using each original input image I k Obtain the adaptive Gaussian function response value and construct a good exposure value as follows:
[0083]
[0084] In the formula, E k (p) is the good exposure value of pixel p in the kth original input image, Y k , Represents the original input image I k The pixel value of the Y channel after conversion to the YUV color space; σ g ,σ l They are the global and local good exposure weight decay rate control parameters, with values of 0.5 and 0.2 respectively;
[0085] Step 23: Using each original input image I k Find the standard deviation of pixels between channels and construct the saturation value as follows:
[0086]
[0087] in:
[0088] μ(p)=[R(p)+G(p)+B(p)] / 3,
[0089] In the formula, S k (p),μ k (p) is the saturation value and inter-channel mean of pixel p in the k-th original input image;
[0090] Step 24: based on the contrast parameter value C of pixel p in the kth original input image k (p), good exposure value E k (p), saturation value S k (p) Construct the initial parameter value W of the weight graph k (p), as shown below:
[0091]
[0092] Where W k (p) is the initial parameter value of pixel p in the kth original input image, ω c ,ω s ,ω e are weight control parameters, and their values are 1, 1, and 1 respectively.
[0093] Preferably, the process of optimizing the initial weight map by using the gradient tensor to guide the filter in step 3 is: Perform function value minimization operation to solve and obtain the initial weight graph optimization formula as follows:
[0094] W * k (p) = a p Y k (p)+b p ;
[0095] In the formula, (a p ,b p ) represents the linear coefficient within the window when the center of the local filtering window is located at pixel p, ω p,r W represents a window with a radius of r and a center of the local filtering window at pixel p. k represents the parameter image of the kth input image, Y k represents the brightness image of the kth input image, W * k represents the optimized parameter image of the kth input image, represents the edge-aware constraint, g p represents the edge protection constraint, and λ represents the regularization parameter.
[0096] Preferably, the linear coefficients of the gradient tensor guided filter are solved as follows:
[0097]
[0098] In the formula, μ p Represents the brightness image Y k In the local window ω p,r The mean value in Denotes the parameter image W k Local Windowω p,r The mean in |ω| represents the local window ω p,r The total number of pixels in .
[0099] Preferably, the edge-aware constraint of the gradient domain weighted guided filtering As shown below:
[0100]
[0101] In the formula, Represents the brightness image Y k In the local window ω r , C represents the gradient tensor, ε is a hyperparameter set to 0.000001, and N represents the total number of pixels in the brightness image.
[0102] Preferably, the edge protection constraint g of the gradient domain weighted guided filtering is p , as shown below:
[0103]
[0104] in:
[0105]
[0106] In the formula, represents the edge perception constraint, and N represents the total number of pixels in the brightness image.
[0107] Preferably, the image pyramid constructed using the optimized weight map in step 4 is fused with the Laplacian image pyramid constructed by the input image to obtain an optimized image pyramid, including first obtaining a brightness image pyramid, obtaining an optimized parameter pyramid based on the brightness image pyramid, and fusing the Laplacian pyramid of the input image with the optimized parameter pyramid to obtain an optimized image pyramid.
[0108] Preferably, the optimized image pyramid specifically comprises the following steps:
[0109] Step 41, obtain the brightness image pyramid, as shown below:
[0110]
[0111] In the formula is the lth layer of the brightness image pyramid, l∈[1,L-1], L is the total number of pyramid layers, Down(·) represents the downsampling operation, Gauss(·) represents the Gaussian blur function, which is obtained by convolving the Gaussian kernel with the corresponding image, and a 5×5 Gaussian kernel is selected;
[0112] Step 42: Obtain the optimization parameter pyramid as shown below:
[0113]
[0114] In the formula is the lth layer of the optimized parameter pyramid, l∈[1,L]; where the first layer of the optimized parameter pyramid W* k represents the optimized parameter image of the kth input image, a of the 2-L layer l ,b l , l∈[1,L], then the linear parameter obtained by linear coefficient is downsampled;
[0115] Step 43: Use the optimized parameter pyramid to fuse the Laplacian pyramid of the original input image, as shown below:
[0116]
[0117] Where L l is the lth level of the optimized image pyramid, is the lth layer of the kth original input image pyramid.
Claims
1. A multi-exposure image fusion algorithm based on gradient tensor guided adaptive edge-preserving pyramid, characterized in that: The following steps are involved: Step 1: Collect multiple input images I with different exposures k ; Step 2: Use the gradient tensor, adaptive Gaussian function, and inter-channel pixel standard deviation to transform the input image I k Construct an initial weight graph; Step 3: Use the gradient tensor to guide the filter to optimize the initial weight map; Step 4: The image pyramid constructed by using the optimized weight map is merged with the Laplacian image pyramid constructed by the input image to obtain an optimized image pyramid; Step 5: Use the optimized image pyramid to reconstruct the fused image.
2. The multi-exposure image fusion algorithm based on gradient tensor guided adaptive edge preserving pyramid according to claim 1, characterized in that: The input image in step 1 is a color image with different exposure levels.
3. The multi-exposure image fusion algorithm based on gradient tensor guided adaptive edge preserving pyramid according to claim 1, characterized in that: The method for collecting multiple input images with different exposures in step 1 is: controlling different exposure times and establishing a color image model with different exposures, which is expressed as shown in the following formula: In the formula, I k represents the kth original input image, f c represents the camera response function of channel c, E k,c (p) represents the irradiance of pixel p in channel c of the kth original input image, Δt k represents the exposure time of the kth original input image, n q,k,c (p) represents the sensor noise of pixel p in channel c of the kth original input image, n f,k,c (p) represents the electronic noise of pixel p in channel c of the kth original input image.
4. The multi-exposure image fusion algorithm based on gradient tensor guided adaptive edge preserving pyramid according to claim 1, characterized in that: In step 2, the gradient tensor, the adaptive Gaussian function, and the standard deviation of pixels between channels are used to transform the input image I k Constructing the initial weight graph includes the following steps: Step 21: Using each original input image I k Obtain the gradient tensor and construct the contrast parameter value as follows: in: In the formula, C k (p) is the contrast parameter value of pixel p in the kth original input image, where R, G, and B represent the pixel values of the red, green, and blue channels, respectively; Step 22: Using each original input image I k Obtain the adaptive Gaussian function response value and construct a good exposure value as follows: In the formula, E k (p) is the good exposure value of pixel p in the kth original input image, Y k , Represents the original input image I k The pixel value of the Y channel after conversion to the YUV color space; σ g ,σ l They are the global and local good exposure weight decay rate control parameters, with values of 0.5 and 0.2 respectively; Step 23: Using each original input image I k Find the standard deviation of pixels between channels and construct the saturation value as follows: in: μ(p)=[R(p)+G(p)+B(p)] / 3, In the formula, S k (p),μ k (p) is the saturation value and inter-channel mean of pixel p in the k-th original input image; Step 24: based on the contrast parameter value C of pixel p in the kth original input image k (p), good exposure value E k (p), saturation value S k (p) Construct the initial parameter value W of the weight graph k (p), as shown below: Where W k (p) is the initial parameter value of pixel p in the kth original input image, ω c ,ω s ,ω e are weight control parameters, and their values are 1, 1, and 1 respectively.
5. The multi-exposure image fusion algorithm based on gradient tensor guided adaptive edge preserving pyramid according to claim 1, characterized in that: The process of optimizing the initial weight map using the gradient tensor guided filter in step 3 is as follows: Perform function value minimization operation to solve and obtain the initial weight graph optimization formula as follows: W * k (p)=a p Y k (p)+b p ; In the formula, (a p ,b p ) represents the linear coefficient within the window when the center of the local filtering window is located at pixel p, ω p,r W represents a window with a radius of r and a center of the local filtering window at pixel p. k represents the parameter image of the kth input image, Y k represents the brightness image of the kth input image, W * k represents the optimized parameter image of the kth input image, represents the edge-aware constraint, g p represents the edge protection constraint, and λ represents the regularization parameter.
6. The multi-exposure image fusion algorithm based on gradient tensor guided adaptive edge preserving pyramid according to claim 5, characterized in that: The linear coefficients of the gradient tensor-guided filter are solved as follows: In the formula, μ p Represents the brightness image Y k In the local window ω p,r The mean value in Represents the parameter image W k Local Windowω p,r The mean in |ω| represents the local window ω p,r The total number of pixels in .
7. The multi-exposure image fusion algorithm based on gradient tensor guided adaptive edge preserving pyramid according to claim 5, characterized in that: The edge-aware constraint of the gradient-domain weighted guided filtering As shown below: In the formula, Represents the brightness image Y k In the local window ω r , C represents the gradient tensor, ε is a hyperparameter set to 0.000001, and N represents the total number of pixels in the brightness image.
8. The multi-exposure image fusion algorithm based on gradient tensor guided adaptive edge preserving pyramid according to claim 5, characterized in that: The edge-preserving constraint g of the gradient-domain weighted guided filter is p , as shown below: in: In the formula, represents the edge perception constraint, and N represents the total number of pixels in the brightness image.
9. The multi-exposure image fusion algorithm based on gradient tensor guided adaptive edge preserving pyramid according to claim 1, characterized in that: The image pyramid constructed using the optimized weight map described in step 4 is fused with the Laplacian image pyramid constructed by the input image to obtain an optimized image pyramid, including first obtaining a brightness image pyramid, obtaining an optimized parameter pyramid based on the brightness image pyramid, and fusing the Laplacian pyramid of the input image with the optimized parameter pyramid to obtain an optimized image pyramid.
10. The multi-exposure image fusion algorithm based on gradient tensor guided adaptive edge preserving pyramid according to claim 9, characterized in that: The optimized image pyramid specifically comprises the following steps: Step 41, obtain the brightness image pyramid, as shown below: In the formula is the lth layer of the brightness image pyramid, l∈[1,L-1], L is the total number of pyramid layers, Down(·) represents the downsampling operation, Gauss(·) represents the Gaussian blur function, which is obtained by convolving the Gaussian kernel with the corresponding image, and a 5×5 Gaussian kernel is selected; Step 42: Obtain the optimization parameter pyramid as shown below: In the formula is the lth layer of the optimized parameter pyramid, l∈[1,L]; where the first layer of the optimized parameter pyramid W * k represents the optimized parameter image of the kth input image, a of the 2-L layer l ,b l , l∈[1,L], then the linear parameter obtained by linear coefficient is downsampled; Step 43: Use the optimized parameter pyramid to fuse the Laplacian pyramid of the original input image, as shown below: Where L l is the lth level of the optimized image pyramid, is the lth layer of the kth original input image pyramid.
