A method for fusing infrared images and visible light images
By using gradient-guided filtering technology to decompose and fuse infrared and visible light images at multiple levels, the problems of information redundancy and reduced contrast in the fusion of infrared and visible light images are solved, and better image fusion results are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- HANGZHOU DIANZI UNIV
- Filing Date
- 2023-04-17
- Publication Date
- 2026-07-21
AI Technical Summary
Existing infrared and visible light image fusion technologies suffer from information redundancy, blurred outlines in the fusion results, and reduced contrast.
Gradient-guided filtering is used to decompose infrared and visible light images into multiple levels, calculate the fusion weights of each level of the image, and perform fusion reconstruction to preserve the edge features of the image and improve the contrast.
It effectively preserves the edge features of the image, improves the blurring problem of the fused image, enhances the image contrast, and makes the quality of the fused image better conform to the visual characteristics of the human eye.
Smart Images

Figure CN116612054B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of image fusion technology, specifically relating to a method for fusing infrared images and visible light images. Background Technology
[0002] Infrared and visible light sensors obtain infrared and visible light images by collecting and processing light wave information from different wavelengths. Existing infrared sensors produce infrared images that directly reflect the temperature information of objects, making it easy to distinguish thermal targets. However, infrared images lack detailed information and have lower resolution and clarity. Compared to infrared sensors, visible light sensors capture images with richer details, higher resolution, and clarity, but the imaging effect is easily affected by environmental factors such as lighting and smoke. Infrared and visible light image fusion technology refers to combining infrared images from infrared sensors and visible light images from visible light sensors using specific techniques to combine the advantages of each image and complementary information, fusing them into an image that better meets people's needs and overcomes the shortcomings of a single image.
[0003] Traditional infrared and visible light image fusion techniques suffer from information redundancy in each decomposition layer, resulting in blurred contours and reduced contrast in the fusion result. Summary of the Invention
[0004] The purpose of this invention is to provide a method for fusing infrared and visible light images. By applying gradient-guided filtering technology to the fusion of infrared and visible light images, edge features in the images can be better preserved and blurred, resulting in a better fused image.
[0005] To achieve the above objectives, the present invention adopts the following technical solution:
[0006] A method for fusing infrared and visible light images includes the following steps:
[0007] S1. Gradient-guided filtering is used to perform first-level decomposition on the source infrared image and the source visible light image respectively to obtain first-level infrared decomposition image and first-level visible light decomposition image. Mean filtering and gradient-guided filtering are used to perform second-level decomposition on the first-level infrared decomposition image to obtain second-level infrared decomposition image. Mean filtering and gradient-guided filtering are used to perform second-level decomposition on the first-level visible light decomposition image to obtain second-level visible light decomposition image.
[0008] S2. Calculate the fusion weights of each level of image based on the first-level infrared decomposition image, the first-level visible light decomposition image, the second-level infrared decomposition image, and the second-level visible light decomposition image obtained from the decomposition.
[0009] S3. Based on the calculated image fusion weights at each level, the infrared decomposition images and visible light decomposition images at each level are fused and reconstructed to obtain the fused image.
[0010] As a preferred embodiment, step S1 includes:
[0011] S1.1. Gradient-guided filtering is used to perform first-level decomposition on the source infrared image and the source visible light image to obtain the first-level infrared smoothed image, the first-level infrared detail layer image, the first-level visible light smoothed image, and the first-level visible light detail layer image.
[0012] S1.2. Use mean filtering to perform second-level decomposition on the first-level infrared smoothed image and the first-level visible light smoothed image respectively, so as to obtain the second-level infrared smoothed image, the second-level visible light smoothed image, the second-level infrared detail layer image, and the second-level visible light detail layer image.
[0013] S1.3. Gradient-guided filtering is used to smooth the first-level infrared smoothed image and the first-level visible light smoothed image respectively to obtain the second-level infrared base layer image and the second-level visible light base layer image.
[0014] The first-level infrared decomposition image includes a first-level infrared smoothed image and a first-level infrared detail layer image; the first-level visible light decomposition image includes a first-level visible light smoothed image and a first-level visible light detail layer image.
[0015] The second-level infrared decomposition image includes a second-level infrared smoothed image, a second-level infrared detail layer image, and a second-level infrared base layer image. The second-level visible light decomposition image includes a second-level visible light smoothed image, a second-level visible light detail layer image, and a second-level visible light base layer image.
[0016] As a preferred embodiment, in step S1.1, the gradient-guided filtering operator is:
[0017] SGF = GDGIF(S,G,r1),
[0018] Where GDGIF() represents the gradient-guided filtering operation function, S represents the image to be filtered, G represents the guide image, r1 represents the regularization parameter of the gradient-guided filtering operation function when performing the first-level decomposition of the source infrared and visible light images using gradient-guided filtering, and SGF represents the image obtained by decomposition using gradient-guided filtering.
[0019] The formulas for calculating the first-level decomposition of the source infrared image and the source visible light image using gradient-guided filtering are as follows:
[0020] Bi1 = GDGIF(I,I,r1),
[0021] Di1 = I-Bi1,
[0022] Bv1 = GDGIF(V,V,r1),
[0023] Dv1 = V - Bv1,
[0024] Where I represents the source infrared image, Bi1 represents the first-level infrared smoothed image, Di1 represents the first-level infrared detail layer image, V represents the source visible light image, Bv1 represents the first-level visible light smoothed image, and Dv1 represents the first-level visible light detail layer image.
[0025] As a preferred embodiment, in step S1.2, the mean filtering operator is:
[0026] SMF = MF(S,h,w),
[0027] Where MF() represents the mean filtering operation function, h represents the filter window length, w represents the filter window width, and SMF represents the image obtained by solving the mean filter;
[0028] The formulas for calculating the second-level decomposition of the first-level infrared smoothed image and the first-level visible light smoothed image using mean filtering are as follows:
[0029] Bim = MF(Bi1,h,w),
[0030] Di2 = Bi1 - Bim,
[0031] Bvm = MF(Bv1,h,w),
[0032] Dv2 = Bv1 - Bvm,
[0033] Wherein, Bim represents the second-level infrared smoothed image, Di2 represents the second-level infrared detail layer image, Bvm represents the second-level visible light smoothed image, and Dv2 represents the second-level visible light detail layer image.
[0034] As a preferred embodiment, in step S1.3, the calculation formula for smoothing the first-level infrared smoothed image and the first-level visible light smoothed image using gradient-guided filtering is as follows:
[0035] Bi2 = GDGIF(Bi1, I, r2),
[0036] Bv2 = GDGIF(Bv1, V, r2),
[0037] Where Bi2 represents the second-level infrared base layer image, Bv2 represents the second-level visible light base layer image, and r2 represents the regularization parameter of the gradient-guided filtering operation function when smoothing the first-level infrared and visible light smoothed images using gradient-guided filtering.
[0038] As a preferred embodiment, step S2 includes:
[0039] S2.1 Calculate the initial fusion weights of the infrared image based on the second-level infrared smoothed image and the second-level infrared base layer image; calculate the initial fusion weights of the visible light image based on the second-level visible light smoothed image and the second-level visible light base layer image.
[0040] S2.2. Use gradient-guided filtering to optimize the initial fusion weights of the infrared image and the visible light image respectively, so as to obtain the fusion weight components of the infrared image base layer, the infrared image detail layer, the visible light image base layer, and the visible light image detail layer.
[0041] S2.3 Normalize the fusion weights of the infrared image base layer, infrared image detail layer, visible light image base layer, and visible light image detail layer to obtain normalized fusion weights of the infrared image base layer, infrared image detail layer, visible light image base layer, and visible light image detail layer.
[0042] As a preferred embodiment, in step S2.1, the calculation formulas for the initial fusion weights of the infrared image and the initial fusion weights of the visible light image are as follows:
[0043] Sali = abS(Bim - Bi2),
[0044] Salv = abS(Bvm - Bv2),
[0045] Where abS() represents the absolute value operator, Sali represents the initial fusion weight of the infrared image, and Salv represents the initial fusion weight of the visible light image.
[0046] As a preferred option, in step S2.2, the calculation formula for optimizing the initial fusion weights of the infrared image and the initial fusion weights of the visible light image using gradient-guided filtering is as follows:
[0047] Swbi = GDGIF(Sali, I, r3),
[0048] Swbv = GDGIF(Salv,V,r3),
[0049] Swdi = GDGIF(Sali, I, r4),
[0050] Swdv = GDGIF(Salv,V,r4),
[0051] Where Swbi represents the fusion weight component of the infrared image base layer, Swbv represents the fusion weight component of the visible light image base layer, r3 represents the regularization parameter of the gradient-guided filtering operation function when calculating the fusion weight component of the infrared and visible light image base layers using gradient-guided filtering, Swdi represents the fusion weight component of the infrared image detail layer, Swdv represents the fusion weight component of the visible light image detail layer, and r4 represents the regularization parameter of the gradient-guided filtering operation function when calculating the fusion weight component of the infrared and visible light image detail layers.
[0052] As a preferred embodiment, in step S2.3, the calculation formulas for normalizing the fusion weight components of the infrared image base layer, the infrared image detail layer, the visible light image base layer, and the visible light image detail layer are as follows:
[0053] Wbv=(Swbv+u) / (Swbv+Swbi+u),
[0054] Wbi = 1 - Wbv,
[0055] Wdv=(Swdv+u) / (Swdv+Swdi+u),
[0056] Wdi = 1 - Wdv,
[0057] Where u represents a user-defined constant, Wbv represents the normalized fusion weights of the visible light image base layer, Wbi represents the normalized fusion weights of the infrared image base layer, Wdv represents the normalized fusion weights of the visible light image detail layer, and Wdi represents the normalized fusion weights of the infrared image detail layer.
[0058] As a preferred embodiment, step S3 includes:
[0059] S3.1. The first-level infrared detail layer image and the first-level visible light detail layer image are directly added together to obtain the first-level fused detail layer image;
[0060] S3.2 Based on the normalized infrared image detail layer fusion weight and the normalized visible light image detail layer fusion weight, the second-level infrared detail layer image and the second-level visible light detail layer image are added together to obtain the second-level fused detail layer image.
[0061] S3.3 Based on the normalized infrared image base layer fusion weights and the normalized visible light image base layer fusion weights, the second-level infrared base layer image and the second-level visible light base layer image are added together to obtain the second-level fused base layer image.
[0062] S3.4. Add the first-level fused detail layer image, the second-level fused detail layer image, and the second-level fused base layer image together to obtain the fused image.
[0063] The beneficial effects of this invention are:
[0064] 1. Gradient-guided filtering introduces first-order edge-aware constraints based on guided filtering, enabling more complete preservation of image edge information. In this invention, gradient-guided filtering is used to smooth the first-level infrared smoothed image and the first-level visible light smoothed image during image decomposition. The filtered smoothed image is used as the base layer image and then applied in the fusion reconstruction, resulting in a fused image with better contrast and higher quality.
[0065] 2. This invention uses gradient-guided filtering to optimize the initial fusion weights of infrared and visible light images, and normalizes the optimized initial fusion weights. Based on the normalized fusion weights, the infrared and visible light decomposed images at each level are fused, which enables the fused image to retain more source image information and is more in line with the characteristics of human vision.
[0066] 3. The infrared image and visible light image fusion method described in this invention can better achieve the complementarity of infrared image and visible light image information, making the scene target outline more prominent, effectively improving the blurring problem of fused image, improving image contrast, and making it more conducive to subsequent processing of fused image. Attached Figure Description
[0067] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0068] Figure 1 This is a flowchart of a method for fusing infrared and visible light images.
[0069] Figure 2 It is a source infrared image.
[0070] Figure 3 It is a visible light source image.
[0071] Figure 4 The fused image is obtained by directly using the second-level smoothed image obtained after mean filtering as the second-level base layer image for subsequent fusion and reconstruction.
[0072] Figure 5The fused image is obtained by directly normalizing the initial fusion weights to obtain the final fusion weights, and then fusing and reconstructing the decomposed images at each level based on the final fusion weights.
[0073] Figure 6 It is a fused image obtained by fusing source infrared and visible light images using the method described in this invention. Detailed Implementation
[0074] The following specific embodiments illustrate the implementation of the present invention. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and various details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that, unless otherwise specified, the following embodiments and features described therein can be combined with each other.
[0075] Reference Figure 1 A method for fusing infrared and visible light images includes the following steps:
[0076] S1. Gradient-guided filtering is used to perform first-level decomposition on the source infrared image and the source visible light image respectively to obtain first-level infrared decomposition image and first-level visible light decomposition image. Mean filtering and gradient-guided filtering are used to perform second-level decomposition on the first-level infrared decomposition image to obtain second-level infrared decomposition image. Mean filtering and gradient-guided filtering are used to perform second-level decomposition on the first-level visible light decomposition image to obtain second-level visible light decomposition image.
[0077] S2. Calculate the fusion weights of each level of image based on the first-level infrared decomposition image, the first-level visible light decomposition image, the second-level infrared decomposition image, and the second-level visible light decomposition image obtained from the decomposition.
[0078] S3. Based on the calculated image fusion weights at each level, the infrared decomposition images and visible light decomposition images at each level are fused and reconstructed to obtain the fused image.
[0079] Furthermore, step S1 includes:
[0080] S1.1. Gradient-guided filtering is used to perform first-level decomposition on the source infrared image and the source visible light image to obtain the first-level infrared smoothed image, the first-level infrared detail layer image, the first-level visible light smoothed image, and the first-level visible light detail layer image.
[0081] S1.2. Use mean filtering to perform second-level decomposition on the first-level infrared smoothed image and the first-level visible light smoothed image respectively, so as to obtain the second-level infrared smoothed image, the second-level visible light smoothed image, the second-level infrared detail layer image, and the second-level visible light detail layer image.
[0082] S1.3. Gradient-guided filtering is used to smooth the first-level infrared smoothed image and the first-level visible light smoothed image respectively to obtain the second-level infrared base layer image and the second-level visible light base layer image.
[0083] The first-level infrared decomposition image includes a first-level infrared smoothed image and a first-level infrared detail layer image; the first-level visible light decomposition image includes a first-level visible light smoothed image and a first-level visible light detail layer image.
[0084] The second-level infrared decomposition image includes a second-level infrared smoothed image, a second-level infrared detail layer image, and a second-level infrared base layer image. The second-level visible light decomposition image includes a second-level visible light smoothed image, a second-level visible light detail layer image, and a second-level visible light base layer image.
[0085] Guided filtering is a nonlinear image filtering method that smooths images. It has excellent edge preservation properties and low computational complexity, but it may produce halos during the filtering process. Gradient guided filtering introduces first-order edge-aware constraints on guided filtering, allowing for more complete preservation of the image's edge information.
[0086] Traditional infrared and visible light image fusion techniques suffer from information redundancy in each decomposition layer, resulting in blurred outlines and reduced contrast in the fused image. Applying gradient-guided filtering to infrared and visible light image fusion can better preserve edge features and remove blurring, leading to a more effective fused image.
[0087] In the image decomposition process, gradient-guided filtering is used to smooth the first-level infrared smoothed image and the first-level visible light smoothed image respectively. The smoothed image after filtering is used as the base layer image and is used in the fusion reconstruction to make the fused image have better contrast and improve the quality of the fused image.
[0088] Furthermore, in step S1.1, the gradient-guided filtering operator is:
[0089] SGF = GDGIF(S,G,r1),
[0090] Where GDGIF() represents the gradient-guided filtering operation function, S represents the image to be filtered, G represents the guide image, the image to be filtered is filtered with reference to the texture of the guide image, r1 represents the regularization parameter of the gradient-guided filtering operation function when performing the first-level decomposition of the source infrared and visible light images using gradient-guided filtering, r1=0.1^2, and SGF represents the image obtained by decomposition using gradient-guided filtering.
[0091] The formulas for calculating the first-level decomposition of the source infrared image and the source visible light image using gradient-guided filtering are as follows:
[0092] Bi1 = GDGIF(I,I,r1),
[0093] Di1 = I-Bi1,
[0094] Bv1 = GDGIF(V,V,r1),
[0095] Dv1 = V - Bv1,
[0096] Where I represents the source infrared image, Bi1 represents the first-level infrared smoothed image, Di1 represents the first-level infrared detail layer image, V represents the source visible light image, Bv1 represents the first-level visible light smoothed image, and Dv1 represents the first-level visible light detail layer image.
[0097] Furthermore, in step S1.2, the mean filtering operator is:
[0098] SMF = MF(S,h,w),
[0099] Where MF() represents the mean filtering operation function, h represents the filter window length, w represents the filter window width, and the values of h and w are both 31. SMF represents the image obtained by solving the mean filter.
[0100] The formulas for calculating the second-level decomposition of the first-level infrared smoothed image and the first-level visible light smoothed image using mean filtering are as follows:
[0101] Bim = MF(Bi1,h,w),
[0102] Di2 = Bi1 - Bim,
[0103] Bvm = MF(Bv1,h,w),
[0104] Dv2 = Bv1 - Bvm,
[0105] Wherein, Bim represents the second-level infrared smoothed image, Di2 represents the second-level infrared detail layer image, Bvm represents the second-level visible light smoothed image, and Dv2 represents the second-level visible light detail layer image.
[0106] Furthermore, in step S1.3, the calculation formula for smoothing the first-level infrared smoothed image Bv1 and the first-level visible light smoothed image Bi1 using gradient-guided filtering is as follows:
[0107] Bi2 = GDGIF(Bi1, I, r2),
[0108] Bv2 = GDGIF(Bv1, V, r2),
[0109] Where Bi2 represents the second-level infrared base layer image, Bv2 represents the second-level visible light base layer image, r2 represents the regularization parameter of the gradient-guided filtering operation function when smoothing the first-level infrared and visible light smoothed images using gradient-guided filtering, and r1 = 0.8^2.
[0110] Furthermore, step S2 includes:
[0111] S2.1 Calculate the initial fusion weights of the infrared image based on the second-level infrared smoothed image and the second-level infrared base layer image; calculate the initial fusion weights of the visible light image based on the second-level visible light smoothed image and the second-level visible light base layer image; the calculation formulas for the initial fusion weights of the infrared image and the visible light image are as follows:
[0112] Sali = abS(Bim - Bi2),
[0113] Salv = abS(Bvm - Bv2),
[0114] Where abS() represents the absolute value operator, Sali represents the initial fusion weight of the infrared image, and Salv represents the initial fusion weight of the visible light image;
[0115] S2.2. Gradient-guided filtering is used to optimize the initial fusion weights of the infrared image and the visible light image respectively, to obtain the fusion weight components of the infrared image base layer, the infrared image detail layer, the visible light image base layer, and the visible light image detail layer. The calculation formula for optimizing the initial fusion weights of the infrared image and the visible light image using gradient-guided filtering is as follows:
[0116] Swbi = GDGIF(Sali, I, r3),
[0117] Swbv = GDGIF(Salv,V,r3),
[0118] Swdi = GDGIF(Sali, I, r4),
[0119] Swdv = GDGIF(Salv,V,r4),
[0120] Where Swbi represents the fusion weight component of the infrared image base layer, Swbv represents the fusion weight component of the visible light image base layer, r3 represents the regularization parameter of the gradient-guided filtering operation function when calculating the fusion weight components of the infrared and visible light image base layers using gradient-guided filtering, r3 = 10^2, Swdi represents the fusion weight component of the infrared image detail layer, Swdv represents the fusion weight component of the visible light image detail layer, and r4 represents the regularization parameter of the gradient-guided filtering operation function when calculating the fusion weight components of the infrared and visible light image detail layers, r4 = 0.03^2;
[0121] S2.3 Normalize the fusion weights of the infrared image base layer, infrared image detail layer, visible light image base layer, and visible light image detail layer to obtain normalized fusion weights of the infrared image base layer, infrared image detail layer, visible light image base layer, and visible light image detail layer.
[0122] The calculation formulas for normalizing the fusion weight components of the infrared image base layer, the infrared image detail layer, the visible light image base layer, and the visible light image detail layer are as follows:
[0123] Wbv=(Swbv+u) / (Swbv+Swbi+u),
[0124] Wbi = 1 - Wbv,
[0125] Wdv=(Swdv+u) / (Swdv+Swdi+u),
[0126] Wdi = 1 - Wdv,
[0127] Where u represents a user-defined constant, u = 0.0000001, Wbv represents the normalized fusion weight of the visible light image base layer, Wbi represents the normalized fusion weight of the infrared image base layer, Wdv represents the normalized fusion weight of the visible light image detail layer, and Wdi represents the normalized fusion weight of the infrared image detail layer.
[0128] This invention uses gradient-guided filtering to optimize the initial fusion weights of infrared and visible light images, and then normalizes the optimized initial fusion weights. Based on the normalized fusion weights, the decomposed infrared and visible light images at each level are fused, which enables the fused image to retain more source image information and better conforms to the characteristics of human vision.
[0129] Furthermore, step S3 includes:
[0130] S3.1. The first-level infrared detail layer image and the first-level visible light detail layer image are directly added together to obtain the first-level fused detail layer image. The calculation formula is as follows:
[0131] Fd1 = Dv1 + Di1,
[0132] Where Fd1 represents the first-level fused detail layer image;
[0133] S3.2. Based on the normalized infrared image detail layer fusion weights and the normalized visible light image detail layer fusion weights, the second-level infrared detail layer image and the second-level visible light detail layer image are added together to obtain the second-level fused detail layer image. The calculation formula is as follows:
[0134] Fd2=Wdv*Dv2+Wdi*Di2,
[0135] Where Fd2 represents the second-level fused detail layer image;
[0136] S3.3. Based on the normalized infrared image base layer fusion weights and the normalized visible light image base layer fusion weights, the second-level infrared base layer image and the second-level visible light base layer image are added together to obtain the second-level fused base layer image. The calculation formula is as follows:
[0137] Fb2 = Wbv*Bv2 + Wbi*Bi2,
[0138] Where Fb2 represents the second-level fusion base layer image;
[0139] S3.4. Add the first-level fused detail layer image, the second-level fused detail layer image, and the second-level fused base layer image to obtain the fused image. The calculation formula is as follows:
[0140] F = Fd1 + Fd2 + Fb2,
[0141] Where F represents the final fused image.
[0142] The following ablation experiments illustrate the effectiveness of the infrared and visible light image fusion method described in this embodiment.
[0143] Infrared and visible light images from the TNO image fusion dataset were used as source images, with the source infrared image serving as a reference. Figure 2 As shown, the source visible light image reference Figure 3 As shown, in the infrared image, the human figure is clear, but the background is blurry and the contrast is low; in the visible light image, the details are rich and the contrast is high, but the human figure is not clear.
[0144] Ablation Experiment 1: The second-level infrared smoothed image Bvm and the second-level visible light smoothed image Bim, obtained after mean filtering, were directly used as the second-level infrared and visible light base layer images for subsequent fusion and reconstruction, while keeping other steps unchanged. The final fused image was obtained as a reference. Figure 4 As shown, although the fused image combines complementary information from the source infrared image and the source visible light image, the overall details of the fused image are blurred, the contrast is low, the salience of the human target is significantly reduced compared to the infrared image, and the image quality is generally poor.
[0145] Ablation Experiment 2: Discarding step S2.2, the initial fusion weights of the infrared and visible light images calculated in step S2.1 are directly normalized to obtain the final fusion weights. Based on the final fusion weights, the decomposed images at each level are fused and reconstructed, keeping other steps unchanged. The final fused image is referenced. Figure 5 As shown, although the person in the fused image is relatively clear and has high contrast, the unoptimized weights cause severe distortion and information inconsistencies, resulting in a poor fusion effect.
[0146] The infrared and visible light image fusion method described in this embodiment is used to fuse the source infrared image and the source visible light image. The final fused image is referenced. Figure 6 As shown in the image, the resulting image now better complements the information from the infrared and visible light images, making the human subject more prominent, effectively improving the blurring problem in the fused image, increasing image contrast, and facilitating subsequent processing of the fused image.
[0147] The embodiments described above are merely preferred embodiments of the present invention and are not intended to limit the scope of the present invention. Various modifications and improvements made by those skilled in the art to the technical solutions of the present invention without departing from the spirit of the present invention should fall within the protection scope of the present invention.
Claims
1. A method for fusing infrared images and visible light images, characterized in that, Includes the following steps: S1. Gradient-guided filtering is used to perform first-level decomposition on the source infrared image and the source visible light image respectively to obtain first-level infrared decomposition image and first-level visible light decomposition image. Mean filtering and gradient-guided filtering are used to perform second-level decomposition on the first-level infrared decomposition image to obtain second-level infrared decomposition image. Mean filtering and gradient-guided filtering are used to perform second-level decomposition on the first-level visible light decomposition image to obtain second-level visible light decomposition image. S2. Calculate the fusion weights of each level of image based on the first-level infrared decomposition image, the first-level visible light decomposition image, the second-level infrared decomposition image, and the second-level visible light decomposition image obtained from the decomposition. S3. Based on the calculated image fusion weights at each level, the infrared decomposition images and visible light decomposition images at each level are fused and reconstructed to obtain the fused image; Step S1 includes: S1.
1. Gradient-guided filtering is used to perform first-level decomposition on the source infrared image and the source visible light image to obtain the first-level infrared smoothed image, the first-level infrared detail layer image, the first-level visible light smoothed image, and the first-level visible light detail layer image. S1.
2. Use mean filtering to perform second-level decomposition on the first-level infrared smoothed image and the first-level visible light smoothed image respectively, so as to obtain the second-level infrared smoothed image, the second-level visible light smoothed image, the second-level infrared detail layer image, and the second-level visible light detail layer image. S1.
3. Gradient-guided filtering is used to smooth the first-level infrared smoothed image and the first-level visible light smoothed image respectively to obtain the second-level infrared base layer image and the second-level visible light base layer image. The first-level infrared decomposition image includes a first-level infrared smoothed image and a first-level infrared detail layer image; the first-level visible light decomposition image includes a first-level visible light smoothed image and a first-level visible light detail layer image. The second-level infrared decomposition image includes a second-level infrared smoothed image, a second-level infrared detail layer image, and a second-level infrared base layer image. The second-level visible light decomposition image includes a second-level visible light smoothed image, a second-level visible light detail layer image, and a second-level visible light base layer image. Step S2 includes: S2.1 Calculate the initial fusion weights of the infrared image based on the second-level infrared smoothed image and the second-level infrared base layer image; calculate the initial fusion weights of the visible light image based on the second-level visible light smoothed image and the second-level visible light base layer image. S2.
2. Use gradient-guided filtering to optimize the initial fusion weights of the infrared image and the visible light image respectively, so as to obtain the fusion weight components of the infrared image base layer, the infrared image detail layer, the visible light image base layer, and the visible light image detail layer. S2.3 Normalize the fusion weights of the infrared image base layer, infrared image detail layer, visible light image base layer, and visible light image detail layer to obtain normalized fusion weights of the infrared image base layer, infrared image detail layer, visible light image base layer, and visible light image detail layer. In step S2.1, the calculation formulas for the initial fusion weights of the infrared image and the initial fusion weights of the visible light image are as follows: , , in, The operator represents the absolute value. Indicates the initial fusion weights of the infrared images. This represents the initial fusion weights for visible light images. This represents a second-level infrared smoothed image. This represents a second-order visible light smoothed image. This represents the second-level infrared base layer image. This represents the second-level visible light base layer image; In step S2.2, the calculation formulas for optimizing the initial fusion weights of the infrared image and the initial fusion weights of the visible light image using gradient-guided filtering are as follows: , , , , in, This represents the fusion weight components of the base layer of an infrared image. This represents the fusion weight components of the base layer of a visible light image. This represents the regularization parameter of the gradient-guided filtering operation function when calculating the fusion weight components of the base layer of infrared and visible light images using gradient-guided filtering. This represents the weighted components of the infrared image detail layer fusion. This represents the weighted components of the visible light image detail layer fusion. This represents the regularization parameter of the gradient-guided filtering operation function when calculating the weighted components of the detail layer fusion of infrared and visible light images. Represents the source infrared image. Represents the source visible light image. The computational function representing gradient-guided filtering; In step S2.3, the calculation formulas for normalizing the fusion weight components of the infrared image base layer, the infrared image detail layer, the visible light image base layer, and the visible light image detail layer are as follows: , , , , in, Indicates a user-defined constant. This represents the normalized base layer fusion weights of the visible light image. This represents the fusion weights of the base layer in the normalized infrared image. This represents the normalized visible light image detail layer fusion weights. This represents the normalized infrared image detail layer fusion weights.
2. The method for fusing infrared and visible light images according to claim 1, characterized in that, In step S1.1, the gradient-guided filter operator is: , in, This represents the image to be filtered. Represents a guide image. This represents the regularization parameter of the gradient-guided filtering operation function when performing the first-level decomposition of the source infrared and visible light images using gradient-guided filtering. This represents the image obtained by decomposition using gradient-guided filtering. The formulas for calculating the first-level decomposition of the source infrared image and the source visible light image using gradient-guided filtering are as follows: , , , , in, This represents the first-level infrared smoothed image. This represents the first-level infrared detail layer image. This represents a first-order visible light smoothed image. This represents the first level of visible light detail layer image.
3. The method for fusing infrared and visible light images according to claim 2, characterized in that, In step S1.2, the mean filtering operator is: , in, This represents the operation function for mean filtering. Indicates the length of the filtering window. Indicates the width of the filtering window. This represents the image obtained by solving the mean filter. The formulas for calculating the second-level decomposition of the first-level infrared smoothed image and the first-level visible light smoothed image using mean filtering are as follows: , , , , in, This represents the second-level infrared detail layer image. This represents the second-level visible light detail layer image.
4. The method for fusing infrared and visible light images according to claim 3, characterized in that, In step S1.3, the calculation formula for smoothing the first-level infrared smoothed image and the first-level visible light smoothed image using gradient-guided filtering is as follows: , , in, This represents the regularization parameter of the gradient-guided filtering operation function when performing smoothing operations on the first-level infrared and visible light smoothed images using gradient-guided filtering.
5. The method for fusing infrared and visible light images according to claim 1, characterized in that, Step S3 includes: S3.
1. The first-level infrared detail layer image and the first-level visible light detail layer image are directly added together to obtain the first-level fused detail layer image; S3.2 Based on the normalized infrared image detail layer fusion weight and the normalized visible light image detail layer fusion weight, the second-level infrared detail layer image and the second-level visible light detail layer image are added together to obtain the second-level fused detail layer image. S3.3 Based on the normalized infrared image base layer fusion weights and the normalized visible light image base layer fusion weights, the second-level infrared base layer image and the second-level visible light base layer image are added together to obtain the second-level fused base layer image. S3.
4. Add the first-level fused detail layer image, the second-level fused detail layer image, and the second-level fused base layer image together to obtain the fused image.