Infrared image noise reduction edge enhancement method
By employing nonlocal mean filtering and multi-scale weighted adaptive edge enhancement, the contradiction between noise reduction and edge enhancement in infrared image processing is resolved. This achieves a balance between suppressing noise and preserving and enhancing edge details, thereby improving the visual quality of the image and the accuracy of edge detection.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-03-13
- Publication Date
- 2026-04-10
AI Technical Summary
In existing infrared image processing technologies, nonlocal mean filtering alone can only achieve noise reduction and preliminary preservation of details. Edge enhancement alone has weak noise resistance, and the two lack effective collaborative design, which inevitably leads to the blurring and loss of edges and details while reducing noise.
A nonlocal mean filtering method combined with a multi-scale weighted adaptive edge enhancement method is adopted. The nonlocal mean filtering process is used to reduce noise and preserve image details. Then, multi-scale weighted adaptive edge enhancement is performed to generate the final denoised and edge-enhanced image.
While effectively suppressing noise, it preserves the edge and texture details of infrared images to the maximum extent, avoids noise reduction blurring, improves the accuracy and clarity of edge detection, and adapts to edge structures of different sizes and degrees of blur.
Smart Images

Figure CN121837074A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of image processing technology, and in particular relates to a method for infrared image noise reduction and edge enhancement. Background Technology
[0002] Infrared imaging, with its unique advantages of not being limited by visible light conditions and being able to capture the thermal radiation information of targets, has been widely used in many important fields such as security monitoring, medical diagnosis, remote sensing, and industrial inspection. For example, in nighttime security monitoring, infrared images can clearly show the outline of targets; in the field of medical imaging, infrared thermal imaging can assist in the diagnosis of lesion areas; and in remote sensing, it can achieve accurate identification of surface features.
[0003] However, the acquisition of infrared images is susceptible to various factors such as imaging equipment performance, environmental interference, and thermal noise, inevitably introducing various types of noise, including Gaussian noise and salt-and-pepper noise. The presence of these noises not only degrades the visual quality of infrared images, causing blurring and loss of detail, but also severely interferes with the accuracy of subsequent critical tasks such as image analysis, target recognition, and feature extraction. Therefore, noise reduction processing of infrared images is one of the core preprocessing steps in its practical applications.
[0004] Meanwhile, the sharpness of image edges, as key features representing target contours and texture structures, directly determines the image's information-expressing ability. In traditional image processing techniques, there is often an irreconcilable contradiction between noise reduction and edge preservation / enhancement: to achieve ideal noise reduction, local filtering algorithms (such as Gaussian filtering, median filtering, etc.) are often used, but these algorithms rely solely on information from the local neighborhood of pixels, easily leading to blurring or even loss of image edges, textures, and other detailed structures; while single-scale edge detection algorithms (such as the traditional Sobel operator and Canny operator) can extract edge information, they have weak noise resistance and are prone to edge breakage and increased false edges under noise interference, and are difficult to adapt to edge structures of different sizes and degrees of blur.
[0005] To address the aforementioned contradictions, Nonlocal Mean Filtering (NLM) algorithms have emerged in related technologies. Its core idea is to utilize widely existing similar regions (non-local information) in an image for weighted averaging, thereby effectively preserving image details while removing noise. Unlike traditional local filters (such as Gaussian filtering and median filtering), which rely solely on the characteristics of local pixel neighborhoods, NLM, by mining globally similar structures, can better balance denoising effects and detail preservation. It excels in processing complex structures such as textures and edges, and is widely used in image denoising, super-resolution reconstruction, and image restoration. This algorithm has two main advantages: First, its strong detail preservation capability. By utilizing non-local similar regions, NLM can better preserve details such as edges and textures during denoising (traditional local filtering tends to blur these structures). For example, when processing grass textures, NLM finds multiple similar grass regions for weighted averaging, smoothing noise while preserving texture undulations. The second advantage is its wide adaptability; it performs well with Gaussian noise, salt-and-pepper noise, etc., and is particularly suitable for images with rich textures or repetitive structures (such as remote sensing images, medical images, and natural landscape photos).
[0006] However, in the current technology, when processing infrared images, either non-local mean filtering is used alone for noise reduction, or edge enhancement is performed alone. This inevitably causes the blurring and loss of edges and details while denoising the image, and it is impossible to achieve a good balance between preserving and enhancing edge details while denoising. Therefore, it is urgent to improve it. Summary of the Invention
[0007] The purpose of this invention is to solve the aforementioned technical problems in the prior art and to provide an infrared image noise reduction and edge enhancement method. This method aims to address the core contradiction in existing infrared image processing technologies, where using non-local mean filtering alone can only achieve noise reduction and preliminary detail preservation, while edge enhancement alone has weak noise resistance, and the two lack effective collaborative design.
[0008] To solve the above-mentioned technical problems, the present invention adopts the following technical solution:
[0009] An infrared image noise reduction and edge enhancement method includes the following steps:
[0010] S1. Perform nonlocal mean filtering on the noisy image to be processed to obtain a noise-reduced image that preserves details;
[0011] S2. Perform multi-scale weighted adaptive edge enhancement processing on the denoised and detail-preserving image to obtain the final denoised and edge-enhanced image.
[0012] Furthermore, the nonlocal mean filtering process in step S1 specifically includes the following steps:
[0013] S1.1 Set the parameters for the nonlocal mean filter, including the neighborhood window size, search window size, and smoothing parameter;
[0014] S1.2. Traverse each target pixel in the image to be processed. For each target pixel, determine multiple reference pixels within the search window range, and obtain the target neighborhood window centered on the target pixel and the reference neighborhood window centered on each reference pixel respectively.
[0015] S1.3 Calculate the squared Euclidean distance between the target neighborhood window and each reference neighborhood window as a similarity measure between them;
[0016] S1.4. Based on the squared Euclidean distance and smoothing parameters, calculate the weight corresponding to each reference neighborhood window, and normalize all weights so that the sum of all weights is 1.
[0017] S1.5. Based on the normalized weights, the pixel values of all reference pixels are weighted and averaged to obtain the denoised pixel value of the target pixel.
[0018] S1.6 After processing all target pixels, output a noise-reduced image that retains details.
[0019] Furthermore, the neighborhood window size is The search window size is , where a and b are positive integers, and the size of the neighborhood window and the size of the search window are both no less than 3×3 and no greater than the resolution of the image to be processed.
[0020] Furthermore, the value of the smoothing parameter is determined based on the noise level of the image to be processed; the higher the noise level, the larger the value of the smoothing parameter.
[0021] Furthermore, the formula for calculating the squared Euclidean distance in step S1.3 is as follows:
[0022] in, Index the target pixel. For reference pixel index, Indicates target pixels The target neighborhood window is centered. Indicated by reference pixel A reference neighborhood window centered on the center, Target neighborhood window pixels within, For reference neighborhood window Internal and The corresponding pixels, For pixels pixel values, For pixels The pixel value.
[0023] Furthermore, the formula for calculating the weights in step S1.4 is as follows:
[0024] in, These are the normalization coefficients, and h is the smoothing parameter. The squared Euclidean distance between the target neighborhood window and the reference neighborhood window.
[0025] Furthermore, the formula for calculating the denoised pixel value through weighted averaging in step S1.5 is as follows:
[0026] Among them, weight Normalization conditions must be met: ,and , These are the pixel values after noise reduction. This represents the noise pixel value.
[0027] Furthermore, the multi-scale weighted adaptive edge enhancement processing in step S2 specifically includes the following steps:
[0028] S2.1 Perform multi-scale Gaussian blur processing on the noise-reduced and detail-preserving image to generate multiple scale images with different degrees of blur.
[0029] S2.2 For each scale of the image, the Sobel operator is used to calculate the horizontal gradient and the vertical gradient respectively, and then the gradient magnitude is calculated based on the horizontal gradient and the vertical gradient to obtain the edge feature map corresponding to each scale.
[0030] S2.3. Based on the gradient magnitude of each pixel in each edge feature map, determine the adaptive weight corresponding to each pixel, and perform weighted fusion of edge feature maps corresponding to all scales according to the adaptive weight to obtain the fused edge feature map.
[0031] S2.4. Normalize the fused edge feature map to obtain the final denoised edge enhancement image.
[0032] Furthermore, the multi-scale Gaussian blurring process in step S2.1 specifically includes:
[0033] S2.1a. Generate multiple Gaussian kernels with different standard deviations, each kernel having a size of [missing value]. ,in This refers to the size of the Gaussian kernel.
[0034] S2.1b. Determine the Gaussian kernel radius and the neighborhood window range for convolution. The formula for calculating the Gaussian kernel radius is: , The radius of the Gaussian kernel;
[0035] S2.1c: Perform convolution operations on the noise-reduced and detail-preserving image using each Gaussian kernel to obtain a scaled image of the corresponding scale.
[0036] Furthermore, the formula for calculating the gradient magnitude in step S2.2 is as follows:
[0037] Where y is the pixel ordinate, x is the pixel abscissa, w is the width of the scaled image, gx is the horizontal gradient, which is the convolution sum of the scaled image and the horizontal operator, and gy is the vertical gradient, which is the convolution sum of the scaled image and the vertical operator.
[0038] Furthermore, the formula for calculating the adaptive weights in step S2.3 is as follows:
[0039] in, Let α be the gradient magnitude and α be the weight exponent.
[0040] Furthermore, the specific process of weighted fusion in step S2.3 is as follows:
[0041] S2.3a. Traverse all preset scales, and for each pixel i in the edge feature map at each preset scale, calculate the gradient magnitude of that pixel at the current scale. With corresponding adaptive weights The product;
[0042] S2.3b, Accumulated weighted gradient: ;
[0043] S2.3c, Accumulated Weights: .
[0044] Furthermore, the specific process of normalization in step S2.4 is as follows:
[0045] S2.4a. Determine the maximum value of the gradient magnitude after fusion, maxVal, for all pixels in the fused edge feature map;
[0046] S2.4b, for each pixel in the fused edge feature map, if If the result is non-zero, a weighted average is calculated to obtain the fused gradient magnitude. Then normalized to 0-255, This yields pixel values normalized to the grayscale range of 0-255. All normalized pixel values constitute the final noise-reduced edge-enhanced image.
[0047] The present invention, by adopting the above-described technical solution, has the following beneficial effects:
[0048] 1. This invention uses nonlocal mean filtering as the core of noise reduction. By mining similar regions in the global range of the image and performing weighted averaging, compared with traditional local filtering algorithms, it can effectively suppress various noises such as Gaussian noise and salt-and-pepper noise, while preserving key details such as edges and textures of infrared images to the maximum extent, thus avoiding the technical pain point that noise reduction inevitably leads to blurring.
[0049] 2. This invention generates images of different blur levels through multi-scale Gaussian blur processing and extracts multi-scale edge features by combining the Sobel operator. It can adapt to edge structures of different sizes and blur levels, effectively avoid the problems of increased false edges and edge breaks in single-scale edge detection, and improve the accuracy of edge detection in complex noise environments.
[0050] 3. This invention determines the fusion weights based on the adaptive pixel gradient magnitude. The larger the gradient magnitude (i.e. the more significant the edge), the greater the pixel weight. This can actively enhance the contribution of effective edges while suppressing the interference of noise regions, making the fused edge feature map clear and pure, and the edge enhancement effect more targeted. Attached Figure Description
[0051] The present invention will be further described below with reference to the accompanying drawings:
[0052] Figure 1 These are comparison diagrams showing the six embodiments of the present invention before and after processing.
[0053] Figure 2 The images shown are from the first embodiment of the present invention.
[0054] Figure 3 This is a noise-reduced image with preserved details after NLM processing, as shown in the first embodiment of the present invention.
[0055] Figure 4 This is a noise-reduced edge-enhanced image after NLM processing and edge enhancement processing in the first embodiment of the present invention.
[0056] Figure 5 The image shown is the original image of the second embodiment of the present invention.
[0057] Figure 6 This is a noise-reduced image with preserved details after NLM processing, as shown in the second embodiment of the present invention.
[0058] Figure 7 This is a noise-reduced edge-enhanced image after NLM processing and edge enhancement processing according to the second embodiment of the present invention.
[0059] Figure 8 The image shown is the original image of the third embodiment of the present invention.
[0060] Figure 9This is a noise-reduced image with preserved details after NLM processing, as shown in the third embodiment of the present invention.
[0061] Figure 10 This is a noise-reduced edge-enhanced image after NLM processing and edge enhancement processing according to the third embodiment of the present invention.
[0062] Figure 11 The image shown is the original image of the fourth embodiment of the present invention.
[0063] Figure 12 This is a noise-reduced image with preserved details after NLM processing, as shown in the fourth embodiment of the present invention.
[0064] Figure 13 This is a noise-reduced edge-enhanced image after NLM processing and edge enhancement processing according to the fourth embodiment of the present invention.
[0065] Figure 14 The image shown is the original image of the fifth embodiment of the present invention.
[0066] Figure 15 This is a noise-reduced image with preserved details after NLM processing, as shown in the fifth embodiment of the present invention.
[0067] Figure 16 This is a noise-reduced edge-enhanced image after NLM processing and edge enhancement processing according to the fifth embodiment of the present invention.
[0068] Figure 17 The image shown is the original image of the sixth embodiment of the present invention.
[0069] Figure 18 This is a noise-reduced image with preserved details after NLM processing, as shown in the sixth embodiment of the present invention.
[0070] Figure 19 This is a noise-reduced edge-enhanced image after NLM processing and edge enhancement processing according to the sixth embodiment of the present invention. Detailed Implementation
[0071] like Figures 1 to 19 As shown, this embodiment uses six sets of original images to be processed, and the resolution of the original images to be processed is 640×480 as an example.
[0072] The parameter settings for this embodiment are shown in the table below.
[0073]
[0074] This invention provides an infrared image noise reduction and edge enhancement method, which specifically includes two steps.
[0075] S1. Perform nonlocal mean filtering (NLM) on the noisy image to be processed to obtain a noise-reduced image that preserves details.
[0076] Natural images contain a large amount of redundant information (such as repetitive textures and similar structures), which is distributed in the image as "similar regions" (i.e., "non-local" characteristics). For example, the texture of grass and the bricks of a wall both contain multiple similar local regions. The core logic of NLM is: for each pixel to be processed in the image, it is not limited to its small neighborhood, but rather searches for all regions similar to that pixel's neighborhood in the entire image (or a larger search range). Then, it uses a weighted average of the pixel values at corresponding positions in these similar regions as the denoising result for that pixel. The weights are determined by the similarity between regions: the more similar the regions, the larger the weight.
[0077] The specific steps of the nonlocal mean filtering process in step S1 are as follows:
[0078] S1.1, Set the parameters for the non-local mean filter. The parameters include...
[0079] Neighborhood window size, neighborhood window size is , where 'a' is a positive integer, such as 3×3 or 5×5. The minimum value of the neighborhood window size is 3×3. If it is too small, it is difficult to represent the regional features. If it is too large, the computational load will increase. In this embodiment, the neighborhood window size is selected as 3×3.
[0080] Search window size, the search window size is b is a positive integer, such as 15×15 or 21×21. The search window is used to limit the range of similar windows to be found. If it is too small, similar areas will be missed, and if it is too large, the amount of computation will increase dramatically. The minimum value is 3×3 and the maximum value does not exceed the resolution of the image to be processed. In this embodiment, the search window size is selected as 7×7.
[0081] The smoothing parameter h is determined based on the noise level of the image to be processed. The higher the noise level, the larger the smoothing parameter h needs to be to enhance the noise reduction capability. In this embodiment, the smoothing parameter h is set to 7.
[0082] S1.2. Traverse each target pixel in the image to be processed. For each target pixel, determine multiple reference pixels within a 7×7 search window range, and obtain the target neighborhood window centered on the target pixel and the reference neighborhood window centered on each reference pixel.
[0083] S1.3. Calculate the squared Euclidean distance between the target neighborhood window and each reference neighborhood window using the squared Euclidean distance formula, as a measure of their similarity. The squared Euclidean distance formula is:
[0084]
[0085] in, Index the target pixel. For reference pixel index, Indicates target pixels The target neighborhood window is centered. Indicated by reference pixel A reference neighborhood window centered on the center, Target neighborhood window pixels within, For reference neighborhood window Internal and The corresponding pixels, For pixels pixel values, For pixels The pixel value.
[0086] S1.4. Based on the squared Euclidean distance and smoothing parameters, calculate the weight corresponding to each reference neighborhood window using a Gaussian function, and normalize all weights so that the sum of all weights is 1. The formula for calculating the weight is:
[0087]
[0088] in, is the normalization coefficient, and h is the smoothing parameter, which controls the rate at which the weights decay with distance. The smaller h is, the higher the weights can be assigned to only extremely similar windows; the larger h is, the more windows will be included in the calculation, but there is a possibility of blurred details. Let Euclidean distance be the squared Euclidean distance between the target neighborhood window and the reference neighborhood window. That is, the higher the similarity, the higher the weight. The larger.
[0089] S1.5. Based on the normalized weights, the pixel values of all reference pixels are weighted and averaged to obtain the denoised pixel value of the target pixel. The calculation formula is as follows:
[0090]
[0091] Among them, weight Normalization conditions must be met: ,and , These are the pixel values after noise reduction. This represents the noise pixel value.
[0092] S1.6 After processing all target pixels, output a noise-reduced image that retains details.
[0093] S2. Perform multi-scale weighted adaptive edge enhancement processing on the denoised and detail-preserving image. By extracting image edge features at multiple Gaussian scales and combining them with an adaptive weight fusion strategy, a more robust edge detection result is generated, resulting in the final denoised and edge-enhanced image.
[0094] Multi-scale weighted adaptive edge enhancement processing combines multi-scale feature extraction with adaptive weight fusion, balancing the sensitivity and noise resistance of edge detection. It is suitable for edge extraction tasks in complex scenes. Its core advantage lies in adapting to different sizes of edges with different levels of blur input and enhancing the contribution of effective edges through weighted adaptive enhancement, ultimately generating more robust edge images. Compared with single-scale edge detection, multi-scale fusion can effectively balance noise suppression and edge detail preservation, adapting to edge structures of different sizes and levels of blur.
[0095] Step S2, the multi-scale weighted adaptive edge enhancement processing, specifically includes the following steps:
[0096] S2.1 Perform multi-scale Gaussian blurring on the noise-reduced and detail-preserving image to generate multiple images at different scales with varying degrees of blurring; specifically including:
[0097] S2.1a. Generate five Gaussian kernels with different standard deviations, corresponding to standard deviations of 1.0, 2.0, 3.0, 4.0, and 5.0, respectively. The size of each Gaussian kernel is... ,in The size of the Gaussian kernel is 5×5 in this embodiment.
[0098] S2.1b. Determine the Gaussian kernel radius and the neighborhood window range for convolution. The formula for calculating the Gaussian kernel radius is: , Let be the radius of the Gaussian kernel.
[0099] S2.1c: Perform pixel-wise convolution operation on the noise-reduced and detail-preserving image output from step S1 using each Gaussian kernel. During the convolution process, the coordinates that exceed the image range are truncated to generate 5 sets of scale images with different degrees of blur.
[0100] The specific process is as follows:
[0101] Iterate through each pixel (x, y) in the image, where x is the x-coordinate and y is the y-coordinate, and then perform a process on that pixel. Convolution is performed on the neighborhood, and the neighborhood coordinates (yy, xx) are calculated using (y + dy, x + dx) (where dy, dx ranges from [-2, 2]), where xx is the horizontal coordinate of the neighborhood pixel, yy is the vertical coordinate of the neighborhood pixel, and dy, dx ranges from [...]. , Coordinates (yy, xx) outside the image range are truncated to the nearest edge. For example, yy < 0 is taken as 0, and yy ≥ image height is taken as image height - 1. The product of the neighboring pixel values and the corresponding Gaussian kernel weights is accumulated to obtain the convolution result. The convolution result is rounded and then stored. , The name of the convolution result array is given, and the Gaussian kernel memory is released to generate 5 sets of scale images with different levels of blur.
[0102] S2.2 For each scale of the image, the Sobel operator is used to convolve the 3×3 neighborhood of each pixel, and the horizontal gradient gx and the vertical gradient gy are calculated respectively.
[0103] The Sobel operator includes a horizontal operator kx and a vertical operator ky. kx is used to detect vertical edges, i.e., horizontal changes, and ky is used to detect horizontal edges, i.e., vertical changes. kx and ky use a 3×3 operator, with the following values:
[0104] kx[3][3]={{-1,0,1},{-2,0,2},{-1,0,1}};
[0105] ky[3][3]={{-1,-2,-1},{0,0,0},{1,2,1}}.
[0106] Then, the gradient magnitude is calculated based on the horizontal and vertical gradients. The formula for calculating the gradient magnitude is:
[0107]
[0108] Where y is the pixel ordinate, x is the pixel abscissa, w is the width of the scaled image, gx is the horizontal gradient, which is the convolution sum of the scaled image and the horizontal operator, and gy is the vertical gradient, which is the convolution sum of the scaled image and the vertical operator.
[0109] Finally, five sets of edge feature maps corresponding to different scales were obtained.
[0110] S2.3. Based on the gradient magnitude of each pixel in each edge feature map, determine the adaptive weight corresponding to each pixel, and perform weighted fusion of edge feature maps corresponding to all scales according to the adaptive weight to obtain the fused edge feature map.
[0111] Iterate through 5 preset scales, and for each pixel i (pixel index, with a value range from 0 to image height × image width - 1) in the edge feature map under each preset scale, calculate the adaptive weight of each pixel under the current scale. , Let α be the gradient magnitude and α be the weighting exponent, with a value of 1.5. The larger the gradient magnitude, the greater the weight, thus enhancing the contribution of salient edges.
[0112] Accumulated weighted gradient: .
[0113] Accumulated weighted sum: .
[0114] S2.4. Normalize the fused edge feature map to obtain the final denoised edge-enhanced image.
[0115] S2.4a. Determine the maximum value of the gradient magnitude after fusion, maxVal, for all pixels in the fused edge feature map;
[0116] S2.4b, for each pixel in the fused edge feature map, if Non-zero, through the formula A weighted average is calculated to obtain the fused gradient magnitude, which is then normalized to 0-255 and calculated using the formula. This yields pixel values normalized to the grayscale range of 0-255. All normalized pixel values constitute the final noise-reduced edge-enhanced image.
[0117] By comparison, the original image was significantly affected by noise, with blurred edges and details; after NLM processing, the image noise was effectively suppressed, while edges and details were preserved; the final image processed by this invention, on the basis of complete noise suppression, has significantly enhanced edge features and clearer detail expression, achieving the optimal balance between noise reduction and edge enhancement.
[0118] The above are merely specific embodiments of the present invention, but the technical features of the present invention are not limited thereto. Any simple changes, equivalent substitutions, or modifications made based on the present invention to solve essentially the same technical problems and achieve essentially the same technical effects are all covered within the protection scope of the present invention.
Claims
1. A method for denoising and enhancing edges in infrared images, characterized in that: The method comprises the following steps: S1, performing non-local mean filtering processing on a to-be-processed image containing noise to obtain a noise-reduced detail-preserved image; and S2, performing multi-scale weight adaptive edge enhancement processing on the noise-reduced detail-preserved image to obtain a final noise-reduced edge-enhanced image.
2. The infrared image denoising and edge enhancement method according to claim 1, characterized in that: The non-local mean filtering processing in step S1 specifically comprises the following steps: S1.1, setting parameters of non-local mean filtering, the parameters comprising a neighborhood window size, a search window size and a smoothing parameter; S1.2, traversing each target pixel in the to-be-processed image, for each target pixel, determining a plurality of reference pixels within the search window, and respectively acquiring a target neighborhood window centered on the target pixel and a reference neighborhood window centered on each reference pixel; S1.3, calculating a squared Euclidean distance between the target neighborhood window and each reference neighborhood window as a similarity measure therebetween; S1.4, according to the squared Euclidean distance and the smoothing parameter, calculating a weight corresponding to each reference neighborhood window, and performing normalization processing on all the weights so that the sum of all the weights is 1; S1.5, based on the normalized weights, performing weighted average on pixel values of all the reference pixels to obtain a denoised pixel value of the target pixel; S1.6, after the processing of all the target pixels is completed, outputting the noise-reduced detail-preserved image.
3. The method of claim 2, wherein: The neighborhood window size is , and the search window size is , wherein a and b are positive integers, and the neighborhood window size and the search window size are not less than 3x3 and not greater than the resolution of the image to be processed.
4. The method of claim 2, wherein the method further comprises: The value of the smoothing parameter is determined according to the noise level of the to-be-processed image, and the higher the noise level, the larger the value of the smoothing parameter.
5. The method of claim 2, wherein the method further comprises: The calculation formula of the squared Euclidean distance in step S1.3 is wherein, is the target pixel index, is the reference pixel index, denotes a target neighborhood window centered at the target pixel denotes a reference neighborhood window centered at the reference pixel denotes a pixel within the target neighborhood window denotes a pixel within the reference neighborhood window corresponding to denotes a pixel within the target neighborhood window corresponding to denotes a pixel within the reference neighborhood window corresponding to denotes a pixel value of the pixel denotes a pixel value of the pixel denotes a pixel value of the pixel denotes a pixel value of the pixel 6. The method of claim 2, wherein the method further comprises: The calculation formula of the weight in step S1.4 is wherein, is a normalization coefficient, h is the smoothing parameter, is the squared Euclidean distance between the target neighborhood window and the reference neighborhood window.
7. The method of claim 2, wherein the method further comprises: The calculation formula of the de-noised pixel value obtained by weighted average in step S1.5 is wherein the weight needs to satisfy the normalization condition: , and , is the de-noised pixel value, is the noise pixel value.
8. The infrared image denoising and edge enhancement method of claim 1, wherein: The multi-scale weight adaptive edge enhancement processing in step S2 specifically comprises the following steps: S2.1, performing multi-scale Gaussian blur processing on the noise-reduced detail-preserved image to generate a plurality of scale images with different blur degrees; S2.2, for each scale image, using a Sobel operator to respectively calculate a horizontal direction gradient and a vertical direction gradient, and then based on the horizontal direction gradient and the vertical direction gradient, calculating a gradient amplitude to obtain an edge feature map corresponding to each scale; S2.3, based on the gradient amplitude of each pixel in each edge feature map, determining an adaptive weight corresponding to each pixel, and performing weighted fusion on the edge feature maps corresponding to all the scales according to the adaptive weights to obtain a fused edge feature map; S2.4, performing normalization processing on the fused edge feature map to obtain a final noise-reduced edge-enhanced image.
9. The method of claim 8, wherein: The multi-scale Gaussian blur processing in step S2.1 specifically includes S2.1a, generating a plurality of Gaussian kernels with different standard deviations, each Gaussian kernel having a size of wherein is the size of the Gaussian kernel; S2.1b, confirming a Gaussian kernel radius to determine a neighborhood window range during convolution, and the Gaussian kernel radius is calculated according to , is the Gaussian kernel radius; and S2.1c, performing convolution operation on the noise-reduced detail image by using each Gaussian kernel to obtain a scale image corresponding to a scale.
10. The method of claim 8, wherein: The calculation formula of the gradient amplitude in step S2.2 is where y is the vertical coordinate of a pixel, x is the horizontal coordinate of a pixel, w is the width of the scale image, gx is the horizontal direction gradient, which is the convolution sum of the scale image and the horizontal direction operator, and gy is the vertical direction gradient, which is the convolution sum of the scale image and the vertical direction operator.
11. The method of claim 8, wherein: The calculation formula of the adaptive weight in step S2.3 is wherein, is the gradient amplitude, and a is the weight exponent.
12. The method of claim 8, wherein: The specific process of the weighted fusion in step S2.3 is S2.3a, traversing all preset scales, for each pixel i in the edge feature map at each preset scale, calculating the gradient amplitude of the pixel at the current scale the product of the corresponding adaptive weight S2.3b, accumulated weighted gradients: ; S2.3c, accumulated weight and: .
13. The method of claim 12, wherein: The specific process of the normalization processing in step S2.4 is S2.4a, determining a maximum fused gradient amplitude maxVal of all pixels in the fused edge feature map; S2.4b, for each pixel in the fused edge feature map, if non-zero, then a weighted average calculation is performed to obtain the fused gradient magnitude, ; then normalized to 0-255, , to obtain the pixel value normalized to the 0-255 gray scale range, and all the normalized pixel values constitute the final denoised edge enhancement image.
Citation Information
Patent Citations
Marine phytoplankton image edge detection method based on non-local mean denoising mode
CN119722720A
Image enhancement method and device and electronic equipment
CN120689213A
Image quality optimization method based on multi-scale feature decoupling and dynamic fusion
CN121527577A