Overview of image noise reduction based on non-local mean algorithm

The system introduces the extensive application and development process of image denoising based on non-local mean. The principle and specific theoretical model of the non-local mean algorithm are described. The process of improving the non-local mean algorithm after being proposed and how to improve it is elaborated and the shortcomings of the algorithm are pointed out. The noise reduction algorithm is experimentally described in detail from the aspects of peak signal-to-noise ratio, mean square error and structural similarity under different noise environment conditions.


Introduction
With the rapid development of computer science, the role of digital image processing technology in daily life has become increasingly prominent.At present, image processing technology has been widely used in daily life and scientific research.However, in the process of forming an image, it is inevitable that noise will be introduced to reduce the quality of the image.There are three main types of noise: Gaussian white noise, which is generated by electronic devices; Poisson noise, mainly generated in the process of photoelectric conversion whose influence of noise is more obvious in the case of weak light.This kind of noise is modeled by random variables of Poisson distribution; Speckle noise, the SAR imaging system A major feature is the signal-related small spots on the image which not only reduces the image quality of the image but also seriously affects the automatic segmentation, classification, target detection and other thematic information extraction.Since the existence of these noises reduces the quality of the image and affects the correct recognition and understanding of the image information by the staff, the importance of image noise reduction in image processing technology can be known.How to better preserve the edge information and structural information of images while maintaining effective denoising is a hot issue in image denoising.Gaussian filtering algorithm [1], bilateral filtering algorithm [2], anisotropic diffusion algorithm [3], and median filtering algorithm [4] are commonly used noise denoising methods.These classical algorithms have achieved a certain degree.Noise effect, but there are also disadvantages that image structure information cannot be well preserved.Non-local mean filtering has the advantage of stable denoising effect and no blur detail compared with other algorithms, and can better preserve the edge and image structure information [5].
Non-local mean (NLM) filtering algorithm [6], the basic idea is that the ultrasound image contains a lot of redundant information, as there are many very similar image blocks, but these similar image blocks are distributed over the whole image.Their positions may be quite different but the gray scale information is similar.The NLM filtering method fully exploits the similarity of the images based on the existence of the above features.Firstly the similarity between these similar blocks and the image block where the current noise is located is calculated, and secondly the weighted average is used to recover the value of the pixel to be restored.[7].

Image denoising application
Image noise reduction is also widely used, such as medical images, industrial non-destructive testing, and remote sensing images.In the medical field, with the rapid development of modern medical services, more and more medical images such as CT scan images, nuclear magnetic resonance images, however, doctors diagnose the patient's condition mostly based on the quality of these images, visible image denoising in medical careers Play an important role.Not only that, but the contribution of medical image denoising technology in scientific research, surgery, and tumor diagnosis is also significant.With the development of image denoising technology, more denoising algorithms have been successfully applied to medical images to improve the quality of images, and play a great role in the prevention and treatment of diseases.With the rapid development of industry, China has proposed China 2025 manufacturing.Industrial non-destructive testing is one of the key technologies used to ensure product quality.Image formation often has speckle noise during the detection process, which seriously affects the staff.The image 3 Introduction to non-local mean noise reduction algorithm

Principle of non-local mean denoising algorithm
Gaussian filtering algorithm, bilateral filtering algorithm, anisotropic diffusion algorithm, median filtering algorithm and other classical filtering algorithms can remove image noise, but the image structure information is not retained enough, and the image geometry will be affected.After the texture structure features of the filtered image are filtered out, the image of the original image will be destroyed and the image will lose the meaning of denoising.The pixels in the image are not alone.The individual pixels are combined with other pixels, especially the surrounding pixels, to form the structure of the image.The image block composed of such pixels and its surrounding points is called a window.Area.This feature makes the structural texture features of the image be well represented, and the spatially complex relationships in the image are also evident.All image blocks are also complete for the representation of the image.Since pixels in different parts of the image often exhibit similar characteristics, the image will exhibit selfsimilar features.Image blocks can make the representation of the image too redundant, because some pixels in the image have self-similar features, such selfsimilar features will make the pixels at different positions in the image have a certain correlation.Natural images all have the above properties, and any window neighborhood in the image has many similar or identical window structures in the image.Therefore, natural images also contain more repetitive structures.For example, the points on the same curve or line boundary have similar neighborhood patterns, and there are also a large number of similar pixels in the flat area of the image.The above conclusions are consistent with the neighborhood of the window in the image.The neighborhood pixel block centered on the pixel is similar to the pixel block centered on the pixel and the neighbor of a pixel in the image is adjacent.The domain concept is a set of all the pixels that satisfy the above conditions.We call it a neighborhood.
All the pixels in the image are associated with each other, and the operation of a certain pixel can be processed with all the pixels.Image regularity is redundant structural information of an image.The non-local mean denoising algorithm is based on the above analysis, proposed by Buades, which uses structural similarity to define the difference between pixels and the texture structure of the image is better protected, so the non-local mean filtering algorithm becomes the current One of the best filtering algorithms in image noise reduction.

Non-local mean algorithm model
In 2005, Antoni Buades proposed the NLM algorithm, which successfully avoided the existing noise reduction algorithm based on the noise image regularity assumption and the loss of image structure information during the noise reduction process, because the algorithm maintains edge information and images.Excellent performance in structural information, so it has been widely used as a research hotspot in the field of image processing.
The principle of the NLM algorithm is as follows.As shown in Figure 1, the figure contains three pixel points P , 1 Y , 2 Y and their respective neighborhoods.It can be seen that the pixel points P and 1 Y have very similar neighborhood structures, while the neighborhoods of P and 2 Y are similar.The property is very small, then the similarity weight ( )  PY of 1 Y when filtering the p- point pixel.The final recovery result of the pixel can be obtained by searching for all the pixel points P in the entire image having similar neighborhoods with the pixel P then weighting the similarity of the obtained similarities [8].

Figure 1. Principle of NLM filtering algorithm
The NLM filtering algorithm performs image denoising to calculate the similarity of pixel points in units of image blocks.A so-called image block is a square neighborhood centered on a certain pixel point.
Let the contaminated image have a gray value of ( ) vi at pixel i and a filtered gray estimate of ( )( ) NL v i .For any pixel i , the filtered ( )( ) NL v i can be obtained by computing a weighted average of the pixels in the entire noise image with similar neighborhoods Where, I is the entire image space; the weighting factor ( ) ,  ij is the degree of influence of pixel j on pixel i , as shown below Where, i N is the reference block, also called the image block of the pixel to be restored; j N is a similar block, which is the same size as ( ) ( ) is the Gaussian weighted Euclidean distance;  is the standard deviation of the Gaussian kernel; h is the attenuation parameter that controls the degree of filtering; ( ) ( )

Non-local mean development process
It has been favored by many researchers since the nonlocal mean filtering algorithm was proposed in 2005 [9].They have been constantly improving in order to make the performance of the non-local mean algorithm better.There are two main directions for improvement: one is to find a better calculation formula to calculate the similarity degree of similar blocks; the other is to select better optimization parameters.Therefore many improved algorithms have been proposed.Kervrann [10] mainly studied the spatial non-local mean filtering algorithm (OSA-NLM).In order to optimize the results, the following three aspects were studied: First, the weights were improved, and noise-related The selection of adaptive parameters; the second is the selection of the size of the search box, mainly using statistical principles; the third is the study of image block similarity, the improvement of them is mainly based on the square error function.This method is of great significance for determining the weight parameters, and the degree of similarity of the images is more accurate.Biao Hou [11] mainly based on the improvement of Bayesian non-local mean filtering algorithm.Tasdizen [12] proposed the principal component analysis method, and Zheng Yuhui [13] based on the idea of 2DPCA to improve the nonlocal mean filtering algorithm.Both of the above methods are based on the feature vector space to study the image block, and the image similarity is measured based on the principal component.These two methods have significantly improved the denoising effect of the image.The method of can't better preserve the structural information of the image.Zheng Yuhui [13] uses twodimensional PCA to generate similar image blocks, which will retain the structural information of the image.
Different weight functions have different effects on the image denoising effect.Grewenig [14] and Cvetkovic [15] mainly studies the similarity measure of rotation invariance, in order to obtain more similar pixels.They measure the similarity of the image blocks using the invariance of the image blocks.However, the structural texture features of the image are not well preserved.Sun Weifeng [16] improved the image with symmetrical structure and proposed a method of combining symmetric transformation and two-stage filtering.Thaipanich [17] proposed a non-local mean filtering algorithm that uses rotation for matching.The literature improved the shape of the neighborhood and achieved better noise reduction.
Reference Deledalle [18] uses neighborhoods of various shapes, and this irregularly shaped neighborhood has a good protection against image weak gradient information.
Brox [19] proposed a method of clustering similar pixels, and proposed an iterative method for image processing.This method has a good protection effect on the structural texture of the image.Three-dimensional block matching [20] is one of the best noise-reducing algorithms at present.This method aggregates similar two-dimensional image blocks in an image and combines them into a three-dimensional array, and then performs cooperative filtering on them to obtain filtering.The effect is due to other classical filtering algorithms in terms of performance and retention details, but the computational efficiency of the BM3D algorithm is lower than that of the non-local mean algorithm.Zhong [21] combined a method noise and a non-local mean filtering method to obtain a similarity weight function filtering method.Maieki [22] proposed an anisotropic-based nonlocal mean filtering algorithm in order to better protect the structural texture and edge information of images.Buades [23] gave a measure of similarity weight parameters.Buades considered that there is a certain relationship between the selection of weight parameters and the mean square error of noise.Therefore, they set the parameter to a linear proportional relationship with the mean square error of the noise as a fixed way.Later, the parameter selection for improving the non-local mean filtering algorithm is based on this relationship.

Non-local mean problem
So far, many classic filtering algorithms have been proposed.Because the principle is simple and easy to understand, and the image details can be better preserved, the non-local mean filtering algorithm has become a popular noise reduction algorithm in recent years.Although the non-local mean filtering algorithm has achieved good results, there are some areas for improvement.Mainly in the following aspects: First, although the good results are achieved, the algorithm efficiency is slightly lower than the traditional algorithm; second, the weight of the similarity between image blocks is difficult to accurately determine; third, the image block is similar to the lack of Lu Great.The latter two shortcomings affect the performance of denoising, and the first deficiency affects the scope of the algorithm.Since there are a large number of pixels in the image, there are similarities between the image blocks, and sometimes they rotate a certain amount.Instead of the local mean filtering algorithm, the image block is subjected to a specific step size translation, so that the degree of contrast between the image blocks is not fine enough.Since the image block adopts a panning operation, the self-similarity existing in the image cannot be fully utilized.Thus, pixels with a similar degree of similarity in the image are often given a small weight by mistake, and this error causes the quality of the image after noise reduction.Gaussian weighted Euclidean distance is used to measure the similarity of images in most improved non-local mean filtering algorithms.Although the Gaussian weighted distance can reduce the influence of noise on the central pixel, the characteristics of the Gaussian kernel are not well discriminant for the pixel blocks with low similarity based on the same isotropic, so that the weights of these pixel blocks are higher.It is precisely because of this that the similarity of the metric image block is not accurate enough, thereby reducing the denoising effect of the image.All image blocks in the image contribute to the weight, even pixels with low similarity are given a larger weight.Because of this, the incoherent pixels in the image will have a negative effect on the image denoising.Moreover, pixels with a large degree of similarity in the image in an intensity noise environment are often unable to obtain a sufficiently large weight.Therefore, reducing the proportion of pixels with a similar degree of similarity and increasing the proportion of pixels with a similar degree of similarity can effectively improve the denoising effect of the non-local mean filtering algorithm and better preserve the structural information of the image.Each pixel in the image that needs to be processed needs to search all the pixels in the search area to find similar pixels to determine their weight.Therefore, it takes too much time to compare similar pixels, the algorithm is limited in speed, and time efficiency is low.Therefore, the improvement of the running speed of the non-local mean filtering algorithm is also an aspect of improvement.
Another important issue in the non-local mean filtering algorithm is how to select the parameters.The selection of different parameters directly affects the weight of similarity between blocks, so it has a great influence on the denoising effect.Since the introduction of the non-local mean algorithm, there has always been no uniform form of parameter selection, which is based on empirical income.Buades use a global fixed approach that is linearly proportional to the noise variance to determine weight parameters.There is a relationship between the content of the weight parameter image and the noise level in the actual image.Therefore, it is probabilistic to restrict image denoising relative to the use of fixed parameters, so the use of adaptive parameters is an important direction of future research.

Evaluation index
The effect of image noise reduction can be evaluated by some commonly used objective evaluation indicators.In this paper, the peak signal-to-noise ratio [24] (PSNR), mean square error [25] (MSE), and structural similarity [26] (SSIM) are chosen to evaluate the performance of the algorithm., ,

( ) ( )
Where, ( ) , f i j is the original image; ( ) , g i j is the denoising image; M and N are the rows and columns, respectively.The larger the value of PSNR, better filtering effect, the smaller the distortion of the filtered image.
( ) ( ) ( ) Where, ( ) , f i j is the original image; ( ) , g i j is the denoising image; M and N are the rows and columns respectively.The smaller the value of MSE, the more similar the original image and the denoised image are

S x y f l x y c x y s x y
(5) The three functions are relatively independent [18]; L is the dynamic change of the pixel value,

Experimental results and analysis
The size of the search area and the similar window in the NLM filtering algorithm has a great influence on the denoising effect.This paper reviews the relevant literature and tests it to determine that the selected search area is 7×7 and the similar window size is 3×3.In order to further illustrate the noise reduction effect of the nonlocal mean filtering algorithm, the peak signal-to-noise ratio (PSNR) and mean square error (MSE) of the three noise-reducing noise images of sigma=20, sigma=30, and sigma=40 are selected respectively., the value of structural similarity (SSIM).It can be seen from Table 1 that the peak signal-tonoise ratio gradually decreases with the increase of noise intensity, which means that the denoising effect of the image in high noise environment is not as good as that in low noise environment.This shows that the non-local mean filtering algorithm is suitable for low-noise environments.In the case of sigma=20, it can be seen from Figure b) that not only the noise in the image is removed, but also the details and structure of the image are preserved.It can be seen that the algorithm plays an important role both in the medical industry and in industry.

Conclusion
The non-local mean filtering algorithm preserves the characteristics of the image while reducing noise, so this algorithm has the advantage that other algorithms can't match in image denoising.After more than ten years of efforts, non-local mean has occupied an important position in image denoising, edge detection, image segmentation and many other fields.With the continuous improvement and improvement of various researchers, the non-local mean is still one of the more popular denoising algorithms.
i N ; ( ) i vN is the gray value of each pixel in the reference block; ( ) j vN is the pixel of each block in the similar block gray value; the formula, x and y is the original image signal and the distorted image signal; ( ) , S x y is the similarity between the distorted signal and the original signal, that is, the distortion measure; ( ) , l x y is the two-degree comparison function; ( ) , c x y is the contrast comparison function; ( ) , s x y is the structure comparison function .
brightness mean, it is used as the brightness estimate;  x , y σ is the standard deviation, as the contrast estimate.

Table 1 .
Values of PSNR, MSE and SSIM in different noise environments