During the transmission and communication of X-ray images, they are usually accompanied by random pulse interference and other noises, which degrades the quality of the images and is not conducive to early diagnosis. Therefore, in the image preprocessing stage, filtering the noise becomes especially important.
Based on the characteristics of the mixed noise accompanying the X-ray images in the process of transmission and communication, an image denoising method based on wavelet transform and median filtering was proposed. The experiment results make clear that the image denoising method devised in this article can denoise X-ray images and improve the accuracy of reading and diagnosis.
The second part of this article introduces the basic theory and application of median filtering. The third part discusses the selection of wavelet. The fourth part proposes an X-ray image denoising method based on wavelet transform and median filtering. Finally, the fifth part gives experimental results and discussion.
Median filtering is a nonlinear signal processing technique that can effectively suppress noise based on the sequence statistics theory [1]. The advantages of this kind of filter are simple calculation, easy implementation, and fast speed. In some cases, it can exceed image detail blurring created by linear filters, for example, mean filtering, and it is the most efficient method for filtering out impulse interference and image scanning noise [2].
The basic principle of median filtering [3] is to substitute the value of a digital point or a point in a digital sequence with the median value of each point near the point.
The definition is as follows:
For a known original sequence
Set the input sequence as {
Now change the added noise to Gaussian noise with a mean squared error of 0.02, use the median filtering with 3*3, 5*5 and 7*7 as the templates to denoise and compare the results. See the Figure 1 [4].
Figure 1(a) is the primitive image, Figure 1(b) is Gaussian noise with a mean square error of 0.02, Figure 1(c) is the median filtered image with a window of 3*3, Figure 1(d) is the median filtered image with a window of 5*5 and Figure 1(e) is the median filtered image with a window of 7*7. As can be seen from the Figure 1, the median filter is very efficient in filtering the salt and pepper noise of the image.
At present, people have proposed a variety of threshold selection methods, such as VisuShrink, RiskShrink, SureShrink, and WaveJSShrink. The VisuShrink method uses a globally uniform threshold
The wavelet threshold shrinkage method for denoising is composed of the following three steps:
Calculating the orthonormal wavelet transform of the noisy signal. Non-linear thresholding of wavelet coefficients. To keep the overall shape of the signal unchanged, retain all low-frequency coefficients Soft threshold:
Hard threshold:
Performing inverse wavelet transform. Since the noise is mainly concentrated in the highest resolution level
Denoising by the threshold method not only can completely suppress the noise but also can retain the characteristic peak points reflecting the original signal well, so it has a good denoising effect.
From the above analysis, we can know that the median filtering has a clear denoising effect on X-ray images containing impulse (salt and pepper) noise when the denoising effect on Gaussian noise-containing X-ray images is not very good, it is quite fuzzy, the contrast is poor, and some details are lost. The wavelet image denoising method has ideal denoising and plays a role in the X-ray images containing Gaussian noise, while its denoising plays a role in the X-ray images containing impulse (salt and pepper) noise and is far worse than that of the median filtering.
However, impulse (salt and pepper) noise, and then the Gaussian noise are the two most ordinary types of noise in an image. In real life, during the transmission and communication of X-ray images, they often coexist as a kind of mixed noise. The simple median filtering denoising method or wavelet image denoising method is also not ideal for denoising this kind of mixed noise.
For mixed noise in which the impulse (salt and pepper) noise and Gaussian noise coexisted at the same time, we need to combine different methods to denoise many a time. In recent years, people have proposed many new methods to remove the mixed noise, and regarding this, Zhang Xuming et al. proposed a mixed filtering method based on adaptive median filtering and adaptive weighted average filtering [5]. Wang Jianyong et al. who combined median and fuzzy filtering techniques, proposed a new image mixed noise filtering algorithm [6], while Ni Hongxia et al. proposed a denoising system for median filtering in wavelet domain [7]. These methods can simultaneously suppress Gaussian and impulse (salt and pepper) noise in the image. Overall, these methods can be summarised as two categories: the first is the combination of median filtering and mean filtering techniques, first classifying the noise by detection, perform median filtering on impulse (salt and pepper) noise, and perform mean filtering on Gaussian noise. The second category is the combination of median filtering and wavelet denoising, which makes full use of the advantages of median filtering to impulse (salt and pepper) noise and the advantages of wavelet denoising to take out Gaussian noise. The algorithm in this paper belongs to the latter category.
The median filtering can well denoise the mixed impulse (salt and pepper) noise in the X-ray images, while the wavelet denoising method can well denoise the mixed Gaussian noise in the X-ray images. If these two kinds of noises can be separated, or when denoising the first kind of noise, the effect of the second noise on the denoising effect of the first one can be minimised, and then perform denoising on the second kind of noise, then the two filtering methods can each exert their advantages in denoising the X-ray images.
Therefore, the most critical thing is to separate the two kinds of noises or to minimise the effect of one noise on the denoising effect of the other noise. We have found that the impulse (salt and pepper) noise changed the grayscale worth of the pixels in the X-ray images greatly, but the number of these pixels is not large; while the Gaussian noise changed the grayscale value of the pixels in the X-ray image a little, the number of these pixels becomes large, and the grayscale values of all pixels have changed.
Based on the above analysis, we can first perform median filtering on the noise image. In each window, we take the middle grayscale value so that we can restore the grayscale values of those pixels whose grayscale values change greatly. The visual sensation is to filter out those spots that are significantly whiter or blacker than their surroundings.
As for the standard median filtering method, its method is to employ a window to scan on the image and arrange the image pixels contained in the window in the ascending or descending order of the grayscale, take the pixel greyscale with the centred grayscale value as the grayscale of window centrr pixel, and then complete the median filtering [8].
Formulated as:
Usually, the amount of pixels in the window is odd so that there is an intermediate pixel. If the amount of pixels in the window is an even in number, the median value is on the average of the grayscales of the two pixels in the middle.
About the soft threshold denoising method based on the Bior wavelet, it can be divided into the following two steps:
The first step is the decomposition and reconstruction of X-ray images. Choose the appropriate wavelet and then the appropriate decomposition level (marked as
What is shown in the Figure 2 is the result of the image after three-layer wavelet decomposition, where W
For the threshold, we choose the soft threshold method.
Then, following the
In the simulation experiment, a 256*256 X-ray image FEI was used as an experimental object, and the mixed noise of Gaussian noise and impulse (salt and pepper) noise were added. By changing the variance of the Gaussian noise and the noise density of the impulse (salt and pepper) noise, several sets of experimental results were obtained for comparison. For the denoising method used in the comparison of the experiment, we choose to use the simple median filtering, wavelet image denoising, and the proposed algorithm of this paper for denoising and then make comparisons.
Compare the filtering effect after adding the mixed noise in which the mean value of the Gaussian noise is 0, the variance is 0.01, and the impulse (salt and pepper) noise density is 0.1.
As shown in the Figure 3, Figure 3(a) is the noise-added image, Figure 3(b) shows the image after median filtering, Figure 3(c) shows the image after VisuShrink soft threshold denoising and Figure 3(d) is the algorithm proposed by this article. By comparison, it is found that the denoising effects on the proposed algorithm is much better than the simple median filtering and the VisuShrink soft threshold wavelet denoising method. The denoising have more obvious effect than it, and the details of the image and edge information remain intact. The mixed noise of impulse (salt and pepper) is also filtered out thoroughly.
By changing the density and intensity of the mixed noise, we get a set of information, which is precisely described by Peak Signal to Noise Ratio (PSNR) and Mean Square Error (MSE).
Where the mean square error (MSE) is defined as:
The restored image after processing and original image, respectively, the image size is
From Table 1, it is known that the method used in this article has the best effect on mixed noise denoising, the mean square error after denoising is the smallest, and the peak signal-to-noise ratio is the largest. The algorithm of this article is quite good for processing images with mixed noise, and its advantages are quite obvious compared to other methods; therefore, for the processing of images with mixed noise, the method chosen in this paper is better.
Experimental results of the denoising of the FEI image with mixed noise by different algorithms (MSE/PSNR).
Impulse (salt and pepper) noise | 0.05 | 0.1 | 0.2 | 0.05 | 0.1 | 0.2 |
Gaussian white noise | 0.01 | 0.01 | 0.01 | 0.02 | 0.02 | 0.02 |
Noise image | 1562.134/16.0052 | 2442.991/14.0761 | 4312.669/11.6569 | 2142.309/14.6674 | 3026.395/13.2002 | 4744.419/11.2596 |
Median filtering algorithm | 557.8286/20.4483 | 580.9237/20.2745 | 597.7874/20.1184 | 1031.996/17.8028 | 1061.468/17.6601 | 1061.973/17.6579 |
VisuShrink soft threshold method | 265.7028/23.6036 | 356.5844/22.3437 | 575.4486/20.6593 | 283.8094/23.3212 | 369.1374/22.1506 | 515.6530/20.7221 |
Algorithm of this paper | 144.3706/26.2155 | 145.5194/26.1817 | 160.3172/25.7669 | 212.1041/24.5683 | 215.3995/24.5023 | 227.1514/24.2748 |
The experimental results make clear that the denoising effect of the proposed system is far superior to the traditional mean filtering method and the single wavelet soft thresholding method. The traditional mean filtering method loses more effective detail elements and makes the image blur and unclear, while the single wavelet soft threshold method is not ideal for the effect of denoising of impulse (salt and pepper) noise, and it often leads to blurring of the edges. This system not only reduces the noise of the image but also preserves the details of the image as much as possible. Through the denoising method proposed in this paper, the denoising of X-ray images can be achieved, which not only reduces the noise of X-ray images but also attributes to modify the accuracy of diagnosis and reduce the reading differences.