Image Denoising Based on Improved Gaussian Mixture Model

An image denoising method is proposed based on the improved Gaussian mixture model to reduce the noises and enhance the image quality. Unlike the traditional image denoising methods, the proposed method models the pixel information in the neighborhood around each pixel in the image. The Gaussian mixture model is employed to measure the similarity between pixels by calculating the L2 norm between the Gaussian mixture models corresponding to the two pixels. The Gaussian mixture model can model the statistical information such as the mean and variance of the pixel information in the image area. The L2 norm between the two Gaussian mixture models represents the diﬀerence in the local grayscale intensity and the richness of the details of the pixel information around the two pixels. In this sense, the L2 norm between Gaussian mixture models can more accurately measure the similarity between pixels. The experimental results show that the proposed method can improve the denoising performance of the images while retaining the detailed information of the image.


Introduction
Due to the effects of different illumination and changes in sensor temperature during image acquisition, transmission, and digitization, random noises will be introduced into the acquired images, and these noises often exhibit Gaussian characteristics [1][2][3][4]. e existence of noise will not only affect the visual effect of the image but also further affect the subsequent processing of the image, such as image feature extraction, image classification and recognition, and so on. erefore, before image processing, it is necessary to perform denoising processing on the acquired image to improve the quality of the image and facilitate the postprocessing of the image. ere are many methods of image denoising, which are often divided into frequencydomain filtering and spatial-domain filtering. Common frequency-domain filtering methods include wavelet denoising [5], high-pass filtering, Wiener filtering [6], etc. e spatial filtering methods are also rich, such as partial differential equations, variational methods [7], statistical methods [8], and so on, which are widely used in practical applications. e classic partial differential equation method includes mean filtering, which is an isotropic filtering algorithm that can remove noise very well. However, because the image information is also averaged while averaging the noises, the effective information in the original images becomes vague at the same time. To handle this problem, many researchers have improved the isotropy. A typical example is the anisotropic filtering method proposed by Perona, which can change the weight coefficient when averaging the noise and image information. In this way, the smoothing effect of the noise is good while the effective information can be maintained. e anisotropic filtering can remove noises very well, but because the image information is less smooth, its denoising effect is poor in areas with rich details. In addition, the blocking effects are prone to appear in these methods. As a remedy, Le Montagner defined the similarity between pixels according to the difference of pixel gray levels, the so-called Yaroslavsky filter [9]. e Yaroslavsky filter can change the smoothing weight coefficient according to the pixel information of the image, and its denoising effect is better than the general anisotropic filter. Moreover, it can well retain the detailed information of the image. On the basis of Yaroslavsky filtering, Tomasi and Manduchi combined the grayscale difference and spatial distance between pixels to define the similarity between pixels and obtained the bilateral filtering [10]. Bilateral filtering not only considers the impact of grayscale differences on the weights but also considers the impact of pixels at different distances. Compared with mean filtering and Gaussian filtering, the bilateral filtering can be achieved in both flat areas of the image and areas with rich details. At the same time, the detailed information of the image can be well retained. However, the denoising performance of the bilateral filtering is limited in areas with rich image texture. In recent years, some improved algorithms have also appeared for the bilateral filtering [11][12][13][14][15], mainly focusing on the selection of filtering parameters and the improvement of algorithm efficiency. Among them, Ghosh and Chaudhury [16] proposed the concept of distance kernel and applied it to the definition of pixel similarity weights, especially in areas with rich details. e denoising performance of the algorithm is greatly improved, and the calculation efficiency of the algorithm is also optimized. In recent years, new signal processing algorithms represented by compressed sensing and machine learning algorithms represented by deep learning have also been widely used in the field of image denoising. e works in [17][18][19][20] are based on the theory of compressed sensing and realize image reconstruction and denoising through the method of sparse representation. e works in [21][22][23][24] employ a variety of deep learning models for noise image processing and achieve a good denoising effect.
e above methods mainly use information such as pixel gray difference and spatial geometric distance to measure the similarity between pixels.
is paper uses the Gaussian mixture model to model the pixel information in the neighborhood around the pixel. e L2 norm and the spatial distance between Gaussian mixture models are combined to define the similarity weight between pixels. e Gaussian mixture model of the pixel information in the image area represents the pixel grayscale and the richness of details in the local area of the image. Based on the spatial distance between pixels, the pixel gray intensity and the richness of details in the local area of the image can be more accurately measured. e similarity between the two improves the denoising performance of the algorithm and maintains the detailed information of the image. In the experiment, some classic image samples are used to test the proposed method, and the adaptability of the method to different noise samples is tested through the noise level. After comparative analysis with several existing methods, the experimental results verify the superior performance of the proposed method for image denoising.

Image Denoising Based on Gaussian
Mixture Model e basic idea of image denoising based on the Gaussian mixture model is as follows. First, the pixel information of the neighborhood around each pixel is used to estimate the parameters of the Gaussian mixture model. e pixel information is modeled as a Gaussian mixture model to obtain a prefiltered image. Afterwards, the L2 norm between the Gaussian mixture models corresponding to the two pixels is calculated. e L2 norm and the spatial position distance between the two pixels are combined to define the similarity weight between the two pixels. Finally, the weighted smoothing filtering is performed on each pixel to obtain a denoised image.
Different from the traditional spatial denoising methods, the image denoising method based on the Gaussian mixture model defines the similarity weight between pixels according to the statistical difference of the information around the pixels. e detailed steps of the proposed method can be summarized as follows: Step 1: for a certain pixel, the pixel information in its surrounding neighborhood is used to estimate the parameters of the Gaussian mixture model to obtain a Gaussian mixture model.
Step 2: a Gaussian mixture model is estimated for each pixel in the image, and all Gaussian mixture models constitute a prefiltered image.
Step 3: the L2 norm between the Gaussian mixture models corresponding to two pixels is calculated, which is combined with the spatial distance between the two pixels to define the similarity between the pixels.
Step 4: each pixel in the image is subjected to weighted smoothing filtering to obtain a filtered image.
It can be seen from the above steps that image denoising based on the Gaussian mixture model is based on two pixels x and y. e spatial distance between the two pixels and the L2 norm between the corresponding Gaussian mixture models define the similarity weight w(x, y). Afterwards, the weighted smoothing and filtering are performed to obtain the filtered image as follows: where S(x) � Ψ(x) w(x, y)dy is to normalize the integral value; Ψ(x) is the neighborhood window with the center of the pixel x; and I(y) represents the gray value of the pixels y. e similarity weight w(x, y) in equation (1) is calculated as follows: where G(x) and G(y) represent the Gaussian mixture models of the pixels x and y, respectively; d 2 (x, y) � |x − y| 2 calculates the spatial distance between x and y; and the parameter r is the filter control coefficient. e larger the value of r, the better the smoothing effect of the image and the higher the loss of the image's detail information. On the contrary, the smaller the value of r, the worse the smoothing effect of the image and the smaller the loss of image's detail information. erefore, it is necessary to select appropriate filter control coefficients in the filtering process.
e basic idea of the image denoising method based on the Gaussian mixture model is shown in Figure 1.

L2 Norm between Gaussian Mixture Models
For each pixel, the pixel information in its surrounding neighborhood is used to estimate the parameters of the Gaussian mixture model to obtain a Gaussian mixture model. e Gaussian mixture model corresponding to the pixel indicates the local grayscale intensity and the richness of the details of the pixel information in the neighborhood around the pixel. e L2 norm between two Gaussian mixture models and the spatial distance between the pixels are used to define the similarity between pixels. According to the similarity weights, each pixel in the image is weighted and smoothed. e following mainly introduces the Gaussian mixture modeling of pixel information and the calculation of the L2 norm between two Gaussian mixture models.

Gaussian Mixture Model Estimation of Pixel Information.
For a certain pixel x, the neighboring window Ψ(x) has the size of M × M including M 2 pixels. e gray value of the pixel at the location (i, j) is denoted as I(i, j). e information of these pixel is used to estimate a Gaussian mixture model as follows: where α m is the mixed weight coefficient; N(μ m , σ 2 m ) represents a Gaussian distribution with the mean of μ m and variance of σ 2 m ; and K represents the number of mixture components of the Gaussian mixture model. In Gaussian mixture modeling, the number of mixture components is usually set in advance.
In the following, the expectation-maximization (EM) algorithm is employed to estimate the parameters of the Gaussian mixture model. e EM algorithm provides an iterative estimation way to maximize the posterior probability. Assuming that the parameters of the Gaussian mixture model are θ � α 1 , . . . , α K , μ 1 , . . . , μ K , σ 2 1 , . . . , σ 2 K , there are n 2 samples to perform the estimation, where y i , i � 1, . . . , n 2 represents the ith sample value and c im denotes that sample y i belongs to the mth class. Given y and θ, c im can be calculated according to the maximum posterior probability as follows: where z is the class label and P(·) represents the probability. Equation (4) gives the way to obtain c im , i � 1, . . . , n 2 , m � 1, . . . , K, and the remaining parameters can be calculated as follows: According to equations (4) and (5), the EM algorithm can be used to iteratively estimate the parameters of the Gaussian mixture model. e detailed steps of parameter estimation are summarized as follows: Step 1: initialize value of the parameter set θ.
Step 2: according to the maximum posterior probability, c im can be calculated according to equation (4).
Step 3: based on the estimation of c im from step 2, the remaining parameters α, μ, σ 2 of the Gaussian mixture model are calculated according to equation (5). Repeat step 2 and step 3 until convergence.  mixture model corresponding to all pixels constitutes the prefiltered image. In the prefiltered image, the L2 range between the Gaussian mixture models corresponding to the two pixels and the spatial distance are combined to calculate the similarity weight between two pixels.

Distance Measure for Gaussian Mixture Models.
Assuming that the pixel information around each pixel is modeled as K mixed components, the Gaussian mixture models for two pixels x and y are formulated as follows: Actually, there are many calculation methods for the distance measurement, such as the KL divergence, Monte Carlo method, and so on. However, the KL divergence does not have an analytical expression and can only be calculated in an approximate way. e Monte Carlo method requires too much calculation, which is not suitable in real-time processing. As a remedy, this paper uses the L2 norm to calculate the difference between two Gaussian mixture models. e L2 norm between the Gaussian mixture models has an analytical expression, which is convenient for the implementation of the algorithm.
For the above two Gaussian mixture models, the L2 norm can be calculated as follows: It can be expanded as follows: Substituting equation (6) into equation (8), the simplification can be obtained as follows: According to the integral nature of Gaussian distribution, the following can be obtained: Equation (10) can be further simplified as follows: According to equation (11), the L2 norm distance between two Gaussian mixture models can be smoothly calculated.

Evaluation Indexes.
e performance of image denoising algorithms can be generally evaluated by two aspects, i.e., how much noise is removed and how much image detail information is lost. e more the noise is removed, the stronger the denoising ability of the denoising algorithm is. On the contrary, the less the noise is removed, the worse the denoising ability of the algorithm is. At the same time, the more the image detail information is retained, the better the image quality is.
e less the image detail information is retained, the worse the image quality is. While removing image noise, the detail information of the image should be preserved as much as possible. is paper adopts the peak signal-to-noise ratio (PSNR) to measure the denoising ability of the algorithm. At the same time, the structure similarity index measure (SSIM) is used to evaluate the quality of the image after denoising, that is, the ability to retain the detailed information of the image. With a large PSNR and a SSIM approaching 1, the denoising performance of the method is good.
Generally, the PSNR can be calculated as follows: where v max indicates the maximum pixel value in the image (for an image with grayscale value from 0 to 255, v max � 255); v(i) and u(i) represent the gray values of the noisy image and the noise-free image, respectively; and mean[v(i) − u(i)] 2 refers to the average power of noise. SSIM is an evaluation index for image denoising defined according to the human visual mechanism. From a visual point of view, the more detailed the information of the image, the clearer the image, and vice versa. SSIM is an evaluation index that combines the three characteristics of image contrast, edge structure, and image brightness and is obtained by weighted product. SSIM can be calculated by the following equation [25]: where m i and m j are the mean values corresponding to the pixel positions i and j, respectively; s 2 i and s 2 j are the variances; and s ij represents the covariance.
In this paper, c 1 � (k 1 L) 2 , c 2 � (k 2 L) 2 , L indicates the range of pixel values, and k 1 and k 2 are the weight coefficients, which are generally set as k 1 � 0.01 and k 2 � 0.03. e index mSSIM is the average of the SSIMs from different windows in an image.

Analysis of Experimental Results.
In order to verify the effectiveness of the proposed algorithm (denoted as GMMD), several reference methods are employed for comparison including the bilateral filtering (BF), mean filtering (MF), kernel bilateral filtering (KBF), sparse representation (SR), and deep learning (DL). e indexes PSNR and SSIM are used to evaluate the denoising performance of different methods. e following experiment uses 4 images: "Lena," "Academy," "Einstein," and "Mandrill," as shown in Figure 2, which are classical samples for the test and evaluation of image denoising algorithms. Figure 3 shows the denoising results achieved by the proposed method for a local area from the "Lena" image. It is clearly shown that the proposed method can effectively remove the noises while maintaining the detail information in the image. Furthermore, different levels of noises (denoted by the noise variance) are added in the 4 samples and different denoising methods are examined. e performance of those methods is summarized in Tables 1 and 2, which use the PSNR and mSSIM, respectively.
From the results in Tables 1 and 2, it can be seen that the denoising and detail information retention ability of the GMMD algorithm and the KBF algorithm is better than that of the MF and BF algorithms. In the relatively flat image denoising results of "Lena" and "Einstein," GMMD's denoising ability and detail information retention ability are better than those of the KBF algorithm. However, in the images "Academy" and "Mandrill" with richer image detail information, the denoising performance improvement of the GMMD algorithm is not obvious. e results show that the combination of the local average gray intensity of image pixel information and the richness of details to define the similarity weight between pixels is more accurate compared to traditional methods. Compared with the two emerging methods of SR and DL, the proposed method is very close to their denoising performance but has a slight advantage, reflecting its effectiveness. It shows the advantages of the Gaussian mixture model in image representation and similarity measurement. In addition, this paper also calculates the average time required for these three types of methods to process a single noisy image on the same hardware platform, which is 1.8 ms, 2.3 ms, and 4.7 ms, respectively. In contrast, the proposed method has better computing efficiency and more practicality. e DL method generally requires an offline training process, which reduces its overall efficiency.

Conclusion
is paper proposes an image denoising method based on the Gaussian mixture model. e statistical characteristics of the local gray information of pixels around the pixel are modeled as a Gaussian mixture model. e L2 norm between Gaussian mixture models and the spatial distance of pixel positions are combined to define the similarity weight between pixels. e weighted smoothing filter is used to denoise the image. e experimental results show that the denoising performance of the proposed method is more obvious in the relatively flat area of the image. In addition, the denoising performance of the proposed method is improved to a certain extent in the area with rich detailed information. e comparison between the proposed method and several existing image denoising algorithms validates the superior effectiveness of the used method.

Data Availability
e images used in this study are publicly available.

Conflicts of Interest
e authors declare that there are no conflicts of interest regarding the publication of this paper.