X-ray image denoising based on wavelet transform and median filter

Hanlei Dong 1 , Liguo Zhao 1 , Yunxing Shu 1 , and Neal N. Xiong 2
  • 1 Department of Computer and Information Engineering, Luoyang Institute of Science and Technology, Luoyang, China
  • 2 Department of Mathematics and Computer Science, Northeastern State University, USA
Hanlei Dong
  • Department of Computer and Information Engineering, Luoyang Institute of Science and Technology, Luoyang, 471023, China
  • Search for other articles:
  • degruyter.comGoogle Scholar
, Liguo Zhao
  • Corresponding author
  • Department of Computer and Information Engineering, Luoyang Institute of Science and Technology, Luoyang, 471023, China
  • Email
  • Search for other articles:
  • degruyter.comGoogle Scholar
, Yunxing Shu
  • Department of Computer and Information Engineering, Luoyang Institute of Science and Technology, Luoyang, 471023, China
  • Search for other articles:
  • degruyter.comGoogle Scholar
and Neal N. Xiong
  • Department of Mathematics and Computer Science, Northeastern State University, USA
  • Search for other articles:
  • degruyter.comGoogle Scholar

Abstract

This paper mainly proposed and researched based on wavelet transform, and then used the X-map denoising technique of value filter. In other words, the value image was filtered in the spatial domain, and the value filtering was used as the standard pulse (salt) noise, also used as in the wavelet domain. After the filtered image was decomposed by biorthogonal double wavelet transform, a wavelet coefficient matrix was generated, and a soft threshold quantisation process was performed on the wavelet coefficients to produce a new wavelet coefficient matrix. In the end, they used a new wavelet coefficient matrix for image reconstruction. The processing resulted that the denoising method proposed in this paper showed that the X image can be denoised, which not only reduced the X-picture-like noise but also preserved the X-picture-like details as much as possible. It also helped to enhance diagnostic accuracy and reduced the difference in reading.

1 Introduction

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.

2 The basic theory of median filtering and its application

2.1 The essential theory of median filtering technology

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 x1, x2, x3,..., xn, ordering the n numbers in the sequence as xi1xi2xi3≦...≦ xin according to the order of the value, there are:
y=Med{x1,x2,x3,xn}={xi(n+12)Whennisanoddnumber12[xi(n2)+xi(n+12)]Whennisanevennumber
where y was called the median of the sequences x1, x2, x3,..., xn.
Set the input sequence as {xi, iI}, I is a natural number set or subset, the window length is n, and the filter output is:
yi=Med{xi}=Med{xiu,,xi,xi+u}
where iI, u = (n - 1)/2.

2.2 The application of median filtering technology

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].

Fig. 1
Fig. 1

Comparison of the salt and pepper noise in filtering images by median filtering.

Citation: Applied Mathematics and Nonlinear Sciences 5, 2; 10.2478/amns.2020.2.00062

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.

3 Image denoising wavelet selection

3.1 Wavelet threshold shrinkage method

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 σ2logN , where σ is the normal deviation of the noise signal (the strength of the noise), and N measures the length of the signal.

3.2 Algorithm description of wavelet threshold shrinkage method

The wavelet threshold shrinkage method for denoising is composed of the following three steps:

  1. (1)Calculating the orthonormal wavelet transform of the noisy signal.
  2. (2)Non-linear thresholding of wavelet coefficients. To keep the overall shape of the signal unchanged, retain all low-frequency coefficients vL,k, k = 1, . . . , 2L. Take the threshold value λ=σ2logN , for each wavelet coefficient, use the soft threshold method or hard threshold method for processing:
    • Soft threshold: w˜j,k={wj,kλwj,kλ0|wj,k|<λwj,k+λwj,kλ
    • Hard threshold: w˜j,k={wj,k|wj,k|λ0|wj,k|<λ
  3. 3)Performing inverse wavelet transform. Since the noise is mainly concentrated in the highest resolution level J - 1, so we can use the wavelet coefficients {wJ−1,k, k = 1, 2, . . . , 2J−1}to estimate the noise standard deviation, for example take σ˜=mediank=1,,2J1(|wJ1,k|)/0.6745 .

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.

4 Image denoising combining median filtering and wavelet denoising

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:
g(m,n)=Med{f1u,,fi,,fi+u}iZ,u=m12

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 N) and perform an N-layer decomposition calculation on the 2D X-ray image signal to be analysed. A 3.3 biorthogonal wavelet was chosen and the number of decomposition layers N was chosen to be 3.

What is shown in the Figure 2 is the result of the image after three-layer wavelet decomposition, where WLL3 is the low-frequency part of the image and focused on its main part of the energy. WHLK (k=1,2,3) is the horizontal element, WLHK (k=1,2,3) is the vertical element, WHHK (k=1,2,3) is the diagonal element, and these three elements are the details of the image [9]. For every layer of decomposition, select an appropriate threshold, and threshold the high-frequency coefficients of this layer. According to the Donoho threshold, the threshold value λk of the wavelet coefficient for each layer is calculated by the formula (1), where σk is the noise standard deviation, N is the number of original image pixels [10]. The calculation method of λk is as follows:
λk=σk2lnNk=(1,2,3)σk=Median(|Wij|)0.6745,WijsubbandWHHk,k=(1,2,3)
Fig. 2
Fig. 2

Diagram of image wavelet decomposition.

Citation: Applied Mathematics and Nonlinear Sciences 5, 2; 10.2478/amns.2020.2.00062

For the threshold, we choose the soft threshold method.
w˜j,k={wj,kλwj,kλ0|wj,k|<λwj,k+λwj,kλ
is a soft threshold function.

Then, following the N-th layer approximation (low-frequency coefficients) after wavelet decomposition and the details of the layers after the threshold quantization (high-frequency coefficients), calculate the wavelet reconstruction of the two-dimensional signal [11,12,13,14,15].

5 Experimental results and analysis

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.

Fig. 3
Fig. 3

Compare the filtering effect.

Citation: Applied Mathematics and Nonlinear Sciences 5, 2; 10.2478/amns.2020.2.00062

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:
MSE=1M×Ni=0M1j=0N1[f(i,j)f(i,j)]2
The restored image after processing and original image, respectively, the image size is M × N. The expression of Peak Signal to Noise Ratio (PSNR) is:
PSNR=10logQ21M×Ni=0M1j=0N1[f(i,j)f(i,j)]2(dB)
where Q represents the quantitative level, and here Q takes 255. As a measure of the filter performance, the larger the PSNR, the better the effect of filtering out the noise.

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.

Table 1

Experimental results of the denoising of the FEI image with mixed noise by different algorithms (MSE/PSNR).

Impulse (salt and pepper) noise0.050.10.20.050.10.2
Gaussian white noise0.010.010.010.020.020.02
Noise image1562.134/16.00522442.991/14.07614312.669/11.65692142.309/14.66743026.395/13.20024744.419/11.2596
Median filtering algorithm557.8286/20.4483580.9237/20.2745597.7874/20.11841031.996/17.80281061.468/17.66011061.973/17.6579
VisuShrink soft threshold method265.7028/23.6036356.5844/22.3437575.4486/20.6593283.8094/23.3212369.1374/22.1506515.6530/20.7221
Algorithm of this paper144.3706/26.2155145.5194/26.1817160.3172/25.7669212.1041/24.5683215.3995/24.5023227.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.

Acknowledgement:

This article is supported by the Science and Technology Research Fund (Grant: 192102210249) of Henan Science and Technology Department. It is also supported by the Foundation of Henan Educational Committee under Contract No. 19A120009 and No. 19B510007.

References

  • [1]

    B.C. Li, T.Q. Peng, Z. Peng, Intelligent image processing technology, Beijing: Electronic industry press, 2014.

  • [2]

    J. Astola, Fundamentals of nonlinear digital filtering, Boca Raton, U.S.A: CRC Press, 2017.

  • [3]

    Y.L. You, D. Kaveh, Fourth-order partial differential equations for noise removal, IEEE Trans. Image Processing 9 (2016) 1723–1730.

  • [4]

    J.Z. Wang, Image-Denoising Method Based on Daubechies Wavelet Transform and Median Filter, Journal of Wuhan Univertisy of Technology 23 (2015) 19–25.

  • [5]

    J.S. Walker, Y.J. Chen, Image denoising using tree-based wavelet subband correlation and shrinkage, Optical Engineering 39 (2016) 715–836.

  • [6]

    Z.L. Zhang, C.H. Zhao, X.D. Mei, The modern image processing technology and MATLAB, Beijing: People's posts and telecommunications publishing house 171 (2014).

  • [7]

    B.A. Thomas, J.J. Rodriguez, Wavelet-based color image denoising, IEEE International Conference on Image Processing Proceedings 2 (2017) 804–807.

  • [8]

    H.L. Eng, K.K. Ma, Noise Adaptive Soft-Switching Median Filter, IEEE Trans. Image Processing 10 (2015), 242–251.

  • [9]

    L.Z. Xia, J.X. Li, Digital image processing, Nanjing: Southeast university press (2018) 157–159.

  • [10]

    H.L. Li, Z.M. Zhang, Z.Q. Yi, The application of median filtering on image processing, Information Technology 28 (2015) 26–52.

  • [11]

    Q.Q. Ruan, Digital image processing. Beijing: Electronic industry press, 2016.

  • [12]

    A. Jalobeanu, L. Blanc-Feraud, J. Zerubia, Satellite image deconvolution using complex wavelet packets, IEEE International Conference on Image Processing Proceedings 3 (2017) 809–812.

  • [13]

    Z.Z. Zhen, P. Shen, X.H. Yang, Y.L. Wan, Wavelet transform and its application in the MATLAB tools, Beijing: Seismological Press, 2017.

  • [14]

    J.Y. Wang, X.G. Zhou, Q.Z. Liao, A Mixed Noise Filter Based on Median-Fuzzy Technology, Journal of Electronics & Information Technology 27 (2018) 901–904.

  • [15]

    H.X. Ni, Q.D. Hu, A Method of Image De-Noising Based on Wavelet Domain Median Filter, Journal of Dalian Railway Institute 27 (2016) 35–38.

  • [16]

    Patidar S, Pachori R B, Garg N. Automatic diagnosis of septal defects based on tunable- Q, wavelet transform of cardiac sound signals [J]. Expert Systems with Applications, 2015, 42(7):3315–3326.

    • Crossref
    • Export Citation
  • [17]

    Cao J, Zhang J, Wen Z, et al. Fabric defect inspection using prior knowledge guided least squares regression [J]. Multimedia Tools & Applications, 2017, 76(3):4141–4157.

    • Crossref
    • Export Citation
  • [18]

    Ayad M, Chikouche D, Boukazzoula N, et al. Search of a robust defect signature in gear systems across adaptive Morlet wavelet of vibration signals [J]. Signal Processing Iet, 2014, 8(9):918–926.

    • Crossref
    • Export Citation
  • [19]

    Hu G H, Zhang G H, Wang Q H. Unsupervised defect detection in textiles based on Fourier analysis and wavelet shrinkage [J]. Applied Optics, 2015, 54(10):2963–80.

    • Crossref
    • PubMed
    • Export Citation
  • [20]

    Havale V, Narayanan S. Diagnosis of manufacturing defects in a gear pair using wavelet analysis of vibration and acoustic signals and an ANN-based inference technique [J]. Insight - Non-Destructive Testing and Condition Monitoring, 2014, 56(8):426–433(8).

    • Crossref
    • Export Citation

If the inline PDF is not rendering correctly, you can download the PDF file here.

  • [1]

    B.C. Li, T.Q. Peng, Z. Peng, Intelligent image processing technology, Beijing: Electronic industry press, 2014.

  • [2]

    J. Astola, Fundamentals of nonlinear digital filtering, Boca Raton, U.S.A: CRC Press, 2017.

  • [3]

    Y.L. You, D. Kaveh, Fourth-order partial differential equations for noise removal, IEEE Trans. Image Processing 9 (2016) 1723–1730.

  • [4]

    J.Z. Wang, Image-Denoising Method Based on Daubechies Wavelet Transform and Median Filter, Journal of Wuhan Univertisy of Technology 23 (2015) 19–25.

  • [5]

    J.S. Walker, Y.J. Chen, Image denoising using tree-based wavelet subband correlation and shrinkage, Optical Engineering 39 (2016) 715–836.

  • [6]

    Z.L. Zhang, C.H. Zhao, X.D. Mei, The modern image processing technology and MATLAB, Beijing: People's posts and telecommunications publishing house 171 (2014).

  • [7]

    B.A. Thomas, J.J. Rodriguez, Wavelet-based color image denoising, IEEE International Conference on Image Processing Proceedings 2 (2017) 804–807.

  • [8]

    H.L. Eng, K.K. Ma, Noise Adaptive Soft-Switching Median Filter, IEEE Trans. Image Processing 10 (2015), 242–251.

  • [9]

    L.Z. Xia, J.X. Li, Digital image processing, Nanjing: Southeast university press (2018) 157–159.

  • [10]

    H.L. Li, Z.M. Zhang, Z.Q. Yi, The application of median filtering on image processing, Information Technology 28 (2015) 26–52.

  • [11]

    Q.Q. Ruan, Digital image processing. Beijing: Electronic industry press, 2016.

  • [12]

    A. Jalobeanu, L. Blanc-Feraud, J. Zerubia, Satellite image deconvolution using complex wavelet packets, IEEE International Conference on Image Processing Proceedings 3 (2017) 809–812.

  • [13]

    Z.Z. Zhen, P. Shen, X.H. Yang, Y.L. Wan, Wavelet transform and its application in the MATLAB tools, Beijing: Seismological Press, 2017.

  • [14]

    J.Y. Wang, X.G. Zhou, Q.Z. Liao, A Mixed Noise Filter Based on Median-Fuzzy Technology, Journal of Electronics & Information Technology 27 (2018) 901–904.

  • [15]

    H.X. Ni, Q.D. Hu, A Method of Image De-Noising Based on Wavelet Domain Median Filter, Journal of Dalian Railway Institute 27 (2016) 35–38.

  • [16]

    Patidar S, Pachori R B, Garg N. Automatic diagnosis of septal defects based on tunable- Q, wavelet transform of cardiac sound signals [J]. Expert Systems with Applications, 2015, 42(7):3315–3326.

    • Crossref
    • Export Citation
  • [17]

    Cao J, Zhang J, Wen Z, et al. Fabric defect inspection using prior knowledge guided least squares regression [J]. Multimedia Tools & Applications, 2017, 76(3):4141–4157.

    • Crossref
    • Export Citation
  • [18]

    Ayad M, Chikouche D, Boukazzoula N, et al. Search of a robust defect signature in gear systems across adaptive Morlet wavelet of vibration signals [J]. Signal Processing Iet, 2014, 8(9):918–926.

    • Crossref
    • Export Citation
  • [19]

    Hu G H, Zhang G H, Wang Q H. Unsupervised defect detection in textiles based on Fourier analysis and wavelet shrinkage [J]. Applied Optics, 2015, 54(10):2963–80.

    • Crossref
    • PubMed
    • Export Citation
  • [20]

    Havale V, Narayanan S. Diagnosis of manufacturing defects in a gear pair using wavelet analysis of vibration and acoustic signals and an ANN-based inference technique [J]. Insight - Non-Destructive Testing and Condition Monitoring, 2014, 56(8):426–433(8).

    • Crossref
    • Export Citation
OPEN ACCESS

Journal + Issues

Search