An image fusion method based on brightness feature comparison
Through brightness feature comparison and quadratic differential edge extraction, combined with the Itti algorithm's brightness feature extraction and dual-scale directed filtering, the problems of detail information loss and edge blur in the fusion of infrared and visible light images are solved, and high-quality image fusion effect is achieved.
Patent Information
- Application Number
- CN202410542993.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-01
- Publication Date
- 2025-01-17
- Estimated Expiration
- 2044-05-01
AI Technical Summary
The existing infrared and visible image fusion methods are prone to halo artifacts during the fusion process, resulting in loss of detail information and blurred edges.
Using an image fusion algorithm based on brightness feature comparison, edge features are extracted through a quadratic differential grayscale matrix, bright and dark edge maps are constructed, median filtering and Gaussian filtering are performed, combined with the brightness feature extraction and double-scale guided filtering of Itti algorithm. Optimize the weight graph and perform weighted average fusion to enhance the image edge.
Effectively reduce halo artifacts, preserve image details, improve image contrast and clarity, enhance algorithm stability and adaptability, and ensure image fusion reliability and visual effects.
Smart Images

Figure CN118469828B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of image fusion, and in particular relates to an image fusion method for comparing brightness features. Background Art
[0002] Image fusion refers to the process of synthesizing the complementary information of two or more images of the same scene according to certain rules to produce a new image in order to obtain a more accurate, reliable and comprehensive image description of the same scene. Image fusion can be specifically divided into multi-focus image fusion, multi-exposure image fusion, infrared and visible light image fusion, remote sensing image fusion and medical image fusion, among which infrared and visible light image fusion is a hot research field. Infrared and visible light sensors are the two most commonly used imaging sensors. Infrared sensors rely on detecting the difference in thermal radiation between the target and the background to identify the target. They have the ability to identify camouflage, but are insensitive to changes in scene brightness. Visible light imaging sensors are sensitive to the reflection of the target scene and can accurately provide detailed information about the scene where the target is located, but are easily affected by factors such as lighting, weather, and occlusion. Therefore, fusing infrared images and visible light images can make full use of their information complementarity, expand the temporal and spatial coverage of the system's target detection, and improve the system's spatial resolution, all-weather working capability, and target detection and anti-interference capabilities. It has important applications in many fields such as aviation, remote sensing, national defense, and medical care.
[0003] At present, the most studied and applied method in the field of infrared and visible light image fusion is the fusion method based on multi-scale transformation. This method decomposes the original image into multiple scales to obtain a series of sub-images of different scales, and then fuses them according to certain rules. Finally, the fusion result is obtained through inverse transformation. It can obtain multi-scale feature information of multiple original images, and the fusion quality is generally high, but halo artifacts are prone to occur during the fusion process. Therefore, improving the traditional multi-scale transformation has become a research hotspot in recent years.
[0004] Edge-preserving filters can effectively reduce the halo artifacts around the edges in the fusion results while retaining the edge information of the image contour, and have good visual effects, such as mean filtering, bilateral filtering, joint bilateral filtering, and guided filtering. Among them, guided filtering is a simple and fast edge-preserving filter that has achieved good results in image fusion. Summary of the invention
[0005] The present invention proposes an infrared and visible light image fusion algorithm based on brightness feature comparison, aiming to solve the problems of detail information loss and edge blur in traditional infrared and visible light image fusion.
[0006] The specific steps of the fusion method are as follows:
[0007] Step S1, calculate the minimum grayscale difference, andI (i, j) and the original visible light image I V (i, j) respectively take the average gray value of the whole image, and divide the average value by 64 as the value of I I (i,j) and I V (i,j) Minimum grayscale difference d for edge feature extraction I With d V ;
[0008] Step S2, calculate the secondary difference gray matrix, taking 2 pixels as the sampling distance, for I I (i,j) and I V (i, j) calculates the grayscale difference in eight directions respectively, and converts the grayscale difference calculated in two relative directions into and By taking the second difference, we can obtain four second-order difference grayscale matrices respectively: u∈(1,2,3,4);
[0009] Step S3, process the grayscale matrix and map the sampling points. Among the four secondary difference grayscale matrices obtained from the same original image, the values of any three grayscale matrices at the same position are greater than the minimum grayscale difference d n ,n∈(I,V), the corresponding position values of the three matrices are averaged; for the intermediate direction matrix, the corresponding center pixel position and two relative sampling points with a sampling distance of 2 pixels are mapped in the original image;
[0010] Step S4, constructing a bright edge map and a dark edge map, comparing the brightness of the two sampling points in step S3, mapping the position of the brighter sampling point in the bright edge matrix, storing the obtained average value, and constructing the bright edge map; storing the average value at the central pixel point of the dark edge matrix, and constructing the dark edge matrix; after traversing the entire image, retaining all the data of the bright edge map, setting the data at the same pixel point as the former and not 0 in the dark edge map to 0, and obtaining the bright edge map L I (i,j),L V (i,j) and dark edge map A I (i,j),A V (i,j)
[0011] Step S5: construct a saliency map to map the bright edge map L I (i,j),L V (i,j) and dark edge map A I (i,j),A V (i, j) is processed by median filtering, and then added according to the original image type to obtain the infrared edge map M I (i, j) and visible light edge map M V(i,j), and construct the edge saliency map T I (i,j) and T V (i,j);
[0012] Step S6: convert the original infrared image I I (i, j) and the original visible light image I V (i, j) are subjected to Laplace filtering to obtain the high-pass image H I (i,j) and H V (i,j), H I (i,j) and H V (i, j) and then Gaussian filtering to obtain two high-frequency saliency maps S I (i,j) and S V (i,j), the high-frequency saliency map S I (i,j) and S V (i,j) and edge saliency map T I (i,j) and T V (i, j) are used to compare the brightness features, and the brightness at the same position is taken as the larger value to obtain the processed high-frequency saliency map S I ′(i,j) and S V ′(i,j);
[0013] Step S7, construct the base layer and detail layer weights, and calculate the weights of S obtained in step 6. I ′(i,j) and S V ′(i,j) to compare and determine the weight graph P I (i,j) and P V (i, j); take the corresponding original image as the guide image, and I (i,j),P V The (i, j) mapping is subjected to dual-scale guided filtering to obtain the base layer weight W I B (i,j) and W V B (i,j), detail layer weight W I D (i,j) and W V D (i, j) and normalize it;
[0014] Step S8, constructing a dual-scale brightness feature map of the infrared image, and using the algorithm for image brightness feature extraction in the Itti algorithm to extract the infrared image brightness feature. I (i, j) is used to extract the saliency map and use a circular filter for blurring to obtain the infrared feature map E I (i,j), and the obtained feature map E I (i,j) and I I(i, j) perform guided filtering on the base layer and detail layer respectively to obtain the infrared feature map E I (i,j) base layer and detail layer weight map Q I B (i,j),Q I D (i, j) and normalize it;
[0015] Step S9, optimizing the weight map, image reconstruction and edge enhancement, and comparing the original infrared image I I (i, j) and the original visible light image I V The average gray value avg(I I )、avg(I V ), change avg(I I )、avg(I V ) and then divide by the sum of the two to get the coefficient x; if x>0, then subtract x from Q I B (i,j),Q I D (i,j) and then multiply them by W I B (i,j),W I D (i,j) add; if x≤0, add W V B (i,j),W V D Multiply (i, j) by (x+1) to get the optimized weight graph The optimized base layer weights and detail layer weights Perform weighted average fusion respectively to obtain the base layer and detail layers Will By superimposing and performing edge enhancement, the final fused image F can be obtained. final .
[0016] Preferably, in step S2, the specific implementation process of constructing the quadratic difference grayscale matrix is: grayscale differences in eight directions are calculated for the original image, and the grayscale differences in two relative directions are subtracted quadratically to obtain four quadratic difference grayscale matrices. The calculation formula of the quadratic difference grayscale matrix is:
[0017] θ 1 ~θ 8 The directions indicated are 0°, 45°, 90°, 135°, 180°, 225°, 270°, and 315°; Indicates that in θu The grayscale difference in the direction, with (i, j) as the sampling center and 2 pixels as the sampling distance; Express and Make the difference and take the absolute value; Indicates that in θ u and the grayscale matrix of the quadratic difference in the relative direction.
[0018] Preferably, the specific formula for constructing the bright edge in step S4 is as follows:
[0019]
[0020]
[0021]
[0022]
[0023]
[0024]
[0025] I n (m 1 ,n 1 ), I n (m 2 ,n 2 ) is I n (i,j) is the sampling center, at θ y And the gray value of the sampling point in its relative direction; is θ x ,θ y ,θ z The second difference gray matrix in the direction; L n is the edge of the bright part, A n is the initial dark edge; ∧ represents the intersection of the operation results on both sides of the symbol.
[0026] Preferably, the dark edge map A of the original image in step S4 I (i,j),A V The construction formula of (i,j) is Where L n (i, j) represents the gray value of the bright edge map of the original image at (i, j).
[0027] Preferably, in step S5, the bright edge map L is used I (i,j),L V (i,j) and dark edge map A I (i,j),AV (i,j) construct infrared edge map M I (i, j) and visible light edge map M V The formula for (i,j) is as follows: n (i,j)=L n (i,j)+A n (i,j),n∈(I,V); The specific formula for constructing the saliency map Tn of Mn is as follows:
[0028] Preferably, in step S6, the original high-frequency saliency map S n With edge saliency map T n By comparison, the specific formula for optimizing the high-frequency saliency map is:
[0029]
[0030] Preferably, in step S8, the original infrared image I I (i,j) and infrared feature map E I Perform dual-scale guided filtering to obtain E I The base layer and detail layer weight map Q I B , Q I D The specific formula is Q I B =G r1,ε1 (E I ,I I ), Q I D =G r2,ε2 (E I ,I I ), where r1, ε1, r2, ε2 are the parameters of the guide filter.
[0031] Preferably, in step S9, the comparison I I (i, j) and I V The average gray value avg(I I )、avg(I V ), change avg(I I )、avg(I V ) and then divided by the sum of the two, we can get the coefficient x. The specific formula is: If x>0, then x is combined with the feature map Q after the guided filtering I B , Q I D Multiply them together and then add them to the infrared weight map W I B , W ID Add; if x≤0, then add the visible light weight map W V B , W V D Multiply by (x+1), the specific formula is as follows:
[0032]
[0033] Preferably, in step S9, the fused base layer and fused detail layers Combined to obtain the reconstructed image, the formula is: Get the bright edge map L(i,j) and dark edge map A(i,j) of the fused image. The formula is: L(i,j)=max(L n (i,j)),n∈(I,V),A(i,j)=max(A n (i,j)),n∈(I,V), where max(L n (i,j)) represents the infrared image I I (i, j) and visible light image I V The bright edge L of (i,j) I (i,j),L V (i,j) takes a larger value; use L(i,j) and A(i,j) to enhance the edge of the reconstructed image and obtain the final fused image F final , the formula is: F final =F+LA.
[0034] Compared with the prior art, the present invention has the following beneficial effects:
[0035] First, the present invention uses quadratic difference to extract edges. Quadratic difference is a mathematical operation method. By performing two differential processes on adjacent elements of a sequence, the change pattern within the sequence can be revealed. In image processing, this principle can be applied to edge detection, that is, identifying the sudden changes in information such as grayscale or structure in the image, such as the sudden change in grayscale or the change in texture structure, which represents the edge of the image. The edge is a basic feature of the image and is the dividing line between regions. Therefore, extracting the edge is crucial for subsequent image processing tasks. Through quadratic difference processing, the edges in the image can be more accurately identified, the influence of noise and other non-edge information can be reduced, and the details of the image can be better preserved. In the image fusion process, these detail information can be effectively integrated into the fused image, making the fusion result richer and more delicate. The quadratic difference edge extraction method has a certain robustness to changes in image brightness, contrast, etc. This means that under different lighting conditions or image quality, the method can still stably extract edge information, thereby ensuring the reliability of image fusion.
[0036] Second, the present invention extracts a brightness feature map through a brightness feature extraction algorithm to guide the infrared image to perform dual-scale guided filtering. The brightness feature extraction algorithm can accurately extract the brightness information in the image and generate a brightness feature map. This feature map can effectively guide the filtering operation in the subsequent dual-scale guided filtering process to ensure that the detail information in the image is retained to the maximum extent while smoothing the noise and texture. Infrared images are often affected by problems such as noise and low contrast, resulting in poor image quality. Through the guidance of the brightness feature map, the dual-scale guided filtering can perform targeted processing based on the characteristics of the infrared image, improve the contrast and clarity of the image, and thus improve the overall quality of the image.
[0037] Third, the present invention uses the extracted bright and dark edges to enhance the edge of the guided filtering reconstructed image, which can accurately enhance edge information, optimize image contrast, retain image details, and enhance the stability and adaptability of the algorithm. Since only the edges of bright and dark parts are enhanced, this method is more efficient in calculation compared to global processing. This makes it more practical in real-time image processing or large-scale image processing tasks. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] Figure 1 The figure is a flowchart of the implementation steps of an image fusion method for brightness feature comparison in the present invention. DETAILED DESCRIPTION
[0039] In order to facilitate the understanding and implementation of the present invention, the technical scheme of the present invention is further described in detail in conjunction with the drawings and embodiments of the specification. The described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0040] The present invention proposes an image fusion method for brightness feature comparison, and its implementation steps are shown in the following block diagram: Figure 1 shown.
[0041] Combination Figure 1 , an image fusion method for brightness feature comparison of the present invention comprises the following steps:
[0042] Step S1, calculate the minimum grayscale difference, and I (i, j) and the original visible light image I V (i, j) respectively take the average gray value of the entire image, divide the average value by 64, and use it as the minimum gray difference d for edge feature extraction between the visible light and infrared original images I With d V .
[0043] Step S2, calculate the secondary difference gray matrix, taking 2 pixels as the sampling distance, for I I (i, j) and I V (i, j) calculates the grayscale difference in eight directions respectively, and converts the grayscale difference in two relative directions into and By taking the second difference, we can obtain four second difference grayscale matrices respectively: The calculation formula of the quadratic difference grayscale matrix is: θ 1 ~θ 8 The directions indicated are 0°, 45°, 90°, 135°, 180°, 225°, 270°, and 315°; Indicates that in θ u The grayscale difference in the direction, with (i, j) as the sampling center and 2 pixels as the sampling distance; Express and Make the difference and take the absolute value; Indicates that in θ u and the grayscale matrix of the quadratic difference in the relative direction.
[0044] Step S3, process the grayscale matrix and map the sampling points. Among the four secondary difference grayscale matrices obtained from the same original image, the values of any three grayscale matrices at the same position are greater than the minimum grayscale difference d n ,n∈(I,V), the corresponding position values of the three matrices are averaged; for the intermediate direction matrix, the corresponding center pixel position and two relative sampling points with a sampling distance of 2 pixels are mapped in the original image.
[0045] Step S4, constructing a bright edge map and a dark edge map, comparing the brightness of the two sampling points in step S3, mapping the position of the brighter sampling point in the bright edge matrix to store the obtained average value, and constructing the bright edge; storing the average value at the central pixel point of the dark edge matrix to construct the dark edge, the specific formula is as follows:
[0046]
[0047]
[0048]
[0049]
[0050]
[0051]
[0052] I n(m 1 ,n 1 ), I n (m 2 ,n 2 ) is I n (i,j) is the sampling center, at θ y And the gray value of the sampling point in its relative direction; is θ x ,θ y ,θ z The second difference gray matrix in the direction; L n is the edge of the bright part, A n is the preliminary dark edge; ∧ indicates the intersection of the operation results on both sides of the symbol. After taking the bright edge and the preliminary dark edge of the entire image, retain all the data of the former, and set the data in the dark edge that are at the same pixel point as the former and are not 0 to 0, and the bright edge map L of the original image can be obtained. I (i,j),L V (i,j) and dark edge map A I (i,j),A V (i,j). Dark edge image A I (i,j),A V The construction formula of (i,j) is Where L n (i, j) represents the gray value of the bright edge map of the original image at (i, j).
[0053] Step S5: construct a saliency map to map the bright edge map L I (i,j),L V (i,j) and dark edge map A I (i,j),A V (i, j) is processed by median filtering, and then added according to the original image type to obtain the infrared edge map M I (i, j) and visible light edge map M V (i,j), and construct the edge saliency map T I (i,j) and T V (i,j).
[0054] Step S6, compare the brightness features, optimize the high-frequency saliency map, and convert the original infrared image I I (i, j) and the original visible light image I V (i, j) are subjected to Laplace filtering to obtain the high-pass image H I (i,j) and H V (i,j), H I (i,j) and H VAfter Gaussian filtering, two high-frequency saliency maps S can be obtained. I (i,j) and S V (i,j), the high-frequency saliency map S I (i,j) and S V (i,j) and edge saliency map T I (i,j) and T V (i, j) are used to compare the brightness features, and the brightness at the same position is taken as the larger value to obtain the processed high-frequency saliency map S I ′(i,j) and S V ′(i,j). n With edge saliency map T n By comparison, the specific formula for optimizing the high-frequency saliency map is:
[0055] Step S7, construct the base layer and detail layer weights, and calculate the weights of S obtained in step 6. I ′(i,j) and S V ′(i,j) to compare and determine the weight graph P I (i,j) and P V (i,j). Use the corresponding original image as the guide image to I (i,j),P V The (i, j) mapping is subjected to dual-scale guided filtering to obtain the base layer weight W I B (i,j) and W V B (i,j), detail layer weight W I D (i,j) and W V D (i,j) and normalize it.
[0056] Step S8, constructing a dual-scale brightness feature map of the infrared image, using the Itti algorithm to extract brightness features of the image to extract a saliency map of the original infrared image, and using a circular filter to perform blur processing to obtain an infrared feature map E I (i,j), and the obtained feature map E I (i,j) and the original infrared image I V (i, j) perform guided filtering on the base layer and detail layer respectively to obtain the infrared feature map E I (i,j) base layer and detail layer weight map Q I B (i,j),Q I D (i,j), and normalize it. Get E IThe base layer and detail layer weight map Q I B , Q I D The specific formula is Q I B =G r1,ε1 (E I ,I I ), Q I D =G r2,ε2 (E I ,I I ), where r1, ε1, r2, ε2 are the parameters of the guide filter.
[0057] Step S9, optimizing the weight map, image reconstruction and edge enhancement, and comparing the original infrared image I I (i, j) and the original visible light image I V The average gray value avg(I I )、avg(I V ), change avg(I I )、avg(I V ) and then divided by the sum of the two, we can get the coefficient x. The specific formula is: If x>0, then x is combined with the feature map Q after the guided filtering I B , Q I D Multiply them together and then add them to the infrared weight map W I B , W I D Add; if x≤0, then add the visible light weight map W V B , W V D Multiply by (x+1) to get the optimized weight graph The specific formula is as follows:
[0058]
[0059] The base layer will be blended and fused detail layers Combined to obtain the reconstructed image, the formula is: Get the bright edge map L(i,j) and dark edge map A(i,j) of the fused image. The formula is: L(i,j)=max(L n (i,j)),n∈(I,V),A(i,j)=max(A n (i,j)),n∈(I,V), where max(L n (i,j)) represents the infrared image II (i, j) and visible light image I V The bright edge L of (i,j) I (i,j),L V (i,j) takes a larger value; use L(i,j) and A(i,j) to enhance the edge of the reconstructed image and obtain the final fused image F final , the formula is: F final =F+LA.
[0060] The specific implementation process of using quadratic difference to extract bright and dark edges in image fusion is: take the average grayscale value of the entire image for the visible light and infrared original images respectively, and divide the average value by 64 as the minimum grayscale difference for edge feature extraction of the visible light and infrared original images. With 2 pixel units as the sampling distance, the grayscale difference in eight directions of the original image is calculated, and the grayscale difference in two relative directions is quadratically subtracted to obtain four quadratic difference grayscale matrices. When the values of any three quadratic difference grayscale matrices at the same position are greater than the minimum grayscale difference, the values of the corresponding positions of the three matrices are averaged. For the intermediate direction matrix, the corresponding central pixel position and two relative sampling points with a sampling distance of 2 pixel units are mapped in the original image. Compare the brightness of the two sampling points of the original image, map the position of the brighter sampling point in the bright edge matrix, and store the average value obtained to construct the bright edge. And store the average value at the central pixel point of the dark edge matrix. After obtaining the bright edge matrix and the dark edge matrix for the entire image, all the data of the former are retained, and the data of the positions in the dark edge matrix that are not 0 with the former are set to 0, so as to obtain the dark edge.
[0061] It should be noted that the above embodiments can be freely combined as needed. The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications should also be regarded as the protection scope of the present invention.
Claims
1. An image fusion method for brightness feature comparison, characterized in that: The specific steps are as follows: Step S1, calculate the minimum grayscale difference, and I (i, j) and the original visible light image I V (i, j) respectively take the average gray value of the entire image, and divide the average value by 64 as the value of I I (i, j) and I V (i,j) Minimum grayscale difference d for edge feature extraction I With d V ; Step S2, calculate the secondary difference gray matrix, taking 2 pixels as the sampling distance, for I I (i,j) and I V (i, j) calculates the grayscale difference in eight directions respectively, and converts the grayscale difference calculated in two relative directions into and By taking the second difference, we can obtain four second difference grayscale matrices respectively: u∈(1,2,3,4); Step S3, processing the grayscale matrix and mapping the sampling points. Among the four secondary difference grayscale matrices obtained from the same original image, the values of any three grayscale matrices at the same position are greater than the minimum grayscale difference d n ,n∈(I,V), the corresponding position values of the three matrices are averaged; for the intermediate direction matrix, the corresponding center pixel position and two relative sampling points with a sampling distance of 2 pixels are mapped in the original image; Step S4, constructing a bright edge map and a dark edge map, comparing the brightness of the two sampling points in step S3, mapping the position of the brighter sampling point in the bright edge matrix, storing the obtained average value, and constructing the bright edge map; storing the average value at the central pixel point of the dark edge matrix, and constructing the dark edge matrix; after traversing the entire image, retaining all the data of the bright edge map, setting the data at the same pixel point as the former and not 0 in the dark edge map to 0, and obtaining the bright edge map L I (i,j),L V (i,j) and dark edge map A I (i,j),A V (i,j); Step S5: construct a saliency map to map the bright edge map L I (i,j),L V (i,j) and dark edge map A I (i,j),A V (i, j) is processed by median filtering, and then added according to the original image type to obtain the infrared edge map M I (i, j) and visible light edge map M V (i,j), and construct the edge saliency map T I (i,j) and T V (i,j); Step S6, compare the brightness features, optimize the high-frequency saliency map, and convert the original infrared image I I (i, j) and the original visible light image I V (i, j) are subjected to Laplace filtering to obtain the high-pass image H I (i,j) and H V (i,j), H I (i,j) and H V (i, j) and then Gaussian filtering to obtain two high-frequency saliency maps S I (i,j) and S V (i,j), the high-frequency saliency map S I (i,j) and S V (i,j) and edge saliency map T I (i,j) and T V (i, j) are used to compare the brightness features, and the brightness at the same position is taken as the larger value to obtain the processed high-frequency saliency map S I ′(i,j) and S V ′(i,j); Step S7, construct the base layer and detail layer weights, and calculate the weights of S obtained in step 6. I ′(i,j) and S V ′(i,j) to compare and determine the weight graph P I (i,j) and P V (i, j); take the corresponding original image as the guide image, and I (i,j),P V The (i, j) mapping is subjected to dual-scale guided filtering to obtain the base layer weight W I B (i,j) and W V B (i,j), detail layer weight W I D (i,j) and W V D (i, j) and normalize it; Step S8, constructing a dual-scale brightness feature map of the infrared image, and using the algorithm for image brightness feature extraction in the Itti algorithm to extract the infrared image brightness feature. I (i, j) is used to extract the saliency map and use a circular filter for blurring to obtain the infrared feature map E I (i,j), and the obtained feature map E I (i,j) and I I (i, j) perform guided filtering on the base layer and detail layer respectively to obtain the infrared feature map E I (i,j) base layer and detail layer weight map Q I B (i,j),Q I D (i, j) and normalize it; Step S9, optimizing the weight map, image reconstruction and edge enhancement, and comparing the original infrared image I I (i, j) and the original visible light image I V The average gray value avg(I I )、avg(I V ), change avg(I I )、avg(I V ) and then divide by the sum of the two to get the coefficient x; if x>0, then subtract x from Q I B (i,j),Q I D (i,j) and then multiply them by W I B (i,j),W I D (i,j) add; if x≤0, add W V B (i,j),W V D Multiply (i, j) by (x+1) to get the optimized weight graph The optimized base layer weights and detail layer weights Perform weighted average fusion respectively to obtain the base layer and detail layers Will By superimposing and performing edge enhancement, the final fused image F can be obtained. final .
2. The image fusion method for brightness feature comparison according to claim 1, characterized in that: In step S2, the specific implementation process of constructing the secondary difference grayscale matrix is: grayscale differences in eight directions are calculated for the original image, and the grayscale differences in two relative directions are subtracted twice to obtain four secondary difference grayscale matrices. The calculation formula of the secondary difference grayscale matrix is: The directions indicated by θ1 to θ8 are 0°, 45°, 90°, 135°, 180°, 225°, 270°, and 315°, respectively; Indicates that in θ u The grayscale difference in the direction, with (i, j) as the sampling center and 2 pixels as the sampling distance; Express and Make the difference and take the absolute value; Indicates that in θ u and the grayscale matrix of the quadratic difference in the relative direction.
3. The image fusion method for brightness feature comparison according to claim 1, characterized in that: The specific formula for constructing the bright edge in step S4 is as follows: In(m1,n1) and In(m2,n2) are based on I n (i,j) is the sampling center, at θ y And the grayscale value of the sampling point in its relative direction; is θ x ,θ y ,θ z The second difference gray matrix in the direction; L n is the edge of the bright part, A n is the dark edge; ∧ represents the intersection of the operation results on both sides of the symbol.
4. The image fusion method for brightness feature comparison according to claim 1, characterized in that: The dark edge image A in step S4 I (i,j),A V The construction formula of (i,j) is Where L n (i, j) represents the gray value of the bright edge map of the original image at (i, j).
5. The image fusion method for brightness feature comparison according to claim 1, characterized in that: In step S5, the bright edge map L is used I (i,j),L V (i,j) and dark edge map A I (i,j),A V (i,j) construct infrared edge map M I (i, j) and visible light edge map M V The formula for (i,j) is as follows: n (i,j)=L n (i,j)+A n (i,j),n∈(I,V); construct M n The saliency map T n The specific formula is as follows:
6. The image fusion method for brightness feature comparison according to claim 1, characterized in that: In step S6, the original high-frequency saliency map S n With edge saliency map T n By comparison, the specific formula for optimizing the high-frequency saliency map is:
7. The image fusion method for brightness feature comparison according to claim 1, characterized in that: In step S8, the original infrared image I I (i,j) and infrared feature map E I Perform dual-scale guided filtering to obtain E I The base layer and detail layer weight map Q I B , Q I D The specific formula is Q I B =G r1,ε1 (E I ,I I ), Q I D =G r2,ε2 (E I ,I I ), where r1, ε1, r2, ε2 are the parameters of the guide filter.
8. The image fusion method for brightness feature comparison according to claim 1, characterized in that: In step S9, the comparison I I (i,j) and I V The average gray value avg(I I )、avg(I V ), change avg(I I )、avg(I V ) and then divided by the sum of the two, we can get the coefficient x. The specific formula is: If x>0, then x is combined with the feature map Q after the guided filtering I B , Q I D Multiply them together and then add them to the infrared weight map W I B , W I D Add; if x≤0, then add the visible light weight map W V B , W V D Multiply by (x+1), the specific formula is as follows:
9. The image fusion method for brightness feature comparison according to claim 1, characterized in that: In step S9, the fused base layer and fused detail layers Combined to obtain the reconstructed image, the formula is: Get the bright edge map L(i,j) and dark edge map A(i,j) of the fused image. The formula is: L(i,j)=max(L n (i,j)),n∈(I,V),A(i,j)=max(A n (i,j)),n∈(I,V), where max(L n (i,j)) represents the infrared image I I (i, j) and visible light image I V The bright edge L of (i,j) I (i,j),L V (i,j) takes a larger value; use L(i,j) and A(i,j) to enhance the edge of the reconstructed image and obtain the final fused image F final , the formula is: F final =F+LA.