An infrared image denoising method, computer device, medium and product

By constructing the structural tensor matrix and anisotropic metric graph decomposition of infrared images, and combining adaptive thresholding and three-dimensional block group singular value decomposition, the problem of noise and detail information intertwining in infrared images is solved, achieving efficient denoising and detail preservation, which is suitable for infrared monitoring and imaging.

CN122155995APending Publication Date: 2026-06-05BEIJING DONGYU HONGDA TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
BEIJING DONGYU HONGDA TECH CO LTD
Filing Date
2026-04-23
Publication Date
2026-06-05

AI Technical Summary

Technical Problem

Existing infrared image denoising methods tend to reduce image sharpness during the noise removal process, especially due to excessive smoothing of edges and texture details, making it difficult to effectively separate noise from detail information.

Method used

By constructing the structure tensor matrix of the infrared image, decomposing it using anisotropic metric maps, separating the fundamental frequency component and the high-frequency component, and employing adaptive thresholding and three-dimensional block group singular value decomposition, combined with the reconstruction of the high-frequency component, the preservation of detail information and the removal of noise are achieved.

Benefits of technology

It effectively removes noise from infrared images while preserving key details, improving the visual effect and structural integrity of the image, making it suitable for scenarios with high image quality requirements.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122155995A_ABST
    Figure CN122155995A_ABST
Patent Text Reader

Abstract

The application discloses an infrared image denoising method, computer equipment, medium and product, and relates to the technical field of image processing. The method comprises the following steps: firstly, constructing a structure tensor matrix corresponding to each pixel point in the infrared image through horizontal and vertical pixel gradient matrices; then, realizing separation of a base frequency component and a high frequency component of the infrared image based on an anisotropy measurement map, processing the main structure and the detail information respectively, and avoiding problems such as detail loss or noise residue caused by the traditional denoising method. In the high frequency component processing, the high frequency noise is efficiently filtered through the steps of overlapping block division, structure similarity reference sub-block screening, three-dimensional block group singular value decomposition and adaptive threshold shrinkage, and the integrity of the detail information is ensured by means of sub-block stacking and inverse transformation reconstruction. Finally, the fusion of the base frequency component image and the denoised high frequency component image ensures that the output image has clear main structure and retains key details such as edges and textures.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of image processing technology, and in particular to an infrared image denoising method, computer equipment, medium, and product. Background Technology

[0002] With the continuous development of infrared imaging technology, infrared images have been widely used in military reconnaissance, night vision surveillance, and medical diagnosis. Infrared images can detect the infrared radiation emitted by objects and can effectively capture clear images of targets even at night or in low-visibility environments. However, due to the inherent characteristics of infrared detectors and the influence of the external environment, the acquired infrared images often contain a lot of noise, which seriously affects image quality.

[0003] Currently, commonly used infrared image denoising methods are mainly based on traditional filtering techniques, such as Gaussian filtering and median filtering. These methods suppress noise by performing filtering operations in the spatial or frequency domains of the infrared image. Additionally, some methods employ wavelet transform to decompose the infrared image into sub-bands of different scales, and then perform thresholding on each sub-band to achieve denoising. Other methods use nonlocal means algorithms to perform denoising by searching for similar blocks throughout the entire infrared image.

[0004] However, the above methods have some limitations when processing infrared images. While filtering out noise, they often over-smooth edges and texture details in infrared images, leading to a decrease in image sharpness. Summary of the Invention

[0005] This application provides an infrared image denoising method, computer equipment, medium, and product to alleviate the problem of simultaneous loss of detail and noise residue caused by traditional one-size-fits-all denoising.

[0006] In a first aspect, this application provides an infrared image denoising method applied to a computer device. The method includes: acquiring the pixel matrix of an infrared image; calculating the horizontal and vertical pixel gradient matrices of the infrared image based on the pixel matrix, wherein the infrared image includes multiple pixels and the pixel matrix includes the correspondence between pixels and pixel values; constructing a structure tensor matrix corresponding to each pixel in the infrared image based on the horizontal and vertical pixel gradient matrices; calculating an anisotropy metric map of the infrared image according to the eigenvalue sequence of the structure tensor matrix, wherein the anisotropy metric map includes the correspondence between pixels and metric values; decomposing the infrared image using the anisotropy metric map to obtain a fundamental frequency component image representing the main structure and a high-frequency component image representing detailed information; and performing block partitioning on the high-frequency component image to obtain several mutually... Overlapping image sub-blocks; within a preset search window, combined with anisotropy metric maps, target reference sub-blocks with structural feature similarity greater than a preset similarity threshold are selected for each target image sub-block. A target image sub-block represents any image sub-block, and a target reference sub-block represents the reference sub-block corresponding to the target image sub-block; the image sub-blocks and their corresponding reference sub-blocks are stacked to construct a three-dimensional block group; singular value decomposition is performed on the three-dimensional block group to obtain a singular value sequence; an adaptive threshold is calculated based on the anisotropy metric map, and the singular value sequence is subjected to soft thresholding shrinkage using the adaptive threshold to obtain a denoised singular value sequence; based on the denoised singular value sequence, the three-dimensional block group is reconstructed to obtain a denoised image block; the denoised image block is restored to a two-dimensional plane to obtain a denoised high-frequency component image; the fundamental frequency component image and the denoised high-frequency component image are fused to obtain a denoised infrared image.

[0007] By adopting the above technical solution, firstly, the computer equipment constructs a structural tensor matrix corresponding to each pixel in the infrared image using horizontal and vertical pixel gradient matrices, accurately capturing the spatial structural features of the image pixels for subsequent differential processing. Subsequently, the computer equipment separates the fundamental frequency component and high-frequency component of the infrared image based on anisotropic metric maps, allowing the main structure and detailed information to be processed separately, avoiding the problems of detail loss or noise residue caused by the "one-size-fits-all" approach in traditional denoising methods. In high-frequency component processing, through steps such as overlapping block partitioning, structurally similar reference sub-block selection, 3D block group singular value decomposition, and adaptive threshold shrinkage, high-frequency noise is efficiently filtered, while the integrity of detailed information is ensured through sub-block stacking and inverse transformation reconstruction. Finally, the computer equipment fuses the fundamental frequency component image with the denoised high-frequency component image, ensuring that the output image has both a clear main structure and retains key details such as edges and textures. From feature extraction to component separation, noise filtering, and image reconstruction, this method effectively solves the denoising problem caused by the intertwining of noise and detail information in infrared images through "precise denoising + detail preservation". It is suitable for scenarios with high image quality requirements, such as infrared monitoring and infrared imaging, and improves the practicality and reliability of the denoised image.

[0008] In conjunction with some embodiments of the first aspect, in some embodiments, a structure tensor matrix corresponding to each pixel in the infrared image is constructed based on the horizontal pixel gradient matrix and the vertical pixel gradient matrix. Specifically, this includes: calculating the square of each element in the horizontal pixel gradient matrix to obtain a horizontal gradient squared map; calculating the square of each element in the vertical pixel gradient matrix to obtain a vertical gradient squared map; calculating the product of corresponding elements of the horizontal pixel gradient matrix and the vertical pixel gradient matrix to obtain a mixed gradient map; using a preset Gaussian kernel function, performing convolution smoothing processing on the horizontal gradient squared map, the vertical gradient squared map, and the mixed gradient map respectively to obtain smoothed horizontal components, smoothed vertical components, and smoothed mixed components; and constructing a structure tensor matrix corresponding to each pixel in the infrared image based on the smoothed horizontal components, smoothed vertical components, and smoothed mixed components.

[0009] By employing the aforementioned technical solution, the computer device calculates the horizontal squared gradient map, the vertical squared gradient map, and the mixed gradient map, comprehensively capturing the gradient information of pixels in the horizontal, vertical, and intersecting directions, fully reflecting the spatial variation characteristics of pixels. Subsequently, the computer device uses a preset Gaussian kernel function to perform convolution smoothing on the three types of gradient maps, effectively filtering out random noise introduced during gradient calculation and avoiding interference from noise on structural feature extraction, making the gradient components more closely match the real structure of the image. The structural tensor matrix constructed based on the smoothed three components can accurately characterize the local structural attributes of each pixel, laying the foundation for obtaining reliable feature values ​​in subsequent feature decomposition. Compared to directly using the original gradient information to construct the tensor matrix, this method enhances the saliency of structural features through gradient squared calculation and reduces noise interference through Gaussian smoothing. This makes the constructed structural tensor matrix not only highly noise-resistant but also accurately reflects the structural correlation of pixels, providing a core guarantee for the subsequent anisotropy measurement map to accurately distinguish edge regions from flat regions, indirectly improving the accuracy and stability of the entire denoising process.

[0010] In conjunction with some embodiments of the first aspect, in some embodiments, an anisotropy metric map of an infrared image is calculated based on the eigenvalue sequence of the structure tensor matrix. Specifically, this includes: performing eigenvalue decomposition on the structure tensor matrix corresponding to each pixel in the infrared image to obtain a first eigenvalue and a second eigenvalue, wherein the first eigenvalue is greater than or equal to the second eigenvalue; calculating a coherence index based on the difference between the first eigenvalue and the second eigenvalue; normalizing the coherence index to a preset metric value range to generate an anisotropy metric map, wherein the magnitude of the metric value is positively correlated with the probability that the pixel is located in an edge region.

[0011] By adopting the above technical solution, firstly, the computer device performs eigenvalue decomposition on the structural tensor matrix of each pixel to obtain the first eigenvalue and the second eigenvalue. The coherence index is calculated based on the difference between the two eigenvalues, using the difference in eigenvalues ​​to reflect the anisotropy of the local structure of the pixel—edge regions, due to their concentrated structural orientation, have large eigenvalue differences and high coherence indices; flat regions, due to the lack of obvious structural orientation preference, have small eigenvalue differences and low coherence indices. Subsequently, the computer device normalizes the coherence index to a preset measurement range. In the generated anisotropy measurement map, the measurement value is positively correlated with the probability that the pixel is in an edge region, achieving a quantitative distinction between edge regions and flat regions. This quantitative representation allows subsequent processing to adjust strategies accordingly: during image decomposition, weak smoothing is applied to edge regions with large measurement values ​​to preserve details; strong smoothing is applied to flat regions with small measurement values ​​to filter noise; during reference sub-block selection, similarity is calculated based on a weighted average of measurement values, giving the structural features of edge regions a higher weight in similarity judgment, thus improving the matching accuracy of reference sub-blocks. This method solves the problem of accurately distinguishing edge regions from flat regions in traditional denoising. By using a quantized anisotropy measurement map, it provides an adaptive adjustment basis for the entire denoising process, ensuring a precise balance between "noise removal" and "detail preservation" during denoising, and significantly improving the visual effect and structural integrity of the denoised image.

[0012] In conjunction with some embodiments of the first aspect, in some embodiments, the infrared image is decomposed using an anisotropic metric map to obtain a fundamental frequency component image representing the main structure and a high-frequency component image representing detailed information. Specifically, this includes: constructing a weighted least squares energy function, which includes a data fidelity term and a smoothing constraint term; using the infrared image as input to the data fidelity term, and using the reciprocal of the metric value in the anisotropic metric map as the smoothing coefficient of the smoothing constraint term, such that the smoothing intensity is low in regions with large metric values ​​and high in regions with small metric values ​​in the anisotropic metric map; obtaining the fundamental frequency component image by minimizing the weighted least squares energy function; and calculating the difference between the infrared image and the fundamental frequency component image to obtain the high-frequency component image.

[0013] By adopting the above technical solution, the computer device uses the reciprocal of the metric value in the anisotropic metric map as the smoothing coefficient of the smoothing constraint term, forming an adaptive adjustment mechanism of "smaller smoothing force for larger metric values ​​and larger smoothing force for smaller metric values." For pixels with high metric values ​​and a high probability of being edge regions, weak smoothing can preserve key details such as edges and textures to the maximum extent, avoiding detail blurring caused by traditional uniform smoothing. For pixels with low metric values ​​and a high probability of being flat regions, strong smoothing can effectively suppress noise, reducing the burden on subsequent high-frequency component denoising. The fundamental frequency component image obtained by minimizing the weighted least squares energy function can accurately characterize the main structure of the infrared image and eliminate most of the noise interference in flat regions. The high-frequency component image obtained by the difference between the infrared image and the fundamental frequency component image concentrates the image's detailed information and residual noise, achieving efficient separation of "main structure and detailed noise." This component decomposition method solves the pain point of difficulty in effectively distinguishing details and noise in traditional image decomposition, allowing subsequent denoising operations to focus on high-frequency components, preserving useful details to the maximum extent while removing noise, and significantly improving the accuracy and effectiveness of the overall denoising process.

[0014] In conjunction with some embodiments of the first aspect, in some embodiments, within a preset search window, and in conjunction with an anisotropic metric map, target reference sub-blocks with structural feature similarity greater than a preset similarity threshold are selected for each target image sub-block. A target image sub-block represents any image sub-block, and a target reference sub-block represents a reference sub-block corresponding to the target image sub-block. Specifically, this includes: calculating the squared pixel difference between corresponding pixels of the target image sub-block and the candidate reference sub-block; obtaining the metric value corresponding to each pixel in the anisotropic metric map of the target image sub-block; using the metric value to perform a weighted summation of the squared pixel difference to obtain a weighted Euclidean distance; and determining the candidate reference sub-block as the target reference sub-block when the weighted Euclidean distance is less than a preset distance threshold.

[0015] By adopting the above technical solution, the reference sub-block selection scheme based on anisotropic metric maps achieves accurate determination of structural feature similarity through weighted Euclidean distance, effectively improving the matching quality of reference sub-blocks and providing core assurance for 3D block group construction and subsequent denoising effects. This method abandons the traditional similarity judgment method based on absolute pixel value differences. After calculating the squared pixel difference between the target image sub-block and the candidate reference sub-block, it introduces the metric values ​​in the anisotropic metric map for weighted summation. For edge region pixels with high metric values, they occupy a higher weight in the weighted calculation, making the similarity judgment more focused on the consistency of structural features; for flat region pixels with low metric values, the weight is lower, reducing the interference of noise in flat regions on the similarity judgment. When the weighted Euclidean distance is less than a preset distance threshold, the candidate reference sub-block is determined as the target reference sub-block, ensuring that the selected target reference sub-block is highly similar to the target image sub-block in terms of structural features, rather than just being close at the pixel value level. Compared to traditional screening methods, this approach effectively avoids mismatches caused by noise interference, ensuring that all sub-blocks in the 3D block group are distributed around the same structural feature. This allows subsequent singular value decomposition to more accurately separate small singular values ​​corresponding to noise from large singular values ​​corresponding to details, improving denoising efficiency and effectiveness. Simultaneously, the pre-defined search window ensures computational efficiency in the screening process, balancing matching accuracy and processing speed, making it suitable for scenarios such as real-time denoising of infrared images.

[0016] In conjunction with some embodiments of the first aspect, in some embodiments, the adaptive threshold is calculated based on the anisotropy metric map, specifically including: calculating the noise standard deviation of the high-frequency component image; constructing an inverse proportional function relationship, wherein the numerator of the inverse proportional function relationship is positively correlated with the noise standard deviation, and the denominator of the inverse proportional function relationship is positively correlated with the metric value in the anisotropy metric map; substituting the center metric value corresponding to the center pixel in the three-dimensional block group into the inverse proportional function relationship to calculate the adaptive threshold, so that the degree of singular value shrinkage in the edge region is less than the degree of singular value shrinkage in the flat region.

[0017] By employing the above technical solution, an inverse proportional function relationship related to the noise standard deviation and anisotropy metric is constructed, enabling accurate calculation of the adaptive threshold. This provides a differentiated basis for singular value soft thresholding and effectively balances the contradiction between noise removal and detail preservation. First, the computer calculates the noise standard deviation of the high-frequency component image, ensuring that the threshold calculation can adapt to infrared images with different noise intensities, enhancing the method's versatility. Then, the inverse proportional function relationship constructed by the computer ensures that the adaptive threshold is positively correlated with both the noise standard deviation and the anisotropy metric—when the noise standard deviation is large, the threshold is increased to more effectively suppress strong noise; when the noise standard deviation is small, the threshold is decreased to avoid excessive shrinkage leading to detail loss. Substituting the metric value of the center pixel of the 3D block group into the function to calculate the threshold results in a lower adaptive threshold for edge regions (height values), leading to less singular value shrinkage and thus preserving large singular values ​​corresponding to edge details; a higher adaptive threshold for flat regions (low metric values) leads to greater singular value shrinkage and more thorough removal of small singular values ​​corresponding to noise. This differentiated threshold shrinkage strategy solves the dilemma in traditional fixed threshold processing where "too high a threshold leads to loss of detail, while too low a threshold leads to residual noise." It allows singular value processing to accurately adapt to the characteristics of different regions, efficiently denoising in flat areas and focusing on preserving details in edge areas, thus improving the quality of denoised singular value sequences and providing key support for the clarity and integrity of subsequent 3D block reconstruction and denoised high-frequency component images.

[0018] In conjunction with some embodiments of the first aspect, in some embodiments, a three-dimensional block group is reconstructed based on the denoised singular value sequence to obtain a denoised image block, and the denoised image block is restored to a two-dimensional plane to obtain a denoised high-frequency component image. Specifically, this includes: performing an inverse transform of singular value decomposition on the denoised singular value sequence to obtain a denoised three-dimensional block group, which includes multiple denoised image blocks; restoring the denoised image blocks to a two-dimensional plane according to their position information in the infrared image; and when multiple denoised image blocks overlap and cover the target pixel position in the two-dimensional plane, performing a weighted average of the multiple pixel values ​​at the target pixel position to obtain the final target pixel value at the target pixel position in the denoised high-frequency component image.

[0019] By adopting the above technical solution, firstly, the computer equipment performs inverse singular value decomposition on the denoised singular value sequence to accurately reconstruct the denoised three-dimensional block group. Each denoised image block has completed noise removal while preserving structural details. Subsequently, the computer equipment restores each denoised image block to a two-dimensional plane according to its position information in the original infrared image, ensuring the accuracy of the image's spatial location. For the target pixel positions covered by multiple overlapping denoised image blocks in the two-dimensional plane, a weighted average processing is used to obtain the final pixel value. This processing method can effectively fuse the information of multiple denoised image blocks—the more overlapping a pixel position, the more stable its weighted average result, which can further suppress residual noise and avoid local distortion that may be caused by the restoration of a single image block. For non-overlapping areas, the pixel value of the corresponding denoised image block is directly used, ensuring the integrity of the detailed information. Compared with traditional non-overlapping block processing or simple stitching methods, this method effectively solves problems such as block artifacts and edge discontinuities. The restored denoised high-frequency component image not only has effectively removed noise but also has a coherent structure and clear details. After being fused with the fundamental frequency component image, it can output a denoised infrared image of higher overall quality.

[0020] In a second aspect, embodiments of this application provide a computer device comprising: one or more processors and a memory; the memory is coupled to the one or more processors and is used to store computer program code, the computer program code including computer instructions, wherein the one or more processors invoke the computer instructions to cause the computer device to perform the method described in the first aspect and any possible implementation thereof.

[0021] Thirdly, embodiments of this application provide a computer program product containing instructions that, when the computer program product is run on a computer device, cause the computer device to perform the method described in the first aspect and any possible implementation thereof.

[0022] Fourthly, embodiments of this application provide a computer-readable storage medium including instructions that, when executed on a computer device, cause the computer device to perform the method described in the first aspect and any possible implementation thereof.

[0023] It is understood that the computer device provided in the second aspect, the computer program product provided in the third aspect, and the computer storage medium provided in the fourth aspect are all used to execute the methods provided in the embodiments of this application. Therefore, the beneficial effects they can achieve can be referred to the beneficial effects in the corresponding methods, and will not be repeated here.

[0024] One or more technical solutions provided in the embodiments of this application have at least the following technical effects or advantages: 1. By adopting the above technical solution, firstly, the computer equipment constructs the structural tensor matrix corresponding to each pixel in the infrared image using horizontal and vertical pixel gradient matrices, accurately capturing the spatial structural features of the image pixels for subsequent differential processing. Subsequently, the computer equipment separates the fundamental frequency component and high-frequency component of the infrared image based on anisotropic metric maps, allowing the main structure and detailed information to be processed separately, avoiding the problems of detail loss or noise residue caused by the "one-size-fits-all" approach in traditional denoising methods. In high-frequency component processing, through steps such as overlapping block partitioning, structurally similar reference sub-block selection, three-dimensional block group singular value decomposition, and adaptive threshold shrinkage, high-frequency noise is efficiently filtered, while the integrity of detailed information is ensured through sub-block stacking and inverse transformation reconstruction. Finally, the computer equipment fuses the fundamental frequency component image with the denoised high-frequency component image, ensuring that the output image has both a clear main structure and retains key details such as edges and textures. From feature extraction to component separation, noise filtering, and image reconstruction, this method effectively solves the denoising problem caused by the intertwining of noise and detail information in infrared images through "precise denoising + detail preservation". It is suitable for scenarios with high image quality requirements, such as infrared monitoring and infrared imaging, and improves the practicality and reliability of the denoised image.

[0025] 2. By adopting the above technical solution, the computer equipment calculates the horizontal gradient squared map, the vertical gradient squared map, and the mixed gradient map, comprehensively capturing the gradient information of pixels in the horizontal, vertical, and intersecting directions, fully reflecting the spatial variation characteristics of pixels. Subsequently, the computer equipment uses a preset Gaussian kernel function to perform convolution smoothing on the three types of gradient maps, effectively filtering the random noise introduced during gradient calculation and avoiding the interference of noise on structural feature extraction, making the gradient components more closely match the real structure of the image. The structural tensor matrix constructed based on the smoothed three components can accurately represent the local structural attributes of each pixel, laying the foundation for obtaining reliable feature values ​​in subsequent feature decomposition. Compared with the method of directly using the original gradient information to construct the tensor matrix, this method enhances the saliency of structural features through gradient squared calculation and reduces noise interference through Gaussian smoothing. This makes the constructed structural tensor matrix not only highly noise-resistant but also accurately reflects the structural correlation of pixels, providing a core guarantee for the subsequent anisotropy measurement map to accurately distinguish edge regions from flat regions, indirectly improving the accuracy and stability of the entire denoising process. 3. By adopting the above technical solution, firstly, the computer device performs eigenvalue decomposition on the structural tensor matrix of each pixel to obtain the first and second eigenvalues. The coherence index is calculated based on the difference between the two eigenvalues, using the difference in eigenvalues ​​to reflect the anisotropy of the local structure of the pixel—edge regions, due to their concentrated structural orientation, have large eigenvalue differences and high coherence indices; flat regions, due to the lack of obvious structural orientation preference, have small eigenvalue differences and low coherence indices. Subsequently, the computer device normalizes the coherence index to a preset measurement range. In the generated anisotropy measurement map, the measurement value is positively correlated with the probability that the pixel is in an edge region, achieving quantitative differentiation between edge and flat regions. This quantitative representation allows subsequent processing to adjust strategies accordingly: during image decomposition, weak smoothing is applied to edge regions with large measurement values ​​to preserve details; strong smoothing is applied to flat regions with small measurement values ​​to filter noise; during reference sub-block selection, similarity is calculated based on a weighted average of measurement values, giving the structural features of edge regions a higher weight in similarity judgment and improving the matching accuracy of reference sub-blocks. This method solves the problem of accurately distinguishing edge regions from flat regions in traditional denoising. By using a quantized anisotropy measurement map, it provides an adaptive adjustment basis for the entire denoising process, ensuring a precise balance between "noise removal" and "detail preservation" during denoising, and significantly improving the visual effect and structural integrity of the denoised image. Attached Figure Description

[0026] Figure 1 This is a flowchart illustrating an infrared image denoising method in an embodiment of this application; Figure 2 This is a schematic diagram of the physical device structure of a computer device in an embodiment of this application. Detailed Implementation

[0027] The terminology used in the following embodiments of this application is for the purpose of describing particular embodiments only and is not intended to be limiting of this application. As used in the specification of this application, the singular expressions “a,” “an,” “the,” “the,” and “this” are intended to include the plural expressions as well, unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used in this application refers to any or all possible combinations including one or more of the listed items.

[0028] Hereinafter, the terms "first" and "second" are used for descriptive purposes only and should not be construed as implying or suggesting relative importance or implicitly indicating the number of indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature, and in the description of the embodiments of this application, unless otherwise stated, "multiple" means two or more.

[0029] The following describes the process of the method provided in this implementation. Please refer to [link / reference]. Figure 1 This is a flowchart illustrating an infrared image denoising method in an embodiment of this application.

[0030] S101. Obtain the pixel matrix of the infrared image. Based on the pixel matrix, calculate the horizontal pixel gradient matrix and the vertical pixel gradient matrix of the infrared image. The infrared image includes multiple pixels, and the pixel matrix includes the correspondence between pixels and pixel values. Infrared images represent image data acquired by infrared imaging devices, used to record the infrared radiation emitted by objects. A pixel matrix is ​​a two-dimensional array formed by arranging the pixel values ​​of each pixel in an infrared image according to their spatial position within the image. A pixel represents the smallest unit constituting an infrared image. Pixel values ​​represent the grayscale or intensity information corresponding to a pixel. The horizontal pixel gradient matrix represents the difference in values ​​between adjacent pixels in the horizontal direction of the infrared image. The vertical pixel gradient matrix represents the difference in values ​​between adjacent pixels in the vertical direction of the infrared image.

[0031] Specifically, first, the computer device converts the infrared image into a pixel matrix to record the spatial location and corresponding pixel value of each pixel. Then, the computer device calculates the first-order difference in the horizontal (right-left) and vertical (bottom-top) directions respectively, obtaining the horizontal pixel gradient matrix and the vertical pixel gradient matrix. These two gradient matrices reflect the local variation characteristics of the infrared image in different directions.

[0032] To give a concrete example, suppose we have a very small infrared image, with only 3x3 pixels. The human eye perceives the infrared image as having a bright (hot) top left corner, a dark (cold) bottom right corner, and a gray center. A computer converts this infrared image into a pixel matrix, as follows: ; 250 in the first row and first column (position (1,1)): corresponds to the bright spot in the upper left corner of the infrared image.

[0033] The 10 in the third row and third column (position (2,3)) corresponds to the dark spot in the lower right corner of the infrared image.

[0034] Calculate the horizontal pixel gradient matrix (horizontal gradient of the current pixel = pixel value to the right - current pixel value): ; Calculate the vertical pixel gradient matrix (vertical gradient of the current pixel = pixel value below - current pixel value): Gy= = .

[0035] S102. Based on the horizontal and vertical pixel gradient matrices, construct the structure tensor matrix corresponding to each pixel in the infrared image. According to the eigenvalue sequence of the structure tensor matrix, calculate the anisotropy measurement map of the infrared image. The anisotropy measurement map includes the correspondence between pixels and measurement values. Here, the structure tensor matrix represents a second-order symmetric matrix describing the local structural features of a pixel. The eigenvalue sequence refers to the eigenvalues ​​obtained by eigenvalue decomposition of the structure tensor matrix. The anisotropy metric map is used to quantify the directional features of the structure at each pixel in the infrared image. The metric value indicates the degree of anisotropy of the pixel's structural features.

[0036] Specifically, first, the computer device constructs a structure tensor matrix for each pixel based on the horizontal and vertical pixel gradient matrices. This structure tensor matrix contains the orientation and structural information of the local region of the pixel. Then, the computer device performs eigenvalue decomposition on each structure tensor matrix to obtain a sequence of eigenvalues. Based on the relationship between the eigenvalues, an anisotropy index is calculated, thereby generating an anisotropy metric map. In the anisotropy metric map, a larger metric value indicates a more significant structural feature at the pixel.

[0037] For each pixel in an infrared image, its structure tensor matrix is ​​a 2×2 symmetric matrix, defined by the formula: ; It should be noted that in actual algorithms, this matrix is ​​usually smoothed by Gaussian or weighted summation. For clarity, this example only calculates the instantaneous structure tensor at a single point and does not perform window smoothing.

[0038] Let's take the pixel at position (1,1) as an example for calculation: The horizontal gradient at this point is Gx = -70; the vertical gradient at this point is Gy = -100. Calculate matrix elements: ; ; ; Therefore, the structure tensor matrix of the pixel at position (1,1) is: .

[0039] Calculating eigenvalues: For each pixel's 2×2 structure tensor matrix, its two eigenvalues ​​need to be calculated, denoted as . (Larger) and (Smaller).

[0040] The formula for solving eigenvalues ​​is: ; Calculate the feature value of the pixel at position (1,1): 1 = 10000 2=0. (When λ2 is close to 0 and λ1 is large, it indicates that the pixel is located on a strong edge.) Calculating anisotropy measures: There are many common formulas for this calculation; here is a classic one: Or simply (To prevent the denominator from being 0, a minimum value is usually added); Calculate the metric value of the pixel at position (1,1): This means that the pixel at position (1,1) has a very strong directionality in the image (because it is on a rapidly changing slope).

[0041] By integrating the measurement values ​​of pixels at all locations, an anisotropic measurement map is obtained.

[0042] Optionally, in general, the structure tensor matrix corresponding to each pixel in the infrared image can be constructed based on the horizontal and vertical pixel gradient matrices in the following ways, without limitation: Calculate the square of each element in the horizontal pixel gradient matrix to obtain the horizontal gradient squared map; calculate the square of each element in the vertical pixel gradient matrix to obtain the vertical gradient squared map; calculate the product of corresponding elements of the horizontal and vertical pixel gradient matrices to obtain the mixed gradient map; use a preset Gaussian kernel function to perform convolution smoothing on the horizontal gradient squared map, the vertical gradient squared map, and the mixed gradient map respectively to obtain the smoothed horizontal component, the smoothed vertical component, and the smoothed mixed component; construct the structure tensor matrix corresponding to each pixel in the infrared image based on the smoothed horizontal component, the smoothed vertical component, and the smoothed mixed component.

[0043] First, the square of each element in the horizontal pixel gradient matrix is ​​calculated to obtain the horizontal gradient squared map. Then, the square of each element in the vertical pixel gradient matrix is ​​calculated to obtain the vertical gradient squared map. Finally, the product of corresponding elements in the horizontal and vertical pixel gradient matrices is calculated to obtain the mixed gradient map, which can better capture the directional change features of the image.

[0044] Secondly, the smoothing process using the Gaussian kernel function can reduce the interference of noise on structural feature extraction. Finally, by constructing a structure tensor matrix using the smoothed horizontal components, smoothed vertical components, and smoothed mixed components, the local structural properties of pixels can be accurately characterized.

[0045] Specifically, the processing procedure for computer equipment is as follows: (1) Calculate the square value of each element in the horizontal pixel gradient matrix to generate a horizontal gradient square map. This horizontal gradient square map highlights the strong gradient response in the horizontal direction.

[0046] (2) Calculate the square of each element in the vertical pixel gradient matrix in the same way to generate a vertical gradient squared map. This vertical gradient squared map highlights the strong gradient response in the vertical direction.

[0047] (3) Multiply the corresponding elements in the horizontal pixel gradient matrix and the vertical pixel gradient matrix to obtain the mixed gradient map. This mixed gradient map reflects the correlation between the gradients in the two directions.

[0048] (4) Select a Gaussian kernel function of appropriate size (such as 3×3 or 5×5) and perform two-dimensional convolution operations with the horizontal gradient squared map, the vertical gradient squared map, and the mixed gradient map, respectively. This local weighted averaging method can effectively suppress the random noise introduced during gradient calculation, making the structural features more stable and reliable.

[0049] (5) For each pixel in the infrared image, construct a 2×2 structure tensor matrix based on the values ​​of its corresponding position in the three smoothing components: The (1,1) element of the matrix represents the value of the smoothed horizontal component; The (2,2) element of the matrix represents the value of the smoothed vertical component; The elements (1,2) and (2,1) of the matrix are the values ​​of the smoothed mixed components.

[0050] The structure tensor matrix constructed in this way has the following characteristics: the eigenvalues ​​reflect the structural strength of the local region, the eigenvectors indicate the main direction of the local structure, and the trace reflects the overall gradient strength of the local region.

[0051] Optionally, in general, the anisotropy metric map of an infrared image can be calculated based on the eigenvalue sequence of the structure tensor matrix in the following way, without limitation: perform eigenvalue decomposition on the structure tensor matrix corresponding to each pixel in the infrared image to obtain the first eigenvalue and the second eigenvalue, where the first eigenvalue is greater than or equal to the second eigenvalue; calculate the coherence index based on the difference between the first eigenvalue and the second eigenvalue; normalize the coherence index to a preset metric value range to generate the anisotropy metric map, where the magnitude of the metric value is positively correlated with the probability that the pixel is located in the edge region.

[0052] This implementation is based on the following principle: the two eigenvalues ​​of the structure tensor matrix reflect the intensity of structural changes in different directions in a local region, and the degree of difference between the eigenvalues ​​can be used to measure the anisotropy of the region. In edge or textured regions, due to the presence of obvious directional structures, the two eigenvalues ​​differ significantly; while in flat regions, due to the uniform structure, the two eigenvalues ​​are close.

[0053] Specifically, the processing procedure for computer equipment is as follows: (1) Perform eigenvalue decomposition on the 2×2 structure tensor matrix corresponding to each pixel: Solving the characteristic equation yields two real eigenvalues. The larger eigenvalue is denoted as the first eigenvalue (λ1), and the smaller eigenvalue is denoted as the second eigenvalue (λ2). The magnitude of the eigenvalues ​​reflects the intensity of the change in the local structure along the corresponding eigenvector direction.

[0054] (2) The coherence index (C) is calculated based on the first and second eigenvalues. Commonly used calculation formulas include: Difference type: C = (λ1 - λ2); Ratio type: C=(λ1-λ2) / (λ1+λ2); Logarithmic form: C = log(1 + λ1 - λ2); These formulas can all reflect the degree of difference in eigenvalues, but they have different numerical characteristics.

[0055] (3) Normalize the calculated coherence index: Determine the preset measurement value range, usually [0, 1]. You can use methods such as maximum and minimum value normalization or sigmoid function to map the coherence index of all pixels to the preset measurement value range. The normalized measurement value has a clear probabilistic interpretation meaning.

[0056] The generated anisotropy measurement map has the following characteristics: In the edge region, the directionality of the structure is obvious, with λ1 being much larger than λ2, resulting in a larger metric value; In the textured region, the structural variation is moderate, λ1 is moderately larger than λ2, resulting in a moderate metric value; In flat regions, structural changes are slight, λ1 is close to λ2, resulting in a small metric value.

[0057] S103. The infrared image is decomposed using the anisotropy measurement map to obtain the fundamental frequency component image representing the main structure and the high frequency component image representing the detail information. The fundamental frequency component image represents the main structural information of the infrared image. The high frequency component image represents the image portion containing details and noise.

[0058] Specifically, the computer device uses anisotropic metric maps as adaptive weights to perform fundamental-high frequency decomposition on the infrared image. Weak decomposition is used in regions with significant structures such as edges (large metric values) to preserve details, while strong decomposition is used in flat regions (small metric values) to separate noise. Ultimately, the computer device obtains a fundamental frequency component image containing the main structure and a high frequency component image containing details and noise, laying the foundation for subsequent processing of different frequency components.

[0059] Optionally, in general, decomposing an infrared image using an anisotropy metric map to obtain a fundamental frequency component image representing the main structure and a high-frequency component image representing detailed information can be achieved in the following ways, without limitation: Construct a weighted least squares energy function, which includes a data fidelity term and a smoothing constraint term; use the infrared image as input to the data fidelity term, and use the reciprocal of the metric value in the anisotropy metric map as the smoothing coefficient of the smoothing constraint term, such that regions with large metric values ​​in the anisotropy metric map have weak smoothing, and regions with small metric values ​​have strong smoothing; obtain the fundamental frequency component image by minimizing the weighted least squares energy function; calculate the difference between the infrared image and the fundamental frequency component image to obtain the high-frequency component image.

[0060] The core idea of ​​this implementation method is to construct an energy function that includes a data fidelity term and a smoothing constraint term, and then adaptively adjust the smoothing intensity through an anisotropy metric map to achieve adaptive decomposition of the image structure. The data fidelity term ensures that the fundamental frequency component does not deviate excessively from the original image, while the smoothing constraint term adjusts the smoothing degree according to local structural features.

[0061] Specifically, the processing procedure for computer equipment is as follows: (1) Construct the weighted least squares energy function E(u): E(u) = Σ(uf)² + λΣw(x)(∇u)²; Where u represents the fundamental frequency component image to be determined, f represents the infrared image, λ is the global smoothing coefficient, w(x) is the local smoothing coefficient at position x, ∇u represents the gradient of u, the first term (uf)² is the data fidelity term, and the second term λw(x)(∇u)² is the smoothing constraint term.

[0062] (2) Set the smoothing coefficient: Obtain the metric value m(x) at each position x in the anisotropy metric plot, and calculate the smoothing coefficient w(x) = 1 / m(x). This setting ensures that: In the edge region (where m(x) is large), w(x) is small, and the smoothing effect is weak; In flat regions (where m(x) is small), w(x) is large, resulting in a strong smoothing effect.

[0063] (3) Minimize the energy function: The Euler-Lagrange equation is obtained by differentiating the energy function E(u). An iterative algorithm (such as the conjugate gradient method) is used to solve the equation. After the iteration converges, the fundamental frequency component image u is obtained. The minimization process ensures that the result achieves a balance between fidelity and smoothness.

[0064] (4) Obtaining high-frequency components: Subtract the fundamental frequency component u from the original infrared image f to obtain a high-frequency component image containing details and noise. This subtraction operation ensures the integrity of the components.

[0065] S104. Perform block division processing on the high-frequency component image to obtain several overlapping image sub-blocks; In this context, block partitioning refers to the process of dividing a high-frequency component image into multiple local image regions of a preset size. An image sub-block refers to a locally partitioned image region. Overlapping indicates that adjacent image sub-blocks share a common area.

[0066] Specifically, the computer equipment uses a sliding window approach to divide the high-frequency component image into blocks, with each sub-block typically set to 8×8 or 16×16 pixels. The overlapping area between adjacent sub-blocks is generally half the size of the sub-block; for example, for an 8×8 sub-block, the number of overlapping pixels in both the horizontal and vertical directions is 4. This overlapping division method avoids block artifacts and provides redundant information for subsequent reconstruction, improving denoising performance.

[0067] S105. Within the preset search window, combined with the anisotropy measurement map, target reference sub-blocks with structural feature similarity greater than a preset similarity threshold are selected for each target image sub-block. The target image sub-block represents any image sub-block, and the target reference sub-block represents the reference sub-block corresponding to the target image sub-block. The preset search window represents the local area within the image to search for similar blocks. Structural feature similarity is an indicator that measures the degree of similarity in structural features between two image sub-blocks. The preset similarity threshold represents the standard value for judging whether sub-blocks are similar. The target image sub-block refers to the image sub-block that needs to be processed. The target reference sub-block refers to other sub-blocks that have similar structural features to the target image sub-block.

[0068] This step is performed after block partitioning is complete. Specifically, for each target image sub-block, the computer searches for similar sub-blocks within a preset search window (e.g., 31×31 pixels) centered on that sub-block. When calculating the similarity between sub-blocks, the pixel differences at different locations are weighted using an anisotropy metric map, giving higher weight to differences in structurally salient regions. When the weighted structural feature similarity exceeds a preset threshold, the corresponding candidate sub-block is identified as the target reference sub-block. This structural feature-based similarity matching can find reference sub-blocks with truly similar structures.

[0069] Optionally, generally, within a preset search window, in combination with the anisotropic metric map, for each target image sub-block, a target reference sub-block with a structural feature similarity greater than a preset similarity threshold is screened. The target image sub-block represents any image sub-block, and the target reference sub-block represents the reference sub-block corresponding to the target image sub-block. This can be achieved in the following ways, which are not limited here: Calculate the square of the pixel difference between corresponding pixel points of the target image sub-block and the candidate reference sub-block; Obtain the metric values corresponding to each pixel point in the target image sub-block in the anisotropic metric map; Use the metric values to perform a weighted sum of the square of the pixel difference to obtain a weighted Euclidean distance; When the weighted Euclidean distance is less than a preset distance threshold, determine the candidate reference sub-block as the target reference sub-block.

[0070] Introducing the anisotropic metric map into the similarity calculation process makes the pixel differences in the structurally significant regions have higher weights, enabling more accurate identification of image blocks with similar structural features. This weighted strategy ensures that the matching process pays more attention to structural similarity rather than simple pixel value similarity.

[0071] Specifically, the processing process of the computer device is as follows: (1) Calculate the square of the pixel difference: Let the target image sub-block be B1 and the candidate reference sub-block be B2. For the pixel points at the corresponding positions (i, j) in the sub-blocks, calculate the square of the pixel difference: D(i, j) = [B1(i, j) - B2(i, j)]².

[0072] (2) Obtain the metric values: Extract the metric values of the corresponding region of the target sub-block from the anisotropic metric map, denoted as M(i, j), which represents the significance degree of the structural features at the position (i, j). The metric value reflects the importance of the pixel point in the structural features.

[0073] (3) Calculate the weighted Euclidean distance: Dist = Σ[M(i, j) × D(i, j)] / Σ[M(i, j)]; Among them, M(i, j) is used as the weight coefficient, D(i, j) is the square of the pixel difference, the summation range covers the entire sub-block area, and it is normalized by dividing by the sum of the weights.

[0074] (4) Judge the similarity: Compare the calculated weighted Euclidean distance dist with the preset distance threshold T. When dist < T, confirm the candidate block as the target reference sub-block. The preset distance threshold T is usually set according to the image noise level.

[0075] S106. Stack the image sub-blocks and the corresponding reference sub-blocks to construct a three-dimensional block group; In this context, an image sub-block and its corresponding reference sub-block represent a group of two-dimensional image sub-blocks with similar structural features. Stacking represents superimposing multiple groups of two-dimensional image sub-blocks in a third dimension. A three-dimensional block group refers to a three-dimensional data structure formed by stacking a target image sub-block and its multiple corresponding target reference sub-blocks.

[0076] Specifically, the computer device stacks each target image sub-block with all its corresponding target reference sub-blocks in the third-dimensional direction. For example, if a target image sub-block finds seven similar target reference sub-blocks, an 8×8×8 three-dimensional block group is formed (assuming the size of the image sub-block is 8×8). This stacking method organizes sub-blocks with similar structures together, providing a basis for subsequent denoising using the low-rank characteristics of the block group.

[0077] S107. Perform singular value decomposition on the three-dimensional block group to obtain a singular value sequence. Calculate an adaptive threshold based on the anisotropy metric map. Use the adaptive threshold to perform soft threshold shrinkage on the singular value sequence to obtain a denoised singular value sequence. Singular value decomposition (SVD) is a mathematical method that decomposes a three-dimensional data matrix into the product of three matrices. A singular value sequence is a sequence of singular values ​​obtained through decomposition arranged in descending order. Adaptive thresholding refers to a threshold parameter dynamically adjusted based on local image features. Soft thresholding shrinkage is an operation that non-linearly shrinks singular values ​​based on an adaptive threshold. A denoised singular value sequence represents the singular value sequence after soft thresholding shrinkage.

[0078] Specifically, first, the computer device performs matrix rearrangement and singular value decomposition on the 3D block group, obtaining a descending sequence of singular values. Larger singular values ​​typically correspond to structural information, while smaller singular values ​​mainly correspond to noise information. Then, based on the metric value of the block group's center pixel in the anisotropy metric map, the computer device constructs an inverse proportional function to calculate an adaptive threshold—the larger the metric value, the more significant the structural features, and the smaller the calculated adaptive threshold, thus retaining more singular values; the smaller the metric value, the larger the adaptive threshold, resulting in stronger shrinkage. Finally, the computer device uses the adaptive threshold to perform soft thresholding shrinkage on the singular value sequence, obtaining a denoised singular value sequence.

[0079] Optionally, in general, the adaptive threshold can be calculated based on the anisotropy metric map in the following ways, without limitation: calculate the noise standard deviation of the high-frequency component image; construct an inverse proportional function relationship, where the numerator of the inverse proportional function relationship is positively correlated with the noise standard deviation, and the denominator of the inverse proportional function relationship is positively correlated with the metric value in the anisotropy metric map; substitute the center metric value corresponding to the center pixel in the 3D block group into the inverse proportional function relationship to calculate the adaptive threshold, so that the degree of singular value shrinkage in the edge region is less than the degree of singular value shrinkage in the flat region.

[0080] The core idea behind this approach is to construct an inverse proportional function that makes the threshold dependent on both the image noise level and local structural features, thereby achieving adaptive adjustment of the shrinkage intensity across different regions. This design ensures that different shrinkage strategies are employed in different feature regions, effectively removing noise while preserving important structural details.

[0081] Specifically, the processing procedure for computer equipment is as follows: (1) Estimate the noise standard deviation: Robust statistical methods are applied to high-frequency component images. Commonly used methods include: MAD median absolute deviation estimation, wavelet coefficient statistical estimation, and local variance analysis (to obtain the noise standard deviation σ, which is used to determine the basic threshold level).

[0082] (2) Construct the inverse proportional function relationship: A typical function form could be: T(m) = c·σ / (1+α·m); Where T(m) is the adaptive threshold, c is the adjustment coefficient (usually >1), σ is the noise standard deviation, α is the metric weighting coefficient, and m is the central metric.

[0083] (3) Obtain the central metric: Locate the center pixel of the 3D block group and extract the corresponding measurement value from the anisotropic measurement map. This measurement value represents the structural feature intensity of the central region of the block group.

[0084] (4) Calculate the final adaptive threshold: Substituting the center metric into the inverse proportional function yields the adaptive threshold for that block group.

[0085] The adaptive threshold calculated in this way has the following characteristics: The stronger the noise (the larger the σ), the larger the threshold. The more significant the structure (the larger m is), the smaller the threshold.

[0086] Key parameter selection in practical applications: Adjustment coefficient c: controls the overall shrinkage intensity, usually in the range of [2, 4], and can be adjusted according to the desired degree of noise reduction; Weighting coefficient α: controls the degree of influence of the metric, usually taking a value in the range of [0.5, 2], and affects the strength of structural adaptability.

[0087] S108. Based on the denoised singular value sequence, reconstruct the three-dimensional block group to obtain the denoised image block, restore the denoised image block to the two-dimensional plane to obtain the denoised high-frequency component image. Here, reconstruction refers to the process of regenerating 3D data using a denoised singular value sequence. A denoised image patch is an image patch whose noise has been suppressed after reconstruction. Restoring to a 2D plane refers to the operation of putting the image patch in the 3D data back to its original position. A denoised high-frequency component image represents a high-frequency detail image after noise removal.

[0088] Specifically, first, the computer device performs the inverse operation of singular value decomposition using the denoised singular value sequence to reconstruct a denoised 3D block group. Then, the computer device restores each denoised image block in the denoised 3D block group to a 2D plane according to its original position. Because an overlapping strategy was used during block partitioning, each restored pixel position may be covered by multiple denoised image blocks. The computer device performs a weighted average of the pixel values ​​at these overlapping positions to finally obtain a complete denoised high-frequency component image.

[0089] Optionally, in general, reconstructing a 3D block group based on the denoised singular value sequence to obtain denoised image blocks, and restoring the denoised image blocks to a 2D plane to obtain a denoised high-frequency component image can be achieved in the following ways, without limitation: performing an inverse singular value decomposition transformation on the denoised singular value sequence to obtain a denoised 3D block group, which includes multiple denoised image blocks; restoring the denoised image blocks to a 2D plane according to their position information in the infrared image; when multiple denoised image blocks overlap and cover the target pixel position in the 2D plane, performing a weighted average of the multiple pixel values ​​at the target pixel position to obtain the final target pixel value at the target pixel position in the denoised high-frequency component image.

[0090] S109. The fundamental frequency component image is fused with the denoised high-frequency component image to obtain a denoised infrared image.

[0091] Here, fusion refers to the process of combining the fundamental frequency component image with the denoised high-frequency component image. The denoised infrared image refers to the final infrared image with noise suppressed.

[0092] Specifically, the computer device fuses the previously retained fundamental frequency component image (step S103) with the newly obtained denoised high-frequency component image. During fusion, the fundamental frequency component image typically has a larger weight (e.g., 0.7) to ensure the stability of the main structure, while the denoised high-frequency component image has a smaller weight (e.g., 0.3) to avoid introducing excessive detail fluctuations. The specific weight configuration can be set according to the actual situation and is not limited here. The computer device can also superimpose and fuse the fundamental frequency component image and the denoised high-frequency component image to obtain a denoised infrared image. This fusion strategy allows the computer device to ultimately obtain a denoised infrared image that retains a clear main structure while containing appropriate detail information.

[0093] By adopting the above technical solution, firstly, the computer equipment constructs a structural tensor matrix corresponding to each pixel in the infrared image using horizontal and vertical pixel gradient matrices, accurately capturing the spatial structural features of the image pixels for subsequent differential processing. Subsequently, the computer equipment separates the fundamental frequency component and high-frequency component of the infrared image based on anisotropic metric maps, allowing the main structure and detailed information to be processed separately, avoiding the problems of detail loss or noise residue caused by the "one-size-fits-all" approach in traditional denoising methods. In high-frequency component processing, through steps such as overlapping block partitioning, structurally similar reference sub-block selection, 3D block group singular value decomposition, and adaptive threshold shrinkage, high-frequency noise is efficiently filtered, while the integrity of detailed information is ensured through sub-block stacking and inverse transformation reconstruction. Finally, the computer equipment fuses the fundamental frequency component image with the denoised high-frequency component image, ensuring that the output image has both a clear main structure and retains key details such as edges and textures. From feature extraction to component separation, noise filtering, and image reconstruction, this method effectively solves the denoising problem caused by the intertwining of noise and detail information in infrared images through "precise denoising + detail preservation". It is suitable for scenarios with high image quality requirements, such as infrared monitoring and infrared imaging, and improves the practicality and reliability of the denoised image.

[0094] The computer device in the embodiments of this invention is described below from the perspective of hardware processing. Please refer to [link / reference needed]. Figure 2 This is a schematic diagram of the physical device structure of a computer device in an embodiment of this application.

[0095] It should be noted that, Figure 2 The structure of the computer device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of the present invention.

[0096] like Figure 2 As shown, the computer device includes a CPU 201, which can perform various appropriate actions and processes according to a program stored in the read-only memory ROM 202 or a program loaded from the storage section 208 into the random access memory RAM 203, such as performing the methods described in the above embodiments. The RAM 203 also stores various programs and data required for system operation. The CPU 201, ROM 202, and RAM 203 are interconnected via a bus 204. An I / O interface 205 is also connected to the bus 204.

[0097] The following components are connected to I / O interface 205: input section 206 including audio input devices, push-button switches, etc.; output section 207 including a liquid crystal display (LCD) and audio output devices, indicator lights, etc.; storage section 208 including a hard disk, etc.; and communication section 209 including a network interface card such as a LAN (Local Area Network) card, modem, etc. Communication section 209 performs communication processing via a network such as the Internet. Drive 210 is also connected to I / O interface 205 as needed. Removable media 211, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., are installed on drive 210 as needed so that computer programs read from them can be installed into storage section 208 as needed.

[0098] In particular, according to embodiments of the present invention, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of the present invention include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing computer programs for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 209, and / or installed from removable medium 211. When the computer program is executed by CPU 201, it performs the various functions defined in the present invention.

[0099] It should be noted that specific examples of computer-readable storage media may include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), flash memory, optical fiber, portable compact disc read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this invention, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.

[0100] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present invention. Each block in a flowchart or block diagram may represent a module, program segment, or portion of code, which contains one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those shown in the drawings.

[0101] Specifically, the computer device in this embodiment includes a processor and a memory. The memory stores a computer program, and when the computer program is executed by the processor, it implements the infrared image denoising method provided in the above embodiment.

[0102] In another aspect, the present invention also provides a computer-readable storage medium, which may be included in the computer device described in the above embodiments; or it may exist independently and not assembled into the computer device. The storage medium carries one or more computer programs that, when executed by a processor of the computer device, cause the computer device to implement the infrared image denoising method provided in the above embodiments.

[0103] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit it. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.

[0104] As used in the above embodiments, depending on the context, the term "when..." can be interpreted as meaning "if...", "after...", "in response to determining...", or "in response to detecting...". Similarly, depending on the context, the phrase "when determining..." or "if (the stated condition or event) is interpreted as meaning "if determining...", "in response to determining...", "when (the stated condition or event) is detected", or "in response to detecting (the stated condition or event)".

[0105] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. This program can be stored in a computer-readable storage medium, and when executed, it can include the processes described in the above method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as ROM or random access memory (RAM), magnetic disks, or optical disks.

Claims

1. A method for denoising infrared images, characterized in that, Applied to a computer device, the method includes: Obtain the pixel matrix of an infrared image, and calculate the horizontal pixel gradient matrix and the vertical pixel gradient matrix of the infrared image based on the pixel matrix. The infrared image includes multiple pixels, and the pixel matrix includes the correspondence between the pixels and the pixel values. Based on the horizontal pixel gradient matrix and the vertical pixel gradient matrix, a structure tensor matrix corresponding to each pixel in the infrared image is constructed. According to the eigenvalue sequence of the structure tensor matrix, an anisotropy metric map of the infrared image is calculated. The anisotropy metric map includes the correspondence between the pixel and the metric value. The infrared image is decomposed using the anisotropy measurement map to obtain a fundamental frequency component image representing the main structure and a high frequency component image representing detailed information. The high-frequency component image is divided into blocks to obtain several overlapping image sub-blocks; Within the preset search window, and in conjunction with the anisotropy measurement map, target reference sub-blocks with structural feature similarity greater than a preset similarity threshold are selected for each target image sub-block. The target image sub-block represents any image sub-block, and the target reference sub-block represents the reference sub-block corresponding to the target image sub-block. The image sub-blocks are stacked with the corresponding reference sub-blocks to construct a three-dimensional block group; Singular value decomposition is performed on the three-dimensional block group to obtain a singular value sequence. An adaptive threshold is calculated based on the anisotropy metric map. The singular value sequence is then subjected to soft threshold shrinkage using the adaptive threshold to obtain a denoised singular value sequence. Based on the denoised singular value sequence, the three-dimensional block group is reconstructed to obtain a denoised image block. The denoised image block is then restored to a two-dimensional plane to obtain a denoised high-frequency component image. The fundamental frequency component image is fused with the denoised high-frequency component image to obtain a denoised infrared image.

2. The method according to claim 1, characterized in that, The step of constructing the structure tensor matrix corresponding to each pixel in the infrared image based on the horizontal pixel gradient matrix and the vertical pixel gradient matrix specifically includes: The square of each element in the horizontal pixel gradient matrix is ​​calculated to obtain the horizontal gradient squared map; Calculate the square of each element in the vertical pixel gradient matrix to obtain the vertical gradient squared map; Calculate the product of the corresponding elements of the horizontal pixel gradient matrix and the vertical pixel gradient matrix to obtain the mixed gradient map; Using a preset Gaussian kernel function, the horizontal gradient squared map, the vertical gradient squared map, and the mixed gradient map are convolved and smoothed to obtain smoothed horizontal components, smoothed vertical components, and smoothed mixed components. Based on the smoothed horizontal component, the smoothed vertical component, and the smoothed mixed component, a structure tensor matrix corresponding to each pixel in the infrared image is constructed.

3. The method according to claim 2, characterized in that, The step of calculating the anisotropy measurement map of the infrared image based on the eigenvalue sequence of the structure tensor matrix specifically includes: Eigenvalues ​​are decomposed into first eigenvalues ​​and second eigenvalues ​​for the structure tensor matrix corresponding to each pixel in the infrared image, wherein the first eigenvalue is greater than or equal to the second eigenvalue. The coherence index is calculated based on the difference between the first feature value and the second feature value; The coherence index is normalized to a preset measurement range to generate the anisotropy measurement map. The magnitude of the measurement value is positively correlated with the probability that the pixel is in the edge region.

4. The method according to claim 3, characterized in that, The step of decomposing the infrared image using the anisotropy measurement map to obtain a fundamental frequency component image representing the main structure and a high-frequency component image representing detailed information specifically includes: Construct a weighted least squares energy function, which includes a data fidelity term and a smoothing constraint term; The infrared image is used as the input to the data fidelity term, and the reciprocal of the metric value in the anisotropy metric map is used as the smoothing coefficient of the smoothing constraint term, so that the smoothing force is small in the region with a large metric value in the anisotropy metric map and large in the region with a small metric value. The fundamental frequency component image is obtained by minimizing the weighted least squares energy function; The difference between the infrared image and the fundamental frequency component image is calculated to obtain the high frequency component image.

5. The method according to claim 1, characterized in that, Within a preset search window, and in conjunction with the anisotropy metric map, target reference sub-blocks with structural feature similarity greater than a preset similarity threshold are selected for each target image sub-block. The target image sub-block represents any image sub-block, and the target reference sub-block represents a reference sub-block corresponding to the target image sub-block. Specifically, this includes: Calculate the squared pixel difference between corresponding pixels in the target image sub-block and the candidate reference sub-block; Obtain the measurement value of each pixel in the target image sub-block corresponding to the anisotropy measurement map; The weighted Euclidean distance is obtained by weighted summation of the squared pixel differences using the metric value. When the weighted Euclidean distance is less than a preset distance threshold, the candidate reference sub-block is determined as the target reference sub-block.

6. The method according to claim 1, characterized in that, The step of calculating the adaptive threshold based on the anisotropy metric map specifically includes: Calculate the noise standard deviation of the high-frequency component image; Construct an inverse proportional function relationship, wherein the numerator of the inverse proportional function relationship is positively correlated with the noise standard deviation, and the denominator of the inverse proportional function relationship is positively correlated with the measurement value in the anisotropy measurement plot; The center metric value corresponding to the center pixel in the three-dimensional block group is substituted into the inverse proportional function relationship to calculate the adaptive threshold, so that the singular value shrinkage degree of the edge region is less than that of the flat region.

7. The method according to claim 1, characterized in that, The process of reconstructing the three-dimensional block group based on the denoised singular value sequence to obtain denoised image blocks, and restoring the denoised image blocks to a two-dimensional plane to obtain a denoised high-frequency component image, specifically includes: The denoised singular value sequence is subjected to an inverse transformation of singular value decomposition to obtain a denoised three-dimensional block group, which includes multiple denoised image blocks. According to the position information of the denoised image block in the infrared image, the denoised image block is restored to the two-dimensional plane; When multiple denoised image blocks overlap and cover the target pixel position in the two-dimensional plane, a weighted average is performed on the multiple pixel values ​​at the target pixel position to obtain the final target pixel value at the target pixel position in the denoised high-frequency component image.

8. A computer device, characterized in that, The computer device includes: one or more processors and a memory; the memory is coupled to the one or more processors, the memory is used to store computer program code, the computer program code including computer instructions, and the one or more processors call the computer instructions to cause the computer device to perform the method as described in any one of claims 1-7.

9. A computer-readable storage medium comprising instructions, characterized in that, When the instructions are executed on a computer device, the computer device performs the method as described in any one of claims 1-7.

10. A computer program product, characterized in that, When the computer program product is run on a computer device, the computer device performs the method as described in any one of claims 1-7.