Median Filter for Denoising MRI

Median Filter for Denoising MRI

Chalghoumi SabrineSmiti Abir

BADEM, University of Tunis, Tunis 1007, Tunisia

LARODEC, University of Tunis, Tunis 1007, Tunisia

Corresponding Author Email: 
chalghoumisabrine@yahoo.fr
Page: 
483-488
|
DOI: 
https://doi.org/10.18280/ria.360317
Received: 
10 January 2022
|
Revised: 
10 April 2022
|
Accepted: 
15 April 2022
|
Available online: 
30 June 2022
| Citation

© 2022 IIETA. This article is published by IIETA and is licensed under the CC BY 4.0 license (http://creativecommons.org/licenses/by/4.0/).

OPEN ACCESS

Abstract: 

Medical imaging plays an essential role in diverse medical diagnosis processes and can be used to recognise an early detection of Alzheimer's disease. Medical image segmentation helps us to pull out precious knowledge from a large quantity of medical image data. For better image segmentation, further phases must be processed in order to succeed in reading medical images clearly and to extract the exact stage of Alzheimer's disease. Such a step, reducing noise from MRI. Gaussian noise and Salt and pepper noise are examples of noises present in images. There are many denoising techniques, like the filtering domain and especially the median filter that proves its effectiveness in reducing the Salt and pepper noise. In this paper, we propose an extension work of the median filter method. In this paper noisy pixels are detected using the occurrence of intensity values 0’s and 255’s and uses 3x3 size windows to have better information about the center neighbors. Tested on noise in the range 20% to 80% and applied on Magnetic Resonance Imaging data set from the Alzheimer's disease Neuroimaging Initiative database. The results demonstrate the effectiveness of our algorithm compared to the standard and other improvements.

Keywords: 

Alzheimer's disease, ADNI, MRI, denoising, salt and pepper noise, median filter

1. Introduction

The most important challenges in the medical domain are the analysis of biomedical data or medical images, detection or diagnostic of certain diseases as well as the extraction of understandable knowledge and patterns from medical imaging or diagnosis data [1] because such objects may be too complicated to be represented correctly by a simple equation [2].

Among the evolutive medical studies nowadays, we can mention the Alzheimer's disease which is the disease of the century. It is an irreversible, progressive brain disorder characterized the loss of cognitive and thinking functioning, remembering, reasoning, and behavioral abilities. It slowly destroys memory, thinking skills, and eventually the ability to carry out the simplest tasks. It is therefore imperative to detect this disorder at the earliest stage possible so that their progression can be slowed down.

Medical imaging plays an essential role in diverse medical diagnosis processes and has an important role in understanding brain functionalities and its disorders during the last couple of decades. Some often used ones include Positron Emission Tomography (PET) [3], Magnetic Resonance Imaging (MRI), Cerebro-spinal Fluid (CSF), Single-Photon Emission Computed Tomography (SPECT) and Computerized Tomography (CT scans) [4].

MRI is based on the physical and chemical principles of Nuclear Magnetic Resonance (NMR), a technique used to gain information about the nature of molecules.

The MRI scans, supported by high-performance computational tools, have opened up possibilities to early identify neurological disorders and more precisely Alzheimer disease.

Medical image segmentation helps us to pull out precious knowledge from a large quantity of medical image data. It deals with categorizing the pixels of an image, grouping each medical image into different regions with diverse characteristics and selects useful facts for future decisions.

For better image segmentation, further phases must be processed in order to succeed in reading medical images clearly and to extract important knowledge from this sort of images like the exact stage of Alzheimer's disease with MRI. Such as removing or reducing noise. Noise can be seen as a phenomenon in data which is not of interest to the analyst however it acts as an obstacle for data analysis [5]. Noises are undesired effects on images. It degrades the true identity of the image and determines effects like unknown dots, unseen lines, blurred corners, etc. [6]. The MRI noise has various origins such as noise from stochastic variation, various physiological processes, eddy currents, rigid body motion, nonrigid motion.

In recent years, the evaluations of noise removal techniques in medical imaging have become advanced, analytic and complicated. Noise removal techniques express the need to reject unwanted objects before any data analysis is made. Gaussian noise and Salt-and-pepper noise are examples of noises that can be present in images. During the denoising of MRI images, precise details of the image and its parameters should not get affected by the noise removal procedure. A perfect denoising technique should be capable to remove the noise while conserving the quality of the image.

There are many denoising techniques, like the filtering domain and especially the median filter where numerous surveys [6-9] are done on MRI and prove its effectiveness in reducing mainly the Salt and pepper noise, keeping sharp edges and avoiding blurring the image.

In this work we propose an improvement of the median filter. Tested on Salt and pepper noise and applied on MRI data set from the Alzheimer's disease Neuroimaging Initiative (ADNI) database. ADNI data includes Alzheimer's disease patients, mild cognitive impairment subjects and elderly controls.

2. The Standard Median Filter Algorithm

This section presents a brief presentation of the standard median filtering algorithm.

The median filtering is a non-linear spatial filtering technique and known as order-statistic filtering in digital image processing.

It replaces the value of the center pixel by the median of the grey levels in the neighborhood of the pixel. Due to this tendency of median filter the good pixels cell is replaced by the corrupted ones.

The median filter doesn't require convolution. However, it requires sorting the values in the image area to find the median value and this can be achieved by repeating the above method for every pixel in the image.

The advantage of this filter is that it preserves sharp edges and avoids blurring the image [6, 9, 10].

The algorithm of the standard median filter is the following:

Figure 1 represents an illustration of the standard median filter using 3*3 filter mask. The pixel at the center with intensity value 50 will be replaced with the median of the nine numbers in the matrix which is 97.

Figure 1. Example of median filtering using 3*3 filter mask

An essential shortcoming of the median filter is that the replaced centre value is not tested to find out if it is an impulse or not (noisy point). Therefore, if it is a fine pixel of the image then it is removed uselessly. Also, the median filter doesn't perform well when the intensity of the noise is high.

3. State of the Art

In this section, we discuss some proposed works in order to improve the standard median filter algorithm.

In 2011, Gupta [11] proposed a new method which is based on choosing a window size 3*3 and centring it around the processed pixel P(x, y) in the corrupted image. Proposing more than one criteria to judge if the centre pixel is corrupted by Salt and pepper noise or not. This proposed median filter is compared with the mean and the standard median filter. Even if it demands lower processing time, this improvement has a high PSNR (better image quality) for only noise density that is equal to or higher than 60% compared to the standard median filter.

Deivalakshmi et al. [12] firstly proposed a new method for detecting noise. Pixels will be defined into two groups: noisy pixel and informative pixel. Secondly, the suggestion of the median filter. If there is informative pixel into the selected mask, p will be replaced by the median of the pixels in the window, otherwise, repeat the above process with a 5*5 mask. All the previous steps are repeated if there is still noise. The proposed method presents better image restoration, but, the threshold (fixed while the decision of the type of the pixel) can be a restraint on the minimum number of noisy pixels in the neighborhood so that the pixel might not be considered as noise.

In 2012, Zhu and Huang [13] suggested an improved median filter by combining the mean filter (it is a linear filter that replaces the center pixel of a selected window by the mean value of the mask) and the standard median filter.

This method is constructed by first, testing if a pixel is noise or not. Second, comparing each pixel's value to see if it is greater than the average value in the window, then the pixel will be replaced with the median value of the mask; otherwise, it keeps the original value of the pixel unchanged. When the real pixel's value is replaced with the median value in the window, the following process average's value computation will use the new value of the pixel which will make this process iterative. The improvement decreases the time complexity and improves the noise-reducing effect better. Higher than 45% noise density, peak signal to noise ratio (PSNR) for the standard median filtering aren't mentioned, we can't decide if the proposed method has better results for this density.

Boateng et al. [14] proposed other criteria to judge if a pixel is noisy or normal. Compared to the standard median filter, this method performs well essentially in Salt-and-pepper noise. Noise density higher than 60% isn't studied or showed in this work.

Wen et al. [15] proposed an improved median filtering algorithm adding criteria while the noise is quite dense, the pixel positioned in the middle of the extremum value can be a noisy point too. Here comes the author's contribution, adding other criteria. Also, the image edge minutiae point can be located on both ends of the sequence. The emission rate will be higher when the signal to noise rate is high. This article has given a second condition for noise detection. Even if this improvement, has better PSNR for noise that is less than 25%, it isn't tested for high noise density.

Mahajan and Jain [16] also suggested an improvement of the median filter by proposing criteria to discuss if a certain pixel is noisy.

This proposed method is compared with the standard median filter. It shows higher parametric values.

All the mentioned improvements propose a better image quality compared to the standard median filter. However, they suffer from some drawbacks, essentially when a high noise density is not taken into consideration.

4. Proposed Median Filter

A major shortcoming of the median filter is that its output is always constrained, by definition, to be the median value in the window. Various works tried to reduce this poor performance. On the other hand, the median filter doesn't work well when the density of Salt and pepper noise is high, as a result, the noise still persists.

Our contribution will be concentrated on these two drawbacks and will be applied on Alzheimer’s disease database of MRI while the Salt and pepper noise is added and tested on several intensities.

Our improved method begins from the first image's pixel and applies the technique by dividing the entire image into n*n window. When the window size is as small as possible, we have better information about the center neighbors.

Our improved median technique is applied to a fixed 3*3 window for the processing of the two-dimensional images.

Salt and pepper noise looks like very dark shots in bright regions and very bright shots in dark regions of the image.

The very bright shot appears in an image by converting few of the pixels in a dark region as 255, which is equals to the maximum value of an 8-bit 2D image.

Also converting some of the pixels to be very dark shots having the value of 0 (the minimum value) in the bright regions.

  • Taking into consideration that Salt and pepper noise provides black and white dots in the image, every pixel value which is equal to 255 or 0 is considered as a noisy pixel.
  • Otherwise, the pixel is considered as a fine pixel.

When the test demonstrates that the center value isn't 255 nor 0 (fine pixel), it's left unchanged.

However, there can be noisy neighbours then the algorithm continues testing them and three cases appear:

  • Case 1.1: if all the neighbours' values aren't 255 or 0, then the window will be considered as a noise-free window and nothing is changed.
  • Case 1.2: if the neighbours' values are a combination of 0 and 255 and other values, then eliminate all 0's and 255's, replace them with the mean of the other values. The mean value is taken to have the maximum similarity to the fine pixels in the same window.
  • Case 1.3: if the neighbour's values are all 255's or all 0's (without any other value), then all these noisy pixels will be replaced by a random value in this range [$\frac{\text { centre value }}{2}$, centre value].

The choice of $\frac{\text { centre value }}{2}$ can be explained by the way that we want to have a value that will by the nearer to the centre value.

In the second situation, when the centre value is a noisy pixel, equal to 255 or 0, three cases are mentioned in the first situation:

  • Case 2.1: if all the neighbours' values aren't 255's or 0's, that means that the only noisy pixel is the centre pixel P(x,y), it will be changed by the median value of the window (sorted in ascending order). Here the centre pixel is replaced by the median value of the window as the standard median filter.
  • Case 2.2: if the neighbours' values are a combination of 0 and 255 and other values, then each noisy pixel will be replaced by the median value of the sorted window. In order to get a noise-free window, every noisy neighbour is replaced by the median value to get closer value to fine pixels.
  • Case 2.3: if the neighbour's values are all only 255's or all 0's, then replace the centre pixel P(x,y) by the minimum value in the window.

Dealing with the center pixel, the standard median filter will change this pixel by the median value without even judging if it is a noisy pixel or not.

Also, without testing its neighbours in the window.

The principal difference in the implementation of the standard median filter algorithm and our proposed method: the standard median filter replaces just the center pixel in the window without even checking if it is a noisy pixel or not.

But in our contribution, any pixel polluted by impulse noise will be replaced even if the center value isn’t 255 nor 0. Every change of a noisy pixel tries to eliminate the maximum noise. Moreover, replace every pixel affected by noise with a value that will be close to fine pixels in the mask.

5. Experimentation

In order to test the performance of the proposed algorithm, experiments were conducted on subsets of 58 MRI extracted from the Alzheimer's Disease Neuroimaging Initiative (ADNI) database (http://adni.loni.usc.edu/).

While the MRIs are 3D images, we choose to extract a slice for every MRI with the use of MATLAB R20108a platform.

The following algorithm is our improvement median filter. Salt and pepper noise is introduced to every image starting from 20% to 80% noise density.

The standard median filter, the improvements mentioned in the state-of-the-art part and our contribution are applied to the corrupted images by impulse noise. The outcome of the performances of the filtering operations is shown by the output of the images shown below.

Figures 2, 3 and 4 show the result after adding 20%, 50% and 80% noise density. Algo1, Algo2, Algo3, Algo4, Algo5 and Algo6 are respectively the improvements of [11-16].

Figure 2. 20% noise density

Figure 3. 50% noise density

Figure 4. 80% noise density

The picture quality obtained from the application of our improved median filter algorithm on MRI with different noise levels shows that the proposed filter is superior in terms of filtering Salt and pepper noise.

Comparing the results of our improved median filtering, the standard median filter and the state of art improvement algorithms using peak signal to noise ratio (PSNR) which is the most generally used parameter in measuring the de-noising effect. It is the proportion between the maximum possible power of a signal and the power of corrupting noise that affects the fidelity of its representation.

PSNR is a criterion used to measure the performance of various digital filtering techniques quantitatively.

It is defined in [12] as:

$\mathrm{PSNR}=10 \log _{10}\left(\frac{255^{2}}{M S E}\right)$

where, MSE has this equation:

$\mathrm{MSE}=\frac{1}{M N} \sum_{i=1}^{M-1} \sum_{j=0}^{N-1}[I(i, j)-K(i, j)]^{2}$

where, I and K are original and denoised images of size M and N, respectively.

PSNR is the most generally used parameter in measuring the de-noising effect. It is a criterion used to measure the performance of various digital filtering techniques quantitatively.

Higher PSNR translates better image quality.

The average of PSNR of our 58 images is considered.

The simulation results for PSNR are show in Tables 1 and 2.

Table 1. Average of peak signal-to-noise ratio (PSNR) of noise from 20% to 50%

Filter method

20% noise

30% noise

40% noise

50% noise

Standard median filter

28.0781

22.3932

17.5711

13.7909

ALGO1[11]

17.1540

15.5943

14.4584

13.5385

ALGO1[12]

25.8064

15.5943

14.4584

13.5385

ALGO1[13]

17.0401

15.4884

14.3898

13.4773

ALGO1[14]

15.4360

15.4167

16.5937

16.4341

ALGO1[15]

19.7880

17.4581

15.5851

14.0810

ALGO1[16]

15.5200

15.8468

16.9113

14.2448

Our contribution

26.474

25.4422

23.7905

22.2014

Table 2. Average of peak signal-to-noise ratio (PSNR) of noise from 60% to 80%

Filter method

60% noise

70% noise

80% noise

Standard median filter

10.8389

8.5093

6.06096

ALGO1[11]

12.6083

11.5745

10.2491

ALGO1[12]

20.1709

18.6927

16.7140

ALGO1[13]

12.5792

11.5522

10.2348

ALGO1[14]

14.7146

10.0021

7.8326

ALGO1[15]

12.6696

11.4621

10.3213

ALGO1[16]

12.4698

10.9983

10.4994

Our contribution

20.825

19.273

17.6224

The improved median filter is tested on the MATLAB platform with a 3*3 fixed window.

The results obtained from the peak signal to noise ratio (PSNR) computations show that at low to moderate and noise levels, the performance of our improved median filtering algorithm stands out.

When the noise density is high, the standard median filter doesn't perform well. Which is explained by the obtained results.

 When an MRI is affected by 20% noise density, the standard median filter has 28,0781 as a PSNR value which represents the highest value for this level.

However, at 60%, 70% and 80% noise density, the standard median filter has the lowest values which prove its drawback.

Compared to the stat of the art works and the standard median filter, our improvement filter achieves better results to noise density from 30% to 80% which is our central goal. It attains 17.6224 as a PSNR for 80% noise density which holds the highest value.

6. Conclusions

The MRI is often corrupted by Salt and pepper noise which has various origins such as noise from stochastic variation or various physiological processes. In order to reduce Salt and pepper noise and improve the medical image quality, we have studied the median filter and have proposed a method based on an improved median filtering algorithm. Our improved median filter has been applied to MRI extracted from the ADNI database. Experimental results indicate that the proposed algorithm works better than the standard median filter itself and the mentioned improvements when the Salt and pepper noise is present. Comparisons of results using PSNR indicate that our proposition attains better results than the related works.

Nomenclature

PSNR

Peak Signal to Noise Ratio

ADNI

Alzheimer's Disease Neuroimaging Initiative (ADNI)

PET

Positron Emission Tomography

CSF

Cerebro-Spinal Fluid

MRI

Magnetic Resonance Imaging

SPECT

Single-Photon Emission Computed Tomography

CT

Computerized Tomography

  References

[1] Nithya, N., Duraiswamy, K., Gomathy, P. (2013). A survey on clustering techniques in medical diagnosis. International Journal of Computer Science Trends and Technology (IJCST), 1(2): 17-23.

[2] Suzuki, K. (2012). Pixel-based machine learning in medical imaging. International Journal of Biomedical Imaging, 2012: 792079. https://doi.org/10.1155/2012/792079

[3] Cai, W., Feng, D., Fulton, R. (2000). Content-based retrieval of dynamic PET functional images. IEEE Transactions on Information Technology in Biomedicine, 4(2): 152-158. https://doi.org/10.1109/4233.845208

[4] Kumar, S.S., Nandhini, M. (2017). A comprehensive survey: Early detection of Alzheimer’s disease using different techniques and approaches. International Journal of Computer Engineering & Technology, 8(4): 31-44.

[5] Singh, K., Upadhyaya, S. (2012). Outlier detection: Applications and techniques. International Journal of Computer Science Issues (IJCSI), 9(1): 307.

[6] Chauhan, N., Choi, B.J. (2018). Performance analysis of denoising algorithms for human brain image. International Journal of Fuzzy Logic and Intelligent Systems, 18(3): 175-181. https://doi.org/10.5391/IJFIS.2018.18.3.175

[7] Nair, P.C., Suganthi, G. (2013). Comparative analysis of various denoising techniques for MRI images. International Journal of Science and Research (IJSR), 4(8): 2319-7064.

[8] Isa, I.S., Sulaiman, S.N., Mustapha, M., Darus, S. (2015). Evaluating denoising performances of fundamental filters for T2-weighted MRI images. Procedia Computer Science, 60: 760-768. https://doi.org/10.5772/intechopen.72427

[9] Kumar, N., Nachamai, M. (2017). Noise removal and filtering techniques used in medical images. Orient J. Comp. Sci and Technol, 10(1): 146-153. http://dx.doi.org/10.13005/ojcst/10.01.14

[10] Rao, C.R., Kumar, M.N.V.S.S.,Rao, G.S.B. (2018). Investigation of optimal denoising filter for MRI images. International Journal of Applied Engineering Research, 13(15): 12264-12271. https://www.ripublication.com/ijaer18/ijaerv13n15_78.pdf.

[11] Gupta, G. (2011). Algorithm for image processing using improved median filter and comparison of mean, median and improved median filter. International Journal of Soft Computing and Engineering (IJSCE), 1(5): 304-311. https://www.ijsce.org/wp-content/uploads/papers/v1i5/E0234101511.pdf.

[12] Deivalakshmi, S., Sarath, S., Palanisamy, P. (2011). Detection and removal of salt and pepper noise in images by improved median filter. In 2011 IEEE Recent Advances in Intelligent Computational Systems, pp. 363-368.

[13] Zhu, Y., Huang, C. (2012). An improved median filtering algorithm for image noise reduction. Physics Procedia, 25: 609-616. https://doi.org/10.1016/j.phpro.2012.03.133

[14] Boateng, K.O., Asubam, B.W., Laar, D.S. (2012). Improving the effectiveness of the median filter. International Journal of Electronics and Communication Engineering, 5(1): 85-97.

[15] Wen, X., Deng, Z., Xue, H. (2016). An improved median filtering image de-noising algorithm. https://doi.org/10.21311/001.39.5.38

[16] Mahajan, M.P., Jain, S.N. (2016). Using median filter systems for removal of high density noise from images, International Journal of Engineering Research and General Science, 4(1): 262-272.