Comparative analysis of Median filter family for Removing High-Density Noise in Magnetic Resonance Images

Magnetic Resonance Imaging (MRI) is a medical indicative test utilized for taking images of the tissue points of interest of the human body. During image acquisition, MRI images can be damaged by many noise signals such as impulse noise. One reason for this noise may be a sharp or sudden disturbance in the image signal. The removal of impulse noise is one of the real difficulties. As of late, numerous image de-noising methods were produced for removing the impulse noise from images. Comparative analysis of known and modern methods of median filter family is presented in this paper. These filters can be categorized as follows: Standard Median Filter; Adaptive Median Filter; Progressive Switching Median Filter; Noise Adaptive Fuzzy Switching Median Filter; and Different Applied Median Filter. The de-noising technique performance for each one is evaluated and compared using Peak Signal Noise Ratio, Structural Similarity index Metric, and Beta metric as quantitative metrics. The experimental results showed that the latest de-noising technique, Different Applied Median Filter (DAMF), produced better results in removing impulse noise compared with the other de-noising techniques. However, this filter produced de-noised image with nonlinear edges in high-density noise. As a result, noise removal from images is one of the low-level images processing which is considered as a first step in many image applications. Therefore, the efficiency of any image processed depends on the efficiency of noise removal technique.


Introduction
Magnetic resonance images show the tissue and organ images of the body of human with exceptionally precise points of interest. These images can be degraded by noise during the capturing process and transmission. In this case, the MRI image quality is very important in the precision of clinical analysis. Noise affects both the process of medical diagnosis and prior computerized analysis such as image segmentation, classification, image reconstruction, and image fusion [1]. The source images can be corrupted by different noises. The most prevalent noises are impulse noise and Gaussian noise. Zero mean and limited variance are the parameters of Gaussian noise which is considered as white additive noise with having Gaussian distribution. At the point when images are recorded and transmitted fastly, a few pixels are composed arbitrarily as white and dark pixels. This noise is named Salt and pepper noise [2,3].
As of late, a median filter is generally utilized in image de-noising, particularly for impulse noise. The most popular filter is the Standard Median Filter (SMF) which is used for reducing noise in debased images because of its straightforwardness and viability. SMF treats every pixel in an image as an insider for the neighboring pixels encompassing that pixel. The values of neighborhood are arranged from small to larger values using a sliding window system. The median value is supplanted with the original pixel value. The final de-noised image is obtained by repeating this process for all pixels in the original image. Impulse noise can be either fixed-valued or irregular-valued. Fixedvalued noise spoils the image by supplanting original pixel values with zero (dark) and 255 (light). While for irregular-valued noise spoils the image by supplanting the original pixel values with arbitrary qualities somewhere in the range of 0 and 255. SMF can be utilized to remove noises, which have fixed qualities. For arbitrary-valued noise, the noise values are consistently conveyed somewhere in the range of 0 and 255 in tainted image pixels. Therefore, using SMF for removing random-valued noise is quite difficult than the removal of fixed-valued noise. Darus et al. proposed in [4] a hybrid median filter for noise removal using the sliding window mechanism. This filter treats certain pixels rather than a single pixel. To supplant the objective pixel with the best value, the certain pixels are compared against another pixel within the window. This process is repeated for all image pixels. The switching filter is a popular method for impulse noise removal. It uses two main steps, which are noise detection and filter design. When the image is highly corrupted with noise, the switching filter faces miss-detection and uncertainty problems. These problems were addressed using the theory of belief functions and evidential reasoning, which is used to discover the impulse noisy pixels. The noisy images are filtered by using an adaptive switching median filter [5].
To reduce impulse noise, image de-noising technique was proposed. This technique used a trimmed global mean filter with rank order absolute differences in the proposed method. At the first step, the differences of rank ordered absolute is applied for the noisy pixels detection. At the second step, median filter is performed to remove noisy pixels. By using the window mechanism, the pixels that are presented in the selected window are considered as noisy pixels. In this case, the filter of the trimmed global mean is applied in order to remove the noisy pixels [6].
Adaptive Weighted Switching Median was proposed to reduce high-density noise from the corrupted image. This filter has two stages; the first stage contains the detection of impulse noises using decision criteria while in the second stage the AMF is performed on the corrupted pixels without changing the good pixels. In the window of filter, noisy pixels are supplanted by the weighted median of clean pixels [7].
Median filter was improved by computing the distance between the uncorrupted pixels and center pixels. This distance is used to determine the window size. This way helps to avoid the loss of pixels Habeeb Iraqi Journal of Science, 2019, Vol. 60, No. 10, pp: 2246-2256 2248 repeated sort in the window expansion process. The noisy pixel is replaced by the valid pixel in the window [8].
In general, the greatest challenge in each filter of removing noise from images is how to get the enhancement of image quality at the same time getting images with free-noise. The selection of the noise removing method is different depending on the amount and type of noise that the images are damaged .In addition, the implementation of the filter varies depending on the noise levels [9]. There is a trade-off between complexity and efficiency for de-noising algorithms. The filter algorithm with low complexity can remove noise at the expense of information and details of the image [10].

De-Noising Median based Filters
Restoration of an optimal image is based on noise model and noise detection. Many types of noise contaminate original images. The most popular noise was categorized into 1) Gaussian (additive). 2) Poisson. 3) Salt & pepper (white and black). 4) Speckle (multiplicative). There are many methods were proposed to solve the problem of image restoration. However, image restoration is still a challenging issue, because the restoration of the degraded image to the original image is inherently inaccurate so the search continues to find better and effective methods. Median filter is the most popular in removing noise from images [11].

Standard Median Filter
Standard Median Filter (SMF) is a nonlinear filter, which works on order statistics [12]. The main advantages of the median filter are its speed, computational simplicity, and capability of preserving image edges and details. Linear filter such as averaging filter, which has low pass features, removes additive noise effectively, but it fails in removing impulse noise. While the median filter has a special property, it can be used to remove additive noise because it has low pass features. Therefore, it can be used for additive noise and impulse noise removal. The one dimension of the median of n observations can be defined as follows [13]: Let , be n observations, the median filter with the size can be defined by: , is the output of the median filter, and is sample size. The two dimension of the median filter can be defined by: , , where ( is the image plane, is a filter window. The point (i, j) is image coordinates and is the filter window coordinates. SMF works on all pixels, on the corrupted and uncorrupted pixels. Although this filter works well in noises having a low-intensity by using a window with a small size (3x3). The shortages of SMF: when the intensities of noise become high, the resulted image suffers from blurring the edges and the original pixel values are distorted [14]. In addition, when the filter process becomes time consuming and more complex, the size of the image becomes large [9].

Adaptive Median Filter
In many applications, Adaptive Median Filter (AMF) is widely used because of its progress on SMF. In AMF, image pixels are separated into good pixels and noisy pixels. It uses a dynamic window size. AMF adjusts the size of window according to the amount of impulse noise. Advantages of this method are: low-density and high-density noises are reduced and image details are preserved [15]. AMF determines the pixels as noise by comparing each pixel to its window pixels. AMF adjusts both the size of the window and the threshold for the comparison. The AMF adjusts both the size of the window and the threshold for the purpose of comparison. If the pixel does not look like its neighbors, this is considered as a noisy pixel, which is replaced by the median of pixels in the window. Compared with the standard median filter, AMF works well when the noise has a high density, it removes impulse noise more accuracy with preserving image details and it smooths other noises. According to noise densities, AMF adjusts the window size adaptively.

Progressive Switching Median Filter (PSMF)
Impulse noise affects some pixels, while others remain clean. The median filter is performed uniformly across the image; it modifies both noise pixels and clean pixels. To solve this problem, switching median filter was proposed in [16]. Impulse detection algorithm, which detects and identifies the affected pixels by impulse noise signal, is executed before the filtering process. The results of this algorithm are used to modify the affected pixels. Figure-1 shows the switching median filter scheme. However, when a large number of impulse noise corrupts the image in different regions, many impulsive noises are hard to detect, so it is impossible to remove. This leads to the deformation of the image. Wang and Zhang presented a median based filter, which is called progressive switching median filter, where both noise detector and filter are performed progressively and repeatedly. In this method, noisy pixels in large noisy regions are detected and filtered. This produces better de-noising results for highly corrupted images [16].

Noise Adaptive Fuzzy Switching Median Filter (NAFSMF)
The previous median based filter, which is named "Progressive Switching Median Filter", suffers from high computational time because it uses the fixed size of the window. Adaptive Fuzzy Switching Median Filter [17] was presented for detection and removing the impulse noise. Two stages of this method contain: the histogram of the corrupted image is used to detect noise pixels, this is the first stage. In the second stage, the detected noisy pixels are filtered, while the clean pixels are retained without any processing then using fuzzy reasoning to fix uncertainty of the extracted local information. Fuzzy reasoning is used here to produce an accurate restoration of the detected noise pixels.

Different Applied Median Filter (DAMF)
Median based filters use either a fixed or adaptive window size. When images are corrupted with high-density noise, the window of fixed size is unsuccessful in the impulse noise removal from the image. Choosing a smaller window size for a high-density impulse noise causes all the pixels inside the window to become noisy. While choosing a larger window size leads to the loss of pixels that are near to the original pixels. In order to obtain the proper size of the window, adaptive window size is used. Adaptive median based filter works well in removing high-density impulse noise. However, the problem with this filter is when the window size becomes very large; this makes it difficult to find the original pixels. Recently, de-noising method for impulse noise removal was developed to solve this problem which is presented in [18]. In this method, the adaptive window with neighbor pixel values were used to search the pixel value that is near to the original pixel value and then the noisy pixels are determined. Finally, DAMF is achieved to take out the un-clean pixels.

Experimental Results and Discussion
This section provides the simulation results of the comparison performance of selected techniques in this paper, which are namely: SMF, AMF, PSMF, NAFSMF, and DAMF. These techniques are applied to three grayscale MRI images of size 512 512 (see Figure-2). Adding the salt and pepper noise to the source images is achieved with different noise variations ranged from to . Corruption of grayscale MRI image with this type of noise occurs with pepper noise nears to zero, and salt noise nears to 255. Three types of quantitative performance were used in order to test the performance of the selected methods. These metric can be categorized as follows: 1) Peek signal noise ratio (PSNR), 2) Structural Similarity index Metric (SSIM), and 3) Beta metric (β). All these metrics are full-reference metrics. PSNR between the original image and the noisy image ́ for the pixel located at row and column (x, y) can be computed by: PSNR measures the quality of reconstruction of de-noised image. The typical values of PSNR are between 30 and 40. The higher value of PSNR means higher the quality rate [19]. SSIM is based on statistical moments (mean, standard deviation and variance). SSIM can be computed by [13]: Where c1 and c2 are constant values. The result of SSIM takes values between -1 and 1. The value 1 indicates that the two images are identical. Beta metric ( ) is used as a measure to evaluate edge preservation and artifact formation, the beta metric can be defined by: Where represents the original image, ́ represent the de-noised image, ̅ pointed to the intensities mean for , and ̅ ́ indicated to the mean of pixel values for ́.
Lablacian filter to calculate the edges of the image. When the value of closes to 1 meaning that the edges well preserved during the de-noising process [20].

Experimental results on Img1
Figure-3 shows the noisy images for Img1 and the simulation results of the removal-noise techniques based on the median filter. The images are gotten by achieving the de-noising methods based on median filter with varies values of noise variance ranging from to . Table  1, Table-2, and Table-3 show the values of PSNR, SSIM, and Beta metric ( ) for measurement of the effectiveness of each filter from median filter family (SMF, AMF, PSMF, NAFSMF, and DAMF).   Table 3-Beta metric values that where obtained using de-noising filters employing the median filter family for Img1, with different variance of noise from 0.1 to 0.9 (Best result shown in bold). Figure-4 shows the noisy images for Img2 and the results of de-noising methods based on median filter. These images are obtained by performing the de-noising methods based on median filter with different noise-variance values ranging from to . Table-4, Table-5, and Table-6 Table 5-SSIM values that where obtained using de-noising filters employing the median filter family for Img2, with different variance of noise from 0.1 to 0.9 (Best result shown in bold.   Figure-5 shows the noisy images for Img3 and the aftereffects of de-noising techniques dependent on media in the filter. These images are obtained through the implementation of medium filter-based methods with different values of noise variation ranging from to . Table-7, Table-8, and Table-9 show PSNR, SSIM, and Beta metric values for measurement of the effectiveness of each filter from median filter family.   From Figures-(3, 4, and 5), we can see visually all the filters work well when the noise-density is small. Increasing the density of noise, especially when increasing the noise variance values greater than 0.5, the SMF and PSMF algorithms fail in noise removal because they used fixed window size. As we said earlier that when the image is corrupted with high noise density, the fixed window size fails in plucking out the noise from the image. The other filters used adaptive window size, so they produce better results than the above filters. From the above tables, PSNR, SSIM, and Beta metric produced better results for DAMF algorithm compared with other de-noising techniques. The strength of DAMF method lies in using neighbor pixels with an adaptive window to search for the pixel that is near to the original pixel and then the noisy pixels are detected. The adaptive filter used in DAMF algorithm is applied to remove the noisy pixels. NAFSMF and AMF sequentially come after DAMF in high values of the metrics. Figure-6 shows CPU time comparison of the median filter family algorithms. From the figure, we can see that the execution time vacillates between the high and low time (in second) for the de-noising algorithms except NAFSMF and DAMF algorithms. In these algorithms, the execution time increases linearly with each increase in the variance of noise. The figure also shows that the DAMF algorithm is faster than the NAFSMF algorism. The PSMF algorithm is the fastest among all. This is because both the noise detector and the noise filter are gradually implemented in the form of repetitive behavior. The result of the noise-removal algorithm in the current iteration is used in contribution to the processing of other pixels in the following frequencies. The DAMF and AMF come after PSMF in term of the speed. The NAFSMF technique is slow due to its computational complexity.

Conclusion
This paper presents the median filter family (SMF, AMF, PSMF, NFSMF, and DAMF) for impulse noise removal. These filters are applied on three images of Magnetic Resonance Imaging in order to test each filter performance for the comparison. PSNR, SSIM, and Beta metrics are used for the measurement of the effectiveness of each filter. Although all filters work well on MRI images when the noise density is low. While in high-density noise, the filters produce distorted images as well as blurring of the resulting image, except the DAMF technique, which produced better results, compared with other filters. Using neighbor pixels and adaptive window, DAMF method can be used to find the pixel value that is near to the original pixel value and then the noisy pixel is determined. This is the ideal approach to remove noise from the image. However, when the noise intensity becomes high, the resulted image of this filter suffers from the nonlinear edge. The PSMF technique characterized by high-speed in the implantation compared with the other filters. This is because of the noise detector and the noise filter are performed progressively in iterative behavior. In the current iteration, the result of the de-noising steps can be used to process the pixels that are existing in the subsequent iterations. For the future work, the current noise removal techniques produced an image containing distorted edges in high-density noise, so they need a new nonlinear edge-enhancement technique for preserving edge content.