Edge-Preserving Median Filter and Weighted Coding with Sparse Nonlocal Regularization for Low-Dose CT Image Denoising Algorithm

The impulse noise in CT image was removed based on edge-preserving median filter algorithm. The sparse nonlocal regularization algorithm weighted coding was used to remove the impulse noise and Gaussian noise in the mixed noise, and the peak signal-to-noise ratio (PSNR) and structural similarity index (SSIM) were calculated to evaluate the quality of the denoised CT image. It was found that in nine different proportions of Gaussian noise and salt-and-pepper noise in Shepp-Logan image and CT image processing, the PSNR and SSIM values of the proposed denoising algorithm based on edge-preserving median filter (EP median filter) and weighted encoding with sparse nonlocal regularization (WESNR) were significantly higher than those of using EP median filter and WESNR alone. It was shown that the weighted coding algorithm based on edge-preserving median filtering and sparse nonlocal regularization had potential application value in low-dose CT image denoising.


Introduction
CT images are susceptible to the interference of quantum noise and electronic noise of detectors and other noises during the acquisition process, which causes the quality of reconstructed images to decrease, which in turn affects the diagnosis of diseases by doctors [1]. Under normal circumstances, the scan dose is proportional to the sharpness of the CT image. However, CT radiation dose is accumulated throughout the life, and multiple CT scans will increase the risk of cancer [2,3]. Low-dose CT scan can reduce the radiation dose of patients, reduce equipment damage, reduce costs, and is conducive to the general investigation and cure of certain diseases [4]. However, the reduction of lowdose CT tube current leads to rapid degradation of projection data. After traditional algorithms are reconstructed, there are still obvious noises and artifacts in the CT reconstructed image, which seriously affects the credibility of the doctor's diagnosis. Low-dose CT scan technology is unable to give full play to its accurate diagnostic efficacy in clinical practice [5]. ere may be some isolated impulse noise points in some areas of low-dose CT images. After these isolated impulse noise points are filtered, the CT image data is distributed in the form of Gaussian noise [6]. Due to the complexity of the distribution of noise and artifacts in low-dose CT images, it is difficult to establish a suitable and accurate prior model of noise in the image domain reconstruction method. e image preprocessing is complex, and the calculation is large, which affects the real-time clinical application of CT. e postprocessing method is a method that is directly applied to the reconstructed low-dose CT image to improve its image quality [7]. e method is simple and easy to implement and has good compatibility with existing CT equipment.
According to the sparse representation theory, the differences in the learning dictionary caused by individual differences and differences in tissues and organs in CT images are very small [8]. Chen et al. [5] improved the reconstruction quality of low-dose CT images with a sparse image reconstruction method. Cui et al. [9] proposed a learning method based on morphological component analysis, which can automatically generate an adaptive discriminant dictionary and effectively suppress the artifacts of low-dose CT images under the framework of sparse representation. Jiang et al. [10] proposed a denoising algorithm based on weighted coding and sparse nonlocal regularization (WESNR), which simultaneously removes impulse noise and Gaussian noise through soft impulse pixel detection. e principal component analysis (PCA) dictionary was used to encode image blocks, and the coding residuals were weighted to suppress the heavy tail of the distribution. e image sparse prior and nonlocal self-similarity prior were merged into a single nonlocal sparse regularization term, which enhances the stability of weighted coding. However, when this method was applied to low-dose CT image denoising, details were lost, and edges were destroyed. A variety of edge preservation filters can solve the problem of incorrect removal of edges and lines in the image denoising process. e feature of edge-preserving filtering is that it can extract the spatial constraint factors of the edge information in the reference image to process the original image, thereby smoothing and edge-preserving it. Among them, edgepreserving median filter (EP median filter) has a good performance in terms of operation speed and edge protection [11]. However, the edge-preserving filtering algorithm is not effective for mixed noise and noise with low signal-to-noise ratio.
In this exploration, a denoising algorithm based on EP median filter and WESNR is proposed, which can remove the mixed noise of low-dose CT image and preserve the edge information of the image.

Mixed Noise Model.
For image x with size m × n, x i,j is the gray value at (i, j), and y is set as the observed image of image x. For adding Gaussian noise, the pixels y i,j in y are defined as where v i,j is the independent and identically distributed noise; for the salt-and-pepper noise, [d min , d max ] represents the dynamic range of y pixels in the observation image, and the probability of salt-and-pepper noise is s, 0 ≤ s ≤ 1. en, the probability of y i,j � d min is s/2, and the probability of y i,j � d max is s/2. erefore, the observation image mixed with Gaussian noise and salt-andpepper noise can be described as follows: the probability is s 2 , in image y has the neighborhood of 5 × 5 in Figure 1. If (i, j) is a point in a flat area, most of the gray values of 24 pixels in its neighborhood should be close to it. Even if there are few noise points, it can be set to less than one-fourth; that is, the number t i,j of absolute values of gray value difference greater than a certain threshold T is less than or equal to 6; if (i, j) is an edge point, about half of the gray values of the 24 pixels in its neighborhood should be close to it, and the other half should have a large difference with it; that is, the number t i,j of gray values whose absolute value is greater than a certain threshold T should be about 12; if (i, j) is a noise point, most of the gray values of the 24 pixels in its neighborhood should not be close to it. It can be set as no less than three-fourths; that is, the number t i,j of absolute values of gray value difference greater than a certain threshold value T is greater than or equal to 18. e standard deviation of image y is taken as the threshold T; that is, where y is the mean value of all gray values of image y; that is, Based on the above assumption, can be divided into points in flat area, edge points, and noises. 1,j+2 , and y i+1,j+2 . e pixels participating in the assignment and their gray values are the shadow parts in Algorithm 1, and the mean value is a i,j ; that is, 2 Journal of Healthcare Engineering 13 . (4) e gray values of all the pixels in (i, j)(i ≤ 2, or i ≥ m − 2, or j ≤ 2, or j ≥ n − 2) are not modified, the gray values of the points in the flat area and the edge points is replaced by the value of a i,j , so that the gray values of the pixels in the (i, j) position of the denoised image are y i,j ′ . ere is If y ′ is the image with size m × n and the gray value at (i, j) is y i,j ′ , y ′ is the denoised image of observation image y by EP median filter algorithm.
Figure 1: Gray value of (i, j) and its neighborhood Algorithm 1 Pixels participating in a i,j ′ assignment and their gray values.
Input: noisy image y.
Image y′ is obtained.
When k ≤ K, the following cycle is performed: is calculated and the nonlocal coding vector μ is updated; , where R i is the matrix vector. Based on the sparse representation theory, the image block is sparse-coded through the overcomplete dictionary Φ � [ϕ 1 ; ϕ 2 ; . . . ; ϕ n ] ∈ R n′×m′ , so that x i � Φα i , where α i is the sparse coding vector of nonzero matrix. e results are as follows: where α is the set of all sparse coding vectors α i . e traditional sparse representation denoising algorithm can be expressed as where R(α) is a regularization term corresponding to α and λ is a regularization parameter.
To make the distribution of data fitting residuals more regular, data residuals are weighted [12]. A new loss function is used, and the following mixed noise removal model is obtained: where W is a diagonal weight matrix with diagonal elements.
Image block x i and its nonlocal prediction are encoded by a given dictionary ϕ i ; that is, x i � ϕ i α i and x i � ϕ i μ i , and then the encoding coefficients x i and μ i are similar. erefore, i ‖α i − μ i ‖ l p is used as the regularization term and applied to the above equation. ere is where l p (p � 1 or p � 2) is the l p norm. l 1 is chosen as the norm. e model is as follows: where W is a diagonal weighted matrix whose element W ii will be determined automatically. e coding residual e i can be used to determine the weight W ii , and the strength of W ii is inversely proportional to that of e i . W ii ∈ [0, 1] is set. W ii is determined as Iterative reweighting is used to solve the problem. V is set to a diagonal matrix and initialized as an identity matrix. In k + 1 times of iteration, each element of V is updated as follows: where ε is a scalar and α k i is the i-th element of the coding vector α in the k-th iteration. e sparse coding α is updated by the following function: A set of local PCA dictionaries are learned from natural images, and the model can be solved by iteratively updating W and α. e update of W depends on the coding residual e, and the adaptive median filter is selected for y to get an initial image x (0) . en, e is initialized to e above optimization is repeated for the subproblem until the iteration stop condition is satisfied. When there is no significant change in the solution of continuous iteration or the corresponding objective function value, that is, when the difference norm between two continuous iterative solutions is less than the given positive norm, the algorithm stops, or when the running time exceeds the upper limit, the iterative process stops. In this exploration, t � ‖Φα (k+1) − Φα (k) ‖ 2 /‖Φα (k) ‖ 2 < τ is regarded as the termination condition. e obtained image is the denoised image of the observed image y by the WESNR algorithm.

Denoising Algorithm Based on EP Median Filter and WESNR.
e general denoising algorithm will inevitably lose the details of the image. In particular, for the image with more lines, it will cause the blurring of the visual effect. In order to avoid the situation that the lines and edges of objects in the image are eliminated by mistake in the process of denoising, EP median filter algorithm distinguishes lines or edges from noise in advance, which has good performance in image details and edge preservation. However, EP median filter algorithm is only suitable for the removal of impulse noise in the image, and it does not perform well in the removal of other noises or mixed noises. When low-dose CT images with complex noise are processed, the phenomenon of incomplete noise removal will appear. WESNR algorithm encodes each noise contaminated block, which can remove the mixed noise of impulse noise and Gaussian noise at the same time. However, for low-dose CT image denoising, when WESNR algorithm is used directly, there will be loss of details and edge damage.
In order to achieve the purpose of removing mixed noise in the process of low-dose CT image denoising without destroying the details and edges, EP median filter algorithm is combined with WESNR algorithm. First, the points in the center region of the noisy image y are classified into points in flat areas, edge points, and noise points. e points in the flat area, the edge points, and the points outside the central area are not replaced. e noise in the central region is replaced by the mean value of the gray value of 13 pixels around it to get image y′ after the first step. en, y ′ is input into WESNR algorithm as noisy image, and local PCA dictionary is selected to iterate the target problem, subproblem, and parameters. When the preset termination condition is satisfied, image y ″ is the result of the denoising algorithm based on EP median filter and WESNR. Algorithm 1 shows the flow of the algorithm. e steps of denoising algorithm based on EP median filter and WESNR are as follows.

Experiment
In addition to the visual effect comparison, the following numerical criteria are given: peak signal-to-noise ratio (PSNR) and structural similarity (SSIM). PSNR is the most commonly used objective index to evaluate image quality, which is an objective description of the degradation degree of an image. e higher the value of PSNR is, the closer it is to the original image. SSIM is mainly used to measure the similarity between the original image and the restored image. e higher the SSIM, the higher the image quality [13].

Shepp-Logan Head Model Experiment.
e Shepp-Logan head model of 256 * 256 is selected as the experimental object. is model was proposed by Shepp and Logan in 1974 [14]. e image is composed of 10 ellipses with different positions, sizes, directions, and densities. Different gray value of ellipse can simulate attenuation coefficient of different tissues, and Shepp-Logan head model can simulate human head sectional image well. In Shepp-Logan image, the mixed noise with different proportions of Gaussian noise and salt-and-pepper noise are added, respectively. EP median filter algorithm, WESNR algorithm, and the algorithm proposed in this exploration are used to denoise the image. e reconstruction effect and numerical comparison of various algorithms under nine kinds of noise are listed, as shown in Figure 2 and Table 1. e bold fonts in the table indicate the advantages of the algorithm. e experimental results show that, for nine kinds of Shepp-Logan images with different proportions of Gaussian noise and salt-and-pepper noise, the reconstruction effect and numerical comparison of the proposed denoising algorithm based on EP median filter and WESNR are better than those of EP median filter algorithm and WESNR algorithm alone. Moreover, the proposed algorithm has the advantages of good edge preservation and good effect of removing mixed noise. listed, as shown in Figure 3 and Table 2. e bold fonts in the table indicate the advantages of the algorithm. e experimental results show that, for nine kinds of simulated low-dose brain CT images with different proportions of Gaussian noise and salt-and-pepper noise, the proposed denoising algorithm based on EP median filter and WESNR outperforms EP median filter algorithm and WESNR algorithm alone in terms of reconstruction effect and numerical comparison. Moreover, the proposed algorithm has the advantages of good details and edge preservation and good effect of removing mixed noise.

Conclusion
In this exploration, a new low-dose CT image denoising algorithm is proposed. According to the characteristics of low-dose CT image and noise, this algorithm is to combine EP median filter with WESNR. e experimental results show that the algorithm proposed in this exploration has a good ability to suppress the mixed noise in low-dose CT images, and the edge information is well preserved. However, this study still has some shortcomings. e proposed method is not compared with other related low-dose CT image noise reduction algorithms, and its effect on low-dose CT image noise reduction needs further study. In the future work, we will continue to compare it with related algorithms to clarify the value of this algorithm in low-dose CT images for noise reduction. In short, the algorithm of this research has a significant effect on denoising mixed noise in low-dose CT images.

Data Availability
e data used to support the findings of this study are available from the corresponding author upon request.

Conflicts of Interest
e authors declare that there are no conflicts of interest.