An adaptive edge-preserving denoising method based on anisotropic diffusion model
By introducing bilateral filtering, local variance and regularization terms into the anisotropic diffusion model, the adaptive image denoising algorithm is improved, and the problems of "cube effect" and details smoothing in the image denoising process are solved, achieving better edge preservation and denoising effects.
Patent Information
- Application Number
- CN202111308284.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-05
- Publication Date
- 2025-03-28
- Estimated Expiration
- 2041-11-05
AI Technical Summary
The existing anisotropic diffusion model can easily lead to "cube effect" in the denoising process, and it is difficult to diffuse quickly in areas with obvious and inconspicuous features, resulting in the smoothing of details or the inability to effectively denoise.
An adaptive image denoising algorithm based on the combination of fractional differential operators and Gaussian curvature is improved, bilateral filtering and local variance are added, and regularization terms are introduced in the diffusion model to build an adaptive edge-keeping denoising algorithm model.
It improves the image edge retention effect, enhances noise denoising and fidelity, can better control the diffusion speed, and is suitable for processing natural images and medical images.
Smart Images

Figure CN114022384B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of image processing, and in particular to an adaptive edge-preserving denoising method based on an anisotropic diffusion model. Background Art
[0002] In image processing, anisotropic diffusion models have always attracted attention. The concept of diffusion mainly comes from multi-scale description. A high-resolution image can be obtained by convolving the original image with a Gaussian kernel to obtain a low-resolution image. This description can be regarded as an isotropic heat conduction equation in theory. Perona and Malik first proposed the anisotropic diffusion model (PM model). The anisotropic diffusion model can adaptively select the diffusion direction during the diffusion process. This feature ensures that smoothness within a region takes precedence over smoothness between regions. However, the anisotropic diffusion model has the characteristic that the diffusion speed of smooth regions is faster than that of non-smooth regions, which makes it easy for the image to have a "block effect". The fourth-order partial differential equation can overcome this challenge. This method uses the Laplace operator in the energy function to determine whether the image is a plane in its neighborhood by calculating whether the operator is zero. The partial differential equation approximates the segmented plane image to the observed image to remove noise and retain edges, but the disadvantage of this method is that it makes spots stand out.
[0003] In practical applications, the diffusion function of the PM model cannot converge quickly for areas with obvious features, which causes these details to be smoothed. In addition, it cannot diffuse quickly in areas without obvious features. In response to this problem, researchers have tried to add local variance or local entropy to the diffusion coefficient to improve the protection of edge details by the PM model, or to combine the shearlet transform (NSST) with the anisotropic diffusion model. Although these methods have certain effects, they still need to be improved. Therefore, the present invention proposes an adaptive edge-preserving denoising method based on the anisotropic diffusion model to solve the problems existing in the prior art. Summary of the invention
[0004] In view of the above problems, the purpose of the present invention is to propose an adaptive edge-preserving denoising method based on an anisotropic diffusion model, which improves the diffusion coefficient of an adaptive image denoising algorithm based on a combination of a fractional differential operator and a Gaussian curvature, adds bilateral filtering and local variance, utilizes the characteristics of bilateral filtering and local variance, and adds regularization terms to achieve better image denoising and edge-preserving effects.
[0005] In order to achieve the purpose of the present invention, the present invention is implemented by the following technical scheme: an adaptive edge-preserving denoising method based on anisotropic diffusion model, comprising the following steps:
[0006] Step 1
[0007] First, read the original noise image to be denoised, and then perform Gaussian filtering on the noise image to obtain a preprocessed image;
[0008] Step 2
[0009] On the basis of the anisotropic diffusion model, Gaussian curvature is introduced into the adaptive image denoising algorithm model, and edge detection is performed by image gradient. Then, the properties of Gaussian curvature and fractional differential operator are combined, and fractional differential operator is established by the local variance of the image. Regularization terms are added to construct an adaptive edge-preserving denoising algorithm model:
[0010]
[0011] Among them, I0 is the original image, I1 is the image processed by Gaussian filtering on I0, t is the diffusion scale, div and They represent the divergence operator and the gradient operator respectively, and λ is a parameter used to control the fidelity of the denoised image I and the preprocessed image I1;
[0012] Step 3
[0013] Set the number of iterations and parameters in the model;
[0014] Step 4
[0015] The noisy image is iteratively calculated according to the adaptive edge-preserving denoising algorithm model to obtain the image iteration result. The result of each iteration is the denoising result of this time.
[0016] A further improvement is that in step 4, in each iteration, the eight-directional gradient is calculated first, then the Gaussian curvature is calculated, then the local variance is calculated, and then the bilateral filter function is called, and the above calculation results are substituted into the diffusion function to obtain the diffusion coefficient, and the diffusion coefficient is substituted into the eight-directional discrete iteration formula. The eight-directional discrete iteration formula is:
[0017]
[0018] Add the regularization term obtained by subtracting the result of the previous iteration from the preprocessed image to get the result of this iteration.
[0019] A further improvement is that the diffusion coefficient is:
[0020]
[0021] Among them, B F is the bilateral filter operator used to protect the edge, v is the local variance, m is the Gaussian curvature, and k is the adaptive threshold.
[0022] A further improvement is that the Gaussian kernel function is replaced by bilateral filtering in the diffusion coefficient, and local variance is added to ensure the smoothness of the image and maintain texture details.
[0023] A further improvement is that the threshold value of each pixel value in the diffusion coefficient is expressed as:
[0024]
[0025] In the formula, is the gradient value, and the threshold k increases as the gradient increases.
[0026] Further improvement is: when the gradient value When g(x)→0 is higher than the threshold k, the diffusion process stops.
[0027] A further improvement is that in step 4, after the image is denoised, the peak signal-to-noise ratio, structural similarity and root mean square error of the image and the real image are calculated and compared to prove the denoising effect.
[0028] The beneficial effects of the present invention are as follows: the present invention improves the diffusion coefficient of the adaptive image denoising algorithm based on the combination of fractional differential operator and Gaussian curvature, adds bilateral filtering and local variance, introduces regularization term in the diffusion model, and improves the effect of image edge preservation. The diffusion coefficient of the adaptive image denoising algorithm model is corrected, so that the denoising and edge preservation effects are better, and the visual effect of the image is improved; the diffusion coefficient is adjusted by using local variance to better control the diffusion speed; the addition of regularization term improves the image fidelity, and the use of adaptive threshold, except for natural images, is also superior to traditional image processing methods in processing medical images. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0030] Figure 1 is a flow chart of the method of the present invention;
[0031] Figure 2 is a comparison chart of experimental results of Example 2 of the present invention;
[0032] Figure 3 is a comparison chart of experimental results of Example 3 of the present invention;
[0033] Figure 4 is a comparison chart of experimental results of Example 3 of the present invention;
[0034] Figure 5 4 is a comparison chart of experimental results of Example 4 of the present invention. DETAILED DESCRIPTION
[0035] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0036] In the description of the present invention, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc., indicating the orientation or positional relationship, are based on the orientation or positional relationship shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the present invention. In addition, the terms "first", "second", "third", "fourth", etc. are only used for descriptive purposes and cannot be understood as indicating or implying relative importance.
[0037] In the description of the present invention, it should be noted that, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0038] Embodiment 1
[0039] See also Figure 1 This embodiment provides an adaptive edge-preserving denoising method based on an anisotropic diffusion model, comprising the following steps:
[0040] Step 1
[0041] First, read the original noise image to be denoised, and then perform Gaussian filtering on the noise image to obtain a preprocessed image;
[0042] Step 2
[0043] On the basis of the anisotropic diffusion model, Gaussian curvature is introduced into the adaptive image denoising algorithm model, and edge detection is performed by image gradient. Then, the properties of Gaussian curvature and fractional differential operator are combined, and fractional differential operator is established by the local variance of the image. Regularization terms are added to construct an adaptive edge-preserving denoising algorithm model:
[0044]
[0045] Among them, I0 is the original image, I1 is the image processed by Gaussian filtering on I0, t is the diffusion scale, div and They represent the divergence operator and the gradient operator respectively, and λ is a parameter used to control the fidelity of the denoised image I and the preprocessed image I1;
[0046] Step 3
[0047] Set the number of iterations and parameters in the model;
[0048] Step 4
[0049] According to the adaptive edge-preserving denoising algorithm model, the noisy image is iteratively calculated to obtain the image iteration result. The result of each iteration is the denoising result of this time. After the image is denoised, its peak signal-to-noise ratio, structural similarity and root mean square error with the real image (groundtruth) are calculated and compared to prove the denoising effect. In each iteration, the eight-directional gradient is calculated first, then the Gaussian curvature is calculated, and then the local variance is calculated. Then the bilateral filter function is called, and the above calculation results are substituted into the diffusion function to obtain the diffusion coefficient. The diffusion coefficient is substituted into the eight-directional discrete iteration formula. The eight-directional discrete iteration formula is:
[0050]
[0051] Add the regularization term obtained by subtracting the result of the previous iteration from the preprocessed image to obtain the result of this iteration, and the diffusion coefficient is:
[0052]
[0053] Among them, B F is a bilateral filter operator for edge protection, v is the local variance, m is the Gaussian curvature, k is the adaptive threshold, bilateral filtering is used to replace the Gaussian kernel function in the diffusion coefficient, and the local variance is added to ensure the smoothness of the image and maintain texture details. The threshold value of each pixel value in the diffusion coefficient is expressed as:
[0054]
[0055] In the formula, is the gradient value, the threshold k increases as the gradient increases. When g(x)→0 is higher than the threshold k, the diffusion process stops.
[0056] Embodiment 2
[0057] See also Figure 2 , the denoising experiments were conducted on the grayscale images of "Lena", "Photographer" and "Village" with Gaussian noise σ=0.001 and multiplicative noise σ=0.005. The method of the present invention was compared with several other methods in the experiment, and the results are shown in Table 1. The parameter settings are as follows: the number of iterations is 20, the threshold k0 is 8, t=1 / 7, λ=0.01, β=1.5.
[0058] Table 1 Comparison of grayscale image denoising results under various indicators using different denoising methods
[0059] method PSNR SSIM RMSE PM 30.1910 0.8247 0.0246 LEPM 27.7090 0.7866 0.0336 DEPS 30.2095 0.8248 0.0245 FDOGC 27.7117 0.7865 0.0464 Proposed 31.1550 0.8472 0.0216
[0060] The grayscale images of “Lena”, “Photographer” and “Village” are 512*512, 256*256 and 700*700 respectively. Gaussian noise and multiplicative noise with variances of 0.001 and 0.005 are added to these images. During the experiment, λ and β are fixed values.
[0061] Comparing PM, LEPM, DEPS, FDOGC and the method of the present invention, the images from PM, LEPM, DEPS and FDOGC are almost free of noise points and smooth, without clear texture and structural information. The PM model only considers the change of gradient. The LEPM and DEPS methods introduce variance and local entropy respectively, but cannot effectively adjust the change of diffusion coefficient. It can be seen from the results that when the parameters are kept consistent, the efficiency of both methods is not as good as the PM model. The FDOGC method uses variance and Gaussian filtering, but the effect is not improved. The Gaussian kernel function only cares about the spatial position of the image, but its performance in protecting image details is not as good as bilateral filtering. It can be clearly seen from the detail map that the image generated by the method of the present invention has clear edges, is closest to the noise-free image, and can clearly identify corners, sharp points, narrow edges and textures in the image. From the "village" image, the results of other methods cannot clearly distinguish the boundaries between bricks on the wall, and the shape of the car can only be vaguely identified, and the effect is far inferior to the method of the present invention.
[0062] See also Figure 3 , the denoising experiments were conducted on the color images of "flower", "landscape" and "tulip" with Gaussian noise σ=0.001 and multiplicative noise σ=0.005. The method of the present invention was compared with several other methods in the experiments, and the results are shown in Table 2. The parameter settings are as follows: the number of iterations is 20, the threshold k0 is 8, t=1 / 7, λ=0.01, β=1.5.
[0063] Table 2 Comparison of the results of color images using different denoising methods under various indicators
[0064] method PSNR SSIM RMSE PM 31.9112 0.9230 0.0263 LEPM 30.6955 0.8970 0.0311 DEPS 31.9161 0.9230 0.0263 FDOGC 30.6891 0.8970 0.0312 Proposed 33.0638 0.9345 0.0228
[0065] The size of the "flower" and "landscape" pictures is 700*700, and the size of the "tulip" picture is 800*1200. The color image contains three channels. In each iteration, the method of the present invention is performed on each channel respectively. Finally, the pixel values obtained from the three channels are superimposed to obtain the denoised image of this iteration. The type and intensity of the added noise are consistent with those of the grayscale image.
[0066] Figure 3 The results of processing color images are shown. In terms of image visual effects, the method of the present invention has better denoising and edge preservation effects than other methods. In the "flower" image, the method of the present invention best preserves the texture details, and the generated image is the only image that can determine the flower stem, and the boundary between the flower and the background is visible; from the noise-free image, each layer in the "landscape" picture has a clear boundary, but the results produced by other methods are far inferior to the present invention; the results of these five methods are not much different from the "tulip" in the macro image, but when the part is magnified, the boundaries in the picture processed by the method of the present invention are more obvious. By comparison Figure 2 It can be seen from various criteria that in color images, the method of the present invention outperforms grayscale images, and these images have higher fidelity and structural similarity.
[0067] Embodiment 3
[0068] See also Figure 4 In order to verify the effectiveness of the method of the present invention in processing medical images, noisy grayscale nuclear magnetic images with Gaussian noise σ=0.001 and multiplicative noise σ=0.005 were selected for experiments, and the image size was 256*256. The method of the present invention was compared with several other methods in the experiment, and the results are shown in Table 3 below.
[0069] Table 3 Comparison of results of different denoising methods for MRI images under various indicators
[0070] method PSNR SSIM RMSE PM 27.8698 0.6919 0.0234 LEPM 27.5688 0.6765 0.0242 DEPS 27.7713 0.6919 0.0236 FDOGC 27.4868 0.7254 0.0244 Proposed 27.9732 0.7320 0.0231
[0071] It can be seen from the experimental result images that, in the edge part, the method of the present invention has the best edge preservation compared with the other four methods; in the flat area, the method of the present invention has the best denoising effect compared with the other methods, which can also be verified from the data indicators.
[0072] By comparing the image results and data results of grayscale images, color images and medical images, it can be concluded that the PM model and its improved model are better at denoising and edge preservation for natural images than for medical images. At the same time, the improved algorithm based on the FDOGC model also performs best among these denoising algorithms.
[0073] Embodiment 4
[0074] See also Figure 5 In order to verify the effectiveness of the innovation, ablation experiments were conducted on the "photographer" image, "flower" image and "landscape" image at the same time. The parameters in each group of experiments were kept consistent. Each column of images represents (1) a noisy image; (2) the processing result of the model adding an adaptive threshold; (3) the processing result of the model adding an adaptive threshold and bilateral filtering; (4) the processing result of the model adding an adaptive threshold, bilateral filtering and local variance; (5) the processing result of the model adding an adaptive threshold, bilateral filtering, local variance and regularization term (i.e., the method of the present invention).
[0075] from Figure 5 It can be seen from the data that with each additional innovation, the experimental data is improved. This shows that the innovations of the model proposed in the present invention play a role in the final results of the experiment.
[0076] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. An adaptive edge-preserving denoising method based on anisotropic diffusion model, characterized by: The following steps are involved: Step 1 First, read the original noise image to be denoised, and then perform Gaussian filtering on the noise image to obtain a preprocessed image; Step 2 On the basis of the anisotropic diffusion model, Gaussian curvature is introduced into the adaptive image denoising algorithm model, and edge detection is performed by image gradient. Then, the properties of Gaussian curvature and fractional differential operator are combined, and fractional differential operator is established by the local variance of the image. Regularization terms are added to construct an adaptive edge-preserving denoising algorithm model: ; in, is the original image, For The image processed by Gaussian filtering is is the diffusion scale, and denote the divergence operator and the gradient operator respectively, is a parameter used to control the denoised image And preprocess the image Fidelity; Step 3 Set the number of iterations and parameters in the model; Step 4 According to the adaptive edge-preserving denoising algorithm model, the noisy image is iteratively calculated to obtain the image iteration result. The result of each iteration is the denoising result of this time. In each iteration, the eight-directional gradient is calculated first, then the Gaussian curvature is calculated, and then the local variance is calculated. Then the bilateral filter function is called, and the above calculation results are substituted into the diffusion function to obtain the diffusion coefficient. The diffusion coefficient is substituted into the eight-directional discrete iteration formula. The eight-directional discrete iteration formula is: ; Add the regularization term obtained by subtracting the last iteration result from the preprocessed image to obtain the result of this iteration. The diffusion coefficient is: ; in, is the bilateral filter operator used to protect the edge, is the local variance, is the Gaussian curvature, is the adaptive threshold.
2. The adaptive edge-preserving denoising method based on anisotropic diffusion model according to claim 1, characterized in that: The diffusion coefficient adopts bilateral filtering to replace the Gaussian kernel function, and adds local variance to ensure the smoothness of the image and maintain texture details.
3. The adaptive edge-preserving denoising method based on anisotropic diffusion model according to claim 1, characterized in that: The threshold value of each pixel value in the diffusion coefficient is expressed as: ; In the formula, is the gradient value, the threshold It increases with the increase of gradient.
4. The adaptive edge-preserving denoising method based on anisotropic diffusion model according to claim 3 is characterized in that: When the gradient value Above threshold , , the diffusion process stops.
5. The adaptive edge-preserving denoising method based on anisotropic diffusion model according to claim 1, characterized in that: In the step 4, after the image is denoised, the peak signal-to-noise ratio, structural similarity and root mean square error of the image and the real image are calculated and compared to prove the denoising effect.
Citation Information
Patent Citations
Four-order partial differential equation-based image denoising method
CN107067372A
Anisotropic image denoising method based on curvature characteristics
CN110009582A
Cited By
Microscopic image intelligent processing system
CN122390975A