A visible and infrared image fusion method based on local quality assessment and hot target constraint

By using a method of local quality evaluation and thermal target constraint, the visible light and infrared image fusion strategy is adaptively adjusted, which solves the problems of thermal target information loss and insufficient texture details, achieves infrared thermal target saliency enhancement and texture structure preservation, and improves the visual quality and target recognition capability of the fused image.

CN123181237APending Publication Date: 2026-11-27CHINA JILIANG UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611403823.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-10
Publication Date
2026-11-27

AI Technical Summary

Technical Problem

Existing visible light and infrared image fusion methods fail to effectively adapt to the differences between different regions, resulting in problems such as loss of thermal target information, insufficient texture details, and false edges in the fusion results.

Method used

By constructing a local quality evaluation map and a thermal target constraint mask, the fusion strategy is adaptively adjusted to enhance the saliency of infrared thermal targets while preserving visible light texture structure information. This is achieved by employing local region partitioning, hierarchical decomposition, and weighted fusion techniques.

Benefits of technology

It improves the visual quality and target recognition capability of fused images, suppresses false edges and noise, and has good robustness and engineering application value.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123181237A_ABST
    Figure CN123181237A_ABST
Patent Text Reader

Abstract

The application discloses a visible light and infrared image fusion method based on local quality evaluation and thermal target constraint. The method establishes quality evaluation parameters by preprocessing visible light images and infrared images under the same scene, and then constructs visible light local quality images and infrared local quality images, simultaneously constructs a thermal target constraint mask, and then performs self-adaptive layered decomposition on the images based on the quality evaluation parameters to obtain a basic layer, a detail layer and a thermal target significant layer. The basic layer is fused by using normalized quality weight, and the detail layer is fused by using structure consistency gating. Finally, the fusion image is obtained by superimposing the thermal target significant layer to complete reconstruction and enhancement. The application retains visible light texture and highlights infrared thermal targets, enhances texture detail retention effect, reduces pseudo-edges and noise in the fusion process, has good robustness and engineering application value, and can be widely applied to the fields of unmanned aerial vehicle inspection, power equipment detection, intelligent security monitoring and night target identification.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of image processing and intelligent sensing technology, and in particular to a visible light and infrared image fusion method. Specifically, it relates to a visible light and infrared image fusion method based on local quality assessment and thermal target constraints, which can be applied to scenarios such as power equipment inspection, drone detection, intelligent monitoring, nighttime target recognition, industrial fault diagnosis, and intelligent security. Background Technology

[0002] Visible light images can reflect rich texture, edge, and structural information of targets, offering high spatial resolution and visual readability. However, their image quality is prone to degradation under low light, smoke obscuring, or complex lighting conditions. Infrared images achieve imaging by detecting the thermal radiation information of targets, highlighting thermal target areas and being insensitive to changes in illumination, making them suitable for nighttime environments and complex weather conditions. However, infrared images typically suffer from insufficient texture detail, blurred edges, and low spatial resolution. Therefore, fusing visible light and infrared images can simultaneously preserve the texture and structural information of the visible light image and the thermal target information of the infrared image, thereby improving target detection, scene perception, and fault identification capabilities.

[0003] Existing methods for fusion of visible and infrared images mainly include those based on multi-scale transformation, sparse representation, and deep learning. Multi-scale transformation methods typically use wavelet transform, Laplacian pyramid, and NSCT transform to decompose and fuse images. However, these methods generally employ fixed fusion rules, lacking the ability to adaptively handle differences in content across different regions, easily leading to the loss of thermal target information or blurring of texture details. Sparse representation-based methods can improve image expressiveness to some extent, but they have high computational complexity and poor real-time performance. While deep learning-based methods can achieve better fusion results, they usually rely on a large number of training samples, making model training complex and demanding on hardware resources. Furthermore, the lack of interpretability of the network model hinders engineering deployment and patent implementation.

[0004] In addition, most existing fusion methods do not fully consider the differences between infrared thermal target areas and visible light texture areas, and usually adopt a uniform fusion strategy, which easily leads to problems such as the target area not being prominent, obvious edge artifacts, and loss of background details in the fusion results.

[0005] Therefore, proposing a visible light and infrared image fusion method that can adaptively adjust the fusion strategy according to local region features and take into account both thermal target enhancement and texture detail preservation has important research significance and engineering application value. Summary of the Invention

[0006] To address the problems of easy loss of thermal target information, insufficient preservation of texture details, and easy generation of false edges in the fusion results of existing technologies, this invention proposes a visible light and infrared image fusion method based on local quality assessment and thermal target constraints.

[0007] This invention constructs a local quality evaluation map to perform credibility analysis on image information in different regions, and combines it with a thermal target constraint mask to achieve adaptive fusion of regions. This enhances the saliency of infrared thermal targets while preserving the texture structure information in the visible light image, thereby improving the visual quality and target recognition capability of the fused image.

[0008] To achieve the above objectives, the technical solution of this application includes the following steps: I. A Visible and Infrared Image Fusion Method Based on Local Quality Assessment and Thermal Target Constraints Includes the following steps: Step S1: Acquire visible light and infrared images of the same scene, and preprocess the visible light and infrared images in the computer to obtain preprocessed visible light and infrared images; Step S2: In the computer, both the preprocessed visible light image and the infrared image are divided into local regions. By establishing their respective local region quality evaluation parameters, visible light local quality maps and infrared local quality maps are constructed. A thermal target constraint mask is constructed based on the preprocessed infrared image. Step S3: Based on the visible light local quality map and infrared local quality map obtained in step S2, perform layer decomposition on the preprocessed visible light image and infrared image respectively to obtain the visible light image base layer, infrared image base layer, visible light image detail layer and infrared image detail layer; construct the thermal target saliency layer based on the preprocessed infrared image and the thermal target constraint mask. Step S4: Based on the visible light local quality map, infrared local quality map and thermal target constraint mask obtained in step S2, perform fusion processing on the visible light image base layer and infrared image base layer, and the visible light image detail layer and infrared image detail layer respectively to obtain the fused base layer and fused detail layer. Step S5: Overlay the three layers—fusion base layer, fusion detail layer, and thermal target saliency layer—and perform image reconstruction and enhancement processing to obtain the final fused image.

[0009] The preprocessing in step S1 includes grayscale conversion, noise reduction, brightness normalization, and spatial registration.

[0010] Step S2 specifically involves: Within the computer, both the preprocessed visible light and infrared images are divided into local regions using sliding windows of a preset size, resulting in multiple local windows. For each local window of the preprocessed visible light and infrared images, local region quality evaluation parameters are established. Weighted fusion processing is performed using the corresponding local region quality evaluation parameters to obtain visible light local quality maps and infrared local quality maps. A thermal target constraint mask is generated by sequentially performing infrared grayscale thresholding, morphological processing, and connected component analysis on the preprocessed infrared image.

[0011] The local region quality evaluation parameters include visible light quality parameters and infrared quality parameters. The visible light quality parameters include gradient energy, local entropy, and edge sharpness, while the infrared quality parameters include thermal saliency, local contrast, and thermal target connectivity.

[0012] Step S3 specifically involves: Both the preprocessed visible light and infrared images are subjected to guided filtering through a preset-size window. Combined with the visible light and infrared local quality maps obtained in step S2, layered decomposition is performed to extract the visible light image base layer and visible light image detail layer / infrared image base layer and infrared image detail layer, represented as follows: ; ; in, For preprocessing images, For small-scale selection coefficients, This serves as the base layer for visible light images / infrared images. For visible light image detail layer / infrared image detail layer, and They are respectively using a radius of , The visible light image base layer / infrared image base layer of the window. Let the first radius be , Let the second radius be the radius, where the first radius is smaller than the second radius; A salient layer for the thermal target is constructed based on the preprocessed infrared image and a thermal target constraint mask, and is represented as follows: ; in, This represents the thermal target constraint mask in the preprocessed infrared image. This represents the base layer of the preprocessed infrared image under the window of the second radius. This is the preprocessed infrared image, and max{} represents the maximum value.

[0013] Step S4 specifically involves: Based on the visible light local quality map and the infrared local quality map, fusion weights are constructed. The visible light image base layer and the infrared image base layer are then fused to obtain the fusion base layer, which is represented as follows: ; in, For visible light weights, For infrared weights, To integrate the base layer; and These are the visible light image base layer and the infrared image base layer, respectively. By applying structural consistency constraint-gated fusion to the visible light image detail layer and the infrared image detail layer, a fused detail layer is obtained, represented as: ; in, To integrate the detail layer, This is a detail layer with consistent structure between visible light and infrared images. For visible light image detail layers and infrared image detail layers under mask constraints, The mixing coefficient is for structures that are consistent.

[0014] Step S5 specifically involves: Image reconstruction is performed by fusing the base layer, the detail layer, and the thermal target saliency layer, as follows: ; in, To reconstruct the image, To integrate the base layer, To integrate the detail layer, For the significant layer of the thermal target, The gain coefficient of the thermal target significant layer; The reconstructed image is enhanced to output the final fused image.

[0015] The image enhancement process includes grayscale range cropping, CLAHE implementation, and normalization.

[0016] 2. A computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the method.

[0017] 3. A computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the method.

[0018] Compared with the prior art, the present invention has the following beneficial effects: This invention preserves visible light textures and highlights infrared thermal targets, enhances texture detail retention, and reduces false edges and noise during the fusion process. It has good robustness and engineering application value, and can be widely used in fields such as UAV inspection, power equipment testing, intelligent security monitoring, and nighttime target recognition.

[0019] 1. It can dynamically adjust the fusion strategy based on local regional characteristics, thereby improving the region's adaptive capability; 2. It can effectively enhance the salience of infrared thermal targets and improve target detection capabilities; 3. It can better preserve the texture structure information in visible light images; 4. It can effectively suppress false edges and noise amplification during the fusion process; 5. It has advantages such as clear structure, moderate computational complexity, and ease of engineering implementation. Attached Figure Description

[0020] Figure 1 This is a schematic flowchart of the method of the present invention; Figure 2 This is a flowchart illustrating the construction process of the quality evaluation chart in the method of this invention. Figure 3 This is a flowchart of the image reconstruction process of the present invention. Detailed Implementation

[0021] The present invention will now be described in further detail with reference to the accompanying drawings and specific embodiments.

[0022] This embodiment selects typical scenes from the publicly available infrared and visible light image dataset TNO as experimental data to provide a detailed explanation of the visible light and infrared image fusion method based on local quality assessment and thermal target constraints proposed in this invention.

[0023] To avoid ambiguity in formula symbols, this embodiment makes the following unified convention: pixel position is uniformly denoted as... , can represent any pixel position; This represents an exponential function with base e, i.e. ; Subscript Represents visible light modes, subscript Indicates infrared mode; This only represents a positive number set to prevent division by zero or logarithmic zero; in this embodiment, it is taken as... The same complete symbol (including its subscripts and superscripts) represents only one meaning throughout the text.

[0024] like Figure 1As shown, the method of the present invention mainly consists of three modules: an input module (inputting visible light and infrared images), a fusion module (performing steps such as image preprocessing, local quality map construction, and adaptive hierarchical decomposition), and an output module (outputting the fused image). like Figure 2 As shown, a visible light and infrared image fusion method based on local quality assessment and thermal target constraints includes the following steps: Step S1: Acquire visible light and infrared images of the same scene, and preprocess the visible light and infrared images in the computer to obtain preprocessed visible light and infrared images respectively; The preprocessing in step S1 includes grayscale conversion, noise reduction, brightness normalization, and spatial registration.

[0025] Specifically, visible light and infrared images of the same scene from the publicly available bimodal image dataset TNO were selected as experimental inputs. Since visible light and infrared images differ significantly in imaging principles, resolution, and grayscale response, preprocessing of both images is necessary. Because the visible light images in the TNO dataset have already been grayscale converted, no further RGB grayscale conversion is required. Let the input grayscale visible light and infrared images be respectively... and First, noise suppression and brightness normalization are performed on the visible light and infrared images respectively. Noise suppression uses a bilateral filtering algorithm to reduce noise in both images. Spatial registration is performed using a feature matching method based on phase consistency for fine registration.

[0026] To suppress noise and preserve edges, the image Perform bilateral filtering separately: ; ; in, Indicates the current pixel position being processed. Indicates local neighborhood centered on The location of neighboring pixels within, Represents Euclidean distance. Indicates spatial distance scale Indicates the grayscale difference scale. Indicates the current pixel of the input image. grayscale value at that location Indicates the neighboring pixels of the input image grayscale value at that location express and Spatial distance weights between them express and The gray-scale similarity weight between them Represents the normalization factor. Represents pixels The filtered grayscale value is obtained by iterating through the input image. After determining all pixel positions, the filtering results at each pixel position are used to compose a complete filtered output image. In this embodiment, the neighborhood size can be set to 1. , , .

[0027] The brightness of the filtered result is normalized: ; in, and They represent The minimum and maximum gray values, Represents the filtered image at any pixel position grayscale value at that location Represents pixels After normalizing the gray values, by traversing all pixel positions, the normalized gray values ​​together form the normalized image. After normalization, the grayscale range of both the visible light image and the infrared image is [missing information]. .

[0028] To eliminate slight positional discrepancies between the two modal images, this embodiment employs a fine registration method based on multi-scale Log-Gabor response, maximum index map description, and RANSAC estimation. In the... The first scale and the first Construct Log-Gabor kernels in three directions First calculate the first Radial frequency response at each scale: ; in, Represents the spatial frequency of the image. Indicates the first The center frequency of each scale Only indicates the first Logarithmic frequency bandwidth of each scale. With the Multiplying the directional windows in each direction and performing an inverse transform yields the spatial domain filter kernel. .

[0029] For normalized images Calculate the complex response amplitude at each scale and in each direction: ; in, Representing an image In scale ,direction Below, in pixels The response amplitude at the location, sign This represents a two-dimensional convolution. The cumulative response map used for feature point detection is defined as: ; in, Representing an image At pixel Accumulate Log-Gabor responses. Traverse the image. After considering all pixel positions, the combined responses of each pixel position constitute the cumulative response map. , Representing an image The cumulative Log-Gabor response. Local extremum detection and nonmaximum suppression are performed to obtain candidate feature points.

[0030] The maximum index graph is defined as: ; Among them, for images any pixel position in First, the filtered responses at each scale in the o-th direction are accumulated to obtain... Then, the scale cumulative responses for all directions are compared, and the direction that produces the largest cumulative response is denoted as... After traversing all pixel positions in the image, the orientation numbers of each pixel position together form a maximum index map. Statistical analysis within the neighborhood of candidate feature points. The directional numbering distribution is used to construct feature descriptors. For each descriptor to be matched, let the nearest neighbor distance and the second nearest neighbor distance be respectively... and ,in When the following conditions are met: When this happens, the candidate match is retained. This only represents the nearest neighbor distance ratio threshold; in this embodiment, it is taken as... .

[0031] RANSAC is used to estimate the homography matrix from candidate matches. : ; in, and These represent the homogeneous coordinates of the matching point in the visible light image and the infrared image, respectively. This only represents the mapping from visible light coordinates to infrared coordinates. Homography matrix, symbol This indicates homogeneous scaling equivalence. During resampling, for each output pixel in the visible light coordinate system... ,pass The sampling position of the infrared image is determined, and bilinear interpolation is used to obtain the grayscale value. This allows the infrared image to be resampled to the visible light image coordinate system, resulting in the registered visible light and infrared images, which are denoted as [reference 1] and [reference 2]. and This is for use in subsequent steps.

[0032] Step S2: In the computer, the preprocessed visible light image and infrared image are divided into local regions. By establishing their respective local region quality evaluation parameters, visible light local quality map and infrared local quality map are constructed. The thermal target region is extracted based on the thermal response information in the preprocessed infrared image, a thermal target constraint mask is constructed, and it is stored in memory. Step S2 is as follows: Within the computer, both the preprocessed visible light and infrared images are divided into local regions using a sliding window of a preset size, resulting in multiple local windows. The window size is set to 16×16, and the window step size is set to 8. For each local window of the preprocessed visible light and infrared images, local region quality evaluation parameters are established. Weighted fusion processing is performed using the corresponding local region quality evaluation parameters to obtain visible light local quality maps and infrared local quality maps. To enhance the thermal target region, a thermal target constraint mask is generated by sequentially performing infrared grayscale thresholding, morphological processing, and connected component analysis on the preprocessed infrared image. Local region quality evaluation parameters include visible light quality parameters and infrared quality parameters. Visible light quality parameters include gradient energy, local entropy, and edge sharpness of the preprocessed visible light image. Infrared quality parameters include thermal saliency, local contrast, and thermal target connectivity of the preprocessed infrared image.

[0033] Specifically, such as Figure 3 As shown, the preprocessed visible light image and infrared image are divided into a group of overlapping local windows at the same position. Each window is [size missing]. The sliding step size is 8. Let the first... The number of pixels contained in each window is .

[0034] For visible light images, in the window The gradient energy, local entropy, and edge sharpness are obtained within the region, expressed as: ; ; ; in, and These represent the horizontal and vertical gradients of a visible light image, respectively. This indicates the number of bins in the grayscale histogram. Display window The Middle The probability of a grayscale bin. This represents the Laplace operator. A larger value indicates a stronger texture response. The larger the value, the richer the local information. The larger the value, the sharper the edges. Let be the gradient energy of the j-th window in the visible light image. Let J be the local entropy of the j-th window of the visible light image. The edge sharpness of the j-th window in the visible light image; Then, a unified minimum-maximum normalization operator is defined, expressed as: ; in, Represents any window indicator. This indicates the minimum value of this window metric among all window metrics. This indicates the maximum value of this window metric among all window metrics. This indicates the result of normalizing the indicator across the entire window range. Indicates the window index.

[0035] Furthermore, the visible light window quality score is obtained by fusing gradient energy, local entropy, and edge sharpness using the minimum-maximum normalization operator: ; in, Indicates the first The visible light quality score of each window. , and These represent the weights for gradient energy, local entropy, and edge sharpness, respectively. In this embodiment, , , .

[0036] For infrared images, first calculate the... Average grayscale of each window and grayscale standard deviation And calculate the average gray level of the entire infrared image. and grayscale standard deviation Infrared thermal significance Defined as: ; in, The larger the value, the stronger the high-temperature response of the window relative to the global background.

[0037] Infrared local contrast Defined as: ; in, and Representing windows respectively The maximum and minimum values ​​of the inner infrared grayscale.

[0038] To calculate the connectivity of hot targets, a temporary binary graph is first constructed within the window. The window threshold is... , The threshold coefficient representing the window connectivity analysis is taken in this embodiment. When the grayscale value of a window pixel season Otherwise .set up for The number of pixels contained in the largest 8-connected region in the middle indicates the connectivity of the hot target: ; in, The larger the value, the more concentrated and stable the high-response area within the window.

[0039] The infrared window quality score is: ; in, Indicates the first Infrared quality score for each window. , and Representing thermal significance respectively Local contrast Connectivity with thermal targets The weight, and This embodiment takes , , .

[0040] To restore the window score to a pixel grid, define an indicator function. :when hour ,otherwise Define the covered pixels. The number of windows is: ; in, Only indicates the covered pixels The number of windows; ensured by padding windows at the boundaries or using symmetrical filling. .

[0041] The pixel-level average of the window score is: ; ; The pixel-level quality map is obtained by combining the pixel-level average of the window score with the min-max normalization operator, and is represented as follows: ; ; in, and Representing pixels The average result of the overlap between the visible light window score and the infrared window score on the pixel grid. and These represent the pixel points. Visible light quality value and infrared quality value, This indicates that min-max normalization is performed across the entire pixel range.

[0042] The quality values ​​for each pixel are arranged according to their spatial coordinates, thus yielding a value range of [value range]. Visible light local quality map and infrared local quality map .

[0043] To enhance the thermal target region, this embodiment employs adaptive threshold segmentation to generate a thermal target constraint mask.

[0044] The global threshold for thermal targets is calculated based on the average gray level and gray level standard deviation of the entire infrared image. ; in, This represents the average gray level of the entire infrared image. Indicates the standard deviation of gray levels. Indicates the threshold for thermal target segmentation. This represents the thermal target threshold coefficient, which is taken in this embodiment. .

[0045] Initial hot target pixel Defined as: ; in, Represents pixels Pixels initially identified as hot targets. An initial hot target constraint mask is obtained by traversing all image pixel locations. .

[0046] use Structural elements right Perform the opening operation first, then the closing operation: ; ; in, This only indicates morphological corrosion. This only indicates morphological expansion; This represents the opening operation result obtained by first eroding and then expanding, used to remove isolated noise; Indicates in The closed-loop operation result obtained by first expanding and then corroding is used to fill small holes.

[0047] right Perform 8-connected domain analysis, let the first... The connected components are Its area is The minimum retention area is First, define the union of connected components that satisfy the area condition: ; In this embodiment, the following can be adopted: in, This only represents the total number of pixels in the entire image. This indicates rounding up, thus ensuring... It is a positive integer.

[0048] For any pixel position in an infrared image The mask value at the pixel location is determined according to the following formula: ; By traversing all pixel positions in the infrared image, the binary results of each pixel position are obtained, ultimately yielding a complete thermal target constraint mask. .

[0049] To avoid a step change in subsequent fusion weights at the mask boundary, Perform Gaussian smoothing and crop to : ; in, The standard deviation is expressed as The normalized Gaussian kernel, This only indicates the scale of the Gaussian kernel. This indicates that the results will be restricted to... A smooth thermal target constraint mask is obtained. In this embodiment, When a smooth transition is not required, it can be directly set... .

[0050] Step S3: Based on the visible light local quality map and infrared local quality map obtained in step S2, perform adaptive layer decomposition on the preprocessed visible light image and infrared image respectively to obtain the visible light image base layer, infrared image base layer, visible light image detail layer and infrared image detail layer; construct the thermal target salient layer based on the preprocessed infrared image and the thermal target constraint mask, and save it in the memory. Step S3 is as follows: To preserve both background information and texture details, this embodiment performs layered decomposition on the image. Traditional fixed-scale decomposition methods are prone to causing: blurred edges of hot targets, loss of texture details, and amplification of noise. Therefore, this invention adopts an adaptive layered decomposition method based on local quality maps. The adaptive layered decomposition in step S3 is implemented by combining guided filtering and multi-scale decomposition, and the decomposition scale parameters are dynamically adjusted according to the local quality map. For both the preprocessed visible light image and infrared image, guided filtering is used to traverse the pixels of the image through a preset-size window. Combined with the visible light local quality map and infrared local quality map obtained in step S2, layered decomposition is performed to extract the visible light image base layer and visible light image detail layer / infrared image base layer and infrared image detail layer, represented as: First, guided filtering is used to extract the base layer. To clarify the formula for the base layer, this embodiment expands and explains the local linear model of guided filtering. For any image... Using small radii respectively and large radius Perform self-guided filtering. For the numbered... , radius is window The local linear coefficients are defined as follows:

[0051]

[0052] in, and Representing images respectively In the window The average gray level and standard deviation of gray level within the range and This represents the linear coefficients of the window. This represents the guided filter regularization parameter.

[0053] For pixels For all containing The local window coefficients are averaged: ; ; in, These are the pixels of a preprocessed visible light or infrared image. Indicates the presence of pixels The radius is The number of windows, and These represent the linear coefficients of the preset-size window. and Each represents a pixel. The linear coefficients after window averaging. For the number , radius is The window; radius is The base layer at the pixel The output at this location is: ; in, For preprocessing images At pixel grayscale value at that location Indicates the use of radius. The base layer at the pixel The grayscale value at each pixel location within the image's pixel domain is calculated to obtain the entire base layer image. , Representing an image In radius The underlying base layer, making and Small-scale base layer images were obtained respectively. Large-scale base layer images .

[0054] To dynamically select the decomposition scale based on local quality, a Sigmoid function is defined: ; in, Indicates real number input. The output range is For the image Corresponding quality diagram ,in , For any pixel position Define the small-scale selection coefficient: ; in, Indicates the pixel position The mass value at that location, Indicates the quality judgment criteria. Indicates the smoothness of scale transitions. For selecting coefficients at a small scale, the criteria for determining the first and second radii are as follows: when hour, , pixels At specific locations, windows with a first radius are used more often to reduce excessive smoothing of textures, edges, or significant thermal response information; when hour, , pixels In certain locations, windows with a second radius are more commonly used to enhance the smoothness of uniform background areas. When hour Example of taking , , , , .

[0055] Finally at the pixel The output grayscale values ​​of the base layer and detail layer are as follows: ; ; in, For pixels The grayscale value of the base layer at that location. For pixels The grayscale value of the detail layer at that location, and They are respectively using a radius of , The base layer of a window is at the pixel level. grayscale value at that location Let the first radius be , Let the second radius be the radius, where the first radius is smaller than the second radius; calculate the above formula once for each position within the image pixel domain to obtain the result. and , representing the visible light base layer and the infrared base layer, respectively. and These represent the visible light detail layer and the infrared detail layer, respectively.

[0056] To separately express the positive thermal response of an infrared thermal target relative to the low-frequency background, a thermal target saliency layer is constructed by combining a thermal target constraint mask, represented as: ; in, Represents pixels Smooth thermal target constraint mask, This represents the base layer of the infrared image below the window of the second radius. To preprocess infrared images At pixel The grayscale value at the specified location, where max{} represents the maximum value.

[0057] Finally, based on all pixels, the thermal target saliency layer is obtained. , This represents a smooth thermal target constraint mask. This represents the large-scale base layer of an infrared image. This definition makes... The main focus is on preserving the portion of the thermal target that is higher than the local low-frequency background, avoiding the repeated superposition of the entire infrared brightness layer into the final result.

[0058] Step S4: Based on the visible light local quality map, the infrared local quality map, and the thermal target constraint mask, perform differential fusion processing on the visible light image base layer, the infrared image base layer, the visible light image detail layer, and the infrared image detail layer to obtain the fused base layer and the fused detail layer, and save them in the memory. Step S4 is as follows: The fused base layer is obtained by fusing the visible light image base layer and the infrared image base layer using normalized quality weights, and is represented as follows: Unnormalized weights are constructed based on the local quality map and thermal target constraint mask: ; ; in, and These represent the unnormalized weights of the visible light base layer and the infrared base layer, respectively. This only represents the infrared base layer enhancement coefficient of the thermal target region; in this embodiment, it is taken as... Normalize the weights: ; ; After normalization, it satisfies The fusion base layer is defined as follows: ; in, For visible light weights, For infrared weights, To integrate the base layer; and These are the visible light image base layer and the infrared image base layer, respectively; the above normalization method avoids overall brightness drift caused by the weight sum being greater than 1.

[0059] By applying structural consistency constraint-gated fusion to the visible light image detail layer and the infrared image detail layer, strong response details are retained when some structures of the two layers are consistent. When some structures of the two layers are inconsistent, differential fusion is performed using a thermal target constraint mask to obtain the fused detail layer, represented as: Define the gradient vector of the detail layer: ; in, Only representing the detail layer The two-dimensional gradient vector, and These represent the horizontal and vertical partial derivatives, respectively. Define the detailed gradient strength: ; To avoid computational instability at zero gradient and to prevent misclassifying edges with opposite gradient directions as edges with the same gradient direction, we define a co-directional consistency for two-modal edges: ; in, This only indicates the consistency of the gradients in the same direction between the two modes, and its value range is... The mixing coefficients approach 1 when the gradients are in the same direction, and approach 0 when the gradients are orthogonal, opposite, or either gradient is close to zero. The continuous mixing coefficients of structurally consistent branches are: ; in, This only represents the mixing coefficient of structurally consistent branches. This only represents the smooth slope of the consistency transition. This only represents the directional consistency threshold. In this embodiment, we take... , .

[0060] When the edges of two modes are in the same direction, the signed details of the mode with the stronger gradient response are preserved. The candidate detail layer with consistent structure is defined as follows: ; It represents a candidate detail layer with consistent structure; it preserves signed details with strong responses, which can avoid mutual cancellation of details with opposite polarities.

[0061] When the two modal structures are inconsistent, region selection is performed based on the thermal target constraint mask: ; in, This only indicates the candidate detail layer under mask constraints, which prioritizes the preservation of infrared details in hot target areas and the preservation of visible light details in non-hot target areas.

[0062] The final fusion detail layer is: ; in, To integrate the detail layer, For detail layers with consistent structures in visible light and infrared images, strong responsive signed details are preserved, which can prevent details of opposite polarities from canceling each other out. For visible light image detail layers and infrared image detail layers under mask constraints, The mixing coefficient is structurally consistent. It varies continuously. and It can reduce edge breakage and false edges caused by hard switching.

[0063] Step S5: Overlay the three layers—fusion base layer, fusion detail layer, and thermal target saliency layer—and perform image reconstruction and enhancement processing to obtain the final fused image.

[0064] Step S5 is as follows: like Figure 3 As shown, image reconstruction is performed by fusing the base layer, the detail layer, and the thermal target saliency layer, as represented by: ; in, The reconstructed image before enhancement. To integrate the base layer, To integrate the detail layer, For the significant layer of the thermal target, For the gain coefficient of the thermal target significant layer, this embodiment takes... ; The reconstructed image before enhancement is enhanced, and the final fused image is output.

[0065] Image enhancement processing includes grayscale range cropping, CLAHE implementation, and normalization.

[0066] Image enhancement processing specifically involves limiting the reconstructed image to a legal normalized grayscale range. ; in, This only indicates cropping to The reconstructed image afterward.

[0067] When using 8-bit grayscale CLAHE, the normalized image is first quantized to... Gray levels: ; in, This only represents an 8-bit integer grayscale image. This only indicates the number of gray levels. This indicates rounding to the nearest integer. Perform contrast-adaptive histogram equalization with limitations: ; in, This only represents the 8-bit grayscale image output by CLAHE. and These represent only the number of blocks in the horizontal and vertical directions, respectively. This only represents the histogram cropping limit. The final fused image is renormalized as follows: ; This embodiment is acceptable. , CLAHE performs amplitude limiting and redistribution on the histogram of each block, and performs bilinear interpolation on the mapping results of adjacent blocks to reduce block boundaries. If an equivalent CLAHE implementation that directly supports floating-point input is used, the above quantization and denormalization steps can be omitted, but the same number of blocks and equivalent clipping limits should be maintained.

[0068] The fused image obtained through the above steps In non-thermal target background areas, visible light texture and structural information are primarily preserved, while in thermal target areas, the intensity of infrared thermal response is enhanced. Furthermore, normalized weights, continuous masks, and structural consistency coefficients are used to suppress brightness drift, edge breaks, false edges, and noise amplification. This invention can be applied to scenarios such as power equipment inspection, drone nighttime monitoring, intelligent security, industrial fault detection, and autonomous driving environmental perception.

Claims

1. A visible light and infrared image fusion method based on local quality assessment and thermal target constraint, characterized in that, Includes the following steps: Step S1: Acquire visible light and infrared images of the same scene, and preprocess the visible light and infrared images in the computer to obtain preprocessed visible light and infrared images; Step S2: In the computer, both the preprocessed visible light image and the infrared image are divided into local regions. By establishing their respective local region quality evaluation parameters, visible light local quality maps and infrared local quality maps are constructed. A thermal target constraint mask is constructed based on the preprocessed infrared image. Step S3: Based on the visible light local quality map and infrared local quality map obtained in step S2, perform layer decomposition on the preprocessed visible light image and infrared image respectively to obtain the visible light image base layer, infrared image base layer, visible light image detail layer and infrared image detail layer; construct the thermal target saliency layer based on the preprocessed infrared image and the thermal target constraint mask. Step S4: Based on the visible light local quality map, infrared local quality map and thermal target constraint mask obtained in step S2, perform fusion processing on the visible light image base layer and infrared image base layer, and the visible light image detail layer and infrared image detail layer respectively to obtain the fused base layer and fused detail layer. Step S5: Overlay the three layers—fusion base layer, fusion detail layer, and thermal target saliency layer—and perform image reconstruction and enhancement processing to obtain the final fused image.

2. The visible light and infrared image fusion method based on local quality assessment and thermal target constraint according to claim 1, characterized in that: The preprocessing in step S1 includes grayscale conversion, noise reduction, brightness normalization, and spatial registration.

3. The visible light and infrared image fusion method based on local quality assessment and thermal target constraint according to claim 1, characterized in that, Step S2 specifically involves: Within the computer, both the preprocessed visible light and infrared images are divided into local regions using sliding windows of a preset size, resulting in multiple local windows. For each local window of the preprocessed visible light and infrared images, local region quality evaluation parameters are established. Weighted fusion processing is performed using the corresponding local region quality evaluation parameters to obtain visible light local quality maps and infrared local quality maps. A thermal target constraint mask is generated by sequentially performing infrared grayscale thresholding, morphological processing, and connected component analysis on the preprocessed infrared image.

4. The visible light and infrared image fusion method based on local quality assessment and thermal target constraint according to claim 3, characterized in that: The local region quality evaluation parameters include visible light quality parameters and infrared quality parameters. The visible light quality parameters include gradient energy, local entropy, and edge sharpness, while the infrared quality parameters include thermal saliency, local contrast, and thermal target connectivity.

5. The visible light and infrared image fusion method based on local quality assessment and thermal target constraint according to claim 1, characterized in that, Step S3 specifically involves: Both the preprocessed visible light and infrared images are subjected to guided filtering through a preset-size window. Combined with the visible light and infrared local quality maps obtained in step S2, layered decomposition is performed to extract the visible light image base layer and visible light image detail layer / infrared image base layer and infrared image detail layer, represented as follows: ; ; in, For preprocessing images, For small-scale selection coefficients, This serves as the base layer for visible light images / infrared images. For visible light image detail layer / infrared image detail layer, and They are respectively using a radius of , The visible light image base layer / infrared image base layer of the window. Let the first radius be , Let the second radius be the radius, where the first radius is smaller than the second radius; A salient layer for the thermal target is constructed based on the preprocessed infrared image and a thermal target constraint mask, and is represented as follows: ; in, This represents the thermal target constraint mask in the preprocessed infrared image. This represents the base layer of the preprocessed infrared image under the window of the second radius. This is the preprocessed infrared image, and max{} represents the maximum value.

6. The visible light and infrared image fusion method based on local quality assessment and thermal target constraint according to claim 1, characterized in that, Step S4 specifically involves: Based on the visible light local quality map and the infrared local quality map, fusion weights are constructed. The visible light image base layer and the infrared image base layer are then fused to obtain the fusion base layer, which is represented as follows: ; in, For visible light weights, For infrared weights, To integrate the base layer; and These are the visible light image base layer and the infrared image base layer, respectively. By applying structural consistency constraint-gated fusion to the visible light image detail layer and the infrared image detail layer, a fused detail layer is obtained, represented as: ; in, To integrate the detail layer, This is a detail layer with consistent structure between visible light and infrared images. For visible light image detail layers and infrared image detail layers under mask constraints, The mixing coefficient is for structures that are consistent.

7. The visible light and infrared image fusion method based on local quality assessment and thermal target constraint according to claim 1, characterized in that, Step S5 specifically involves: Image reconstruction is performed by fusing the base layer, the detail layer, and the thermal target saliency layer, as follows: ; in, To reconstruct the image, To integrate the base layer, To integrate the detail layer, For the significant layer of the thermal target, The gain coefficient of the thermal target significant layer; The reconstructed image is enhanced to output the final fused image.

8. The visible light and infrared image fusion method based on local quality assessment and thermal target constraint according to claim 7, characterized in that: The image enhancement process includes grayscale range cropping, CLAHE implementation, and normalization.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 8.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 8.