1 Introduction

Magnetic Resonance Imaging (MRI) system uses non-ionizing radiation to create images. In initial stages it was used in chemical analysis and named as Nuclear Magnetic Resonance Imaging system. A MRI scanner consist of large magnet and radio wave antenna. The radio waves are passed through the patient’s body and received by the antennas attached to the scanner. By using the computers attached to the scanner the radio waves are converted into an image. Any part of the body can be imaged using this method.

During this acquisition and transmission process MRI images are affected by various kinds of noises like Gaussian, Rician, Poisson and Impulse noise. Impulse is the more important type of noise present in the MRI images. Salt & Pepper and Random values are two classification of Impulse noise. In this removal of Salt & Pepper noise plays a vital role in the MRI image denoising techniques. It is a important pre-processing step in a image processing [1,2,3, 5].

Various filtering techniques have been proposed for the removal of Salt & Pepper noise from MRI images. The edge preservation is a important feature of a filtering techniques. Filters likes Median Filter [7] and its variations are used widely in the processing. The Median filter removes the Salt & pepper noise well, but the edge preservation quality of median filter is low. So different variations are done in the Median filter to improve the edge preservation quality of it. High Speed Median Filter [10], switching filters [9], Adaptive Mean Filter [11], Modified Median Filter [8] are the example of variations of Median filter. These filters are efficiently removes the Salt & pepper noise while preserving edges. Here a new approach is proposed to remove the Salt & Pepper noise with increased resolution while preserving edges. It consist of Dual Threshold Median Filter [4] and Verge Filter [6].

Using this proposed Hybrid Multi-resolution filter MRI images are obtained with different resolution. These different images can be used based on the application.

2 Dual threshold median filter

Median filter replaces the corrupted center pixel in a processing window by the median value of the pixels in that processing window. Identification of noisy pixels plays a vital role in the performance of the filtering algorithms used for removing Salt & Pepper noise. Wrong identification of noisy pixels leads to blurring of an image.

A dual threshold median filter is proposed to reconstruct the corrupted pixels after the proper identification of it. A 3 × 3 processing window is used in this method. The neighboring pixels corresponding to the center pixels in the processing window are used to identify the nature of the center pixel (Noisy of Noise free). The identification is done using two threshold values TH1 and TH2. Where TH1 represents the threshold values in-terms of Minimum values in the Processing window, TH2 represents the threshold values in-terms of columns in the Processing window and they are calculated as follows. Figure 1 shows the processing window.

Fig. 1
figure 1

Processing window

The TH1 and TH2 values are calculated using minimum and maximum values in each row, each column and diagonal values. Minimum and maximum values are calculated as follows,

$${\text{MinthR}}_{i} = \hbox{min} \left( {{\text{R}}_{i} } \right)$$
(1)
$${\text{MaxthR}}_{\text{i}} = { \hbox{max} }\left( {{\text{R}}_{\text{i}} } \right)$$
(2)
$${\text{MinthC}}_{\text{i}} = { \hbox{min} }\left( {{\text{C}}_{\text{i}} } \right)$$
(3)
$${\text{MaxthC}}_{\text{i}} = { \hbox{max} }\left( {{\text{C}}_{\text{i}} } \right)$$
(4)
$${\text{MinthD}}_{\text{i}} = { \hbox{min} }\left( {{\text{D}}_{\text{i}} } \right)$$
(5)
$${\text{MaxthD}}_{\text{i}} = { \hbox{max} }\left( {{\text{D}}_{\text{i}} } \right)$$
(6)

where i = 1,2,3. Ri represents row values, Ci represents column values and Di represents diagonal values. There will be three rows, three columns and two diagonals (left diagonal and right diagonal) in a processing window.

The threshold values are given as,

$${\text{TH}}_{ 1} = { \hbox{min} }\left( {{\text{MinthR}}_{\text{i}} ,{\text{ MinthC}}_{\text{i}} ,{\text{ MinthD}}_{\text{i}} } \right)$$
(7)
$${\text{TH}}_{ 2} = { \hbox{max} }\left( {{\text{MaxthR}}_{\text{i}} ,{\text{ MaxthC}}_{{{\text{i}},}} {\text{MaxthD}}_{\text{i}} } \right)$$
(8)

The threshold values indicates the minimum and maximum value of pixel in a processing window. If there is a noisy pixel in a processing window, then the value of threshold will be either 0 or 255. If the central pixel in a processing window equals the TH1 or TH2, then it is classified as a noisy pixel and it is reconstructed using the modified median value as mentioned below

$${\text{MedthR}}_{\text{i}} = {\text{med}}\left( {{\text{R}}_{\text{i}} } \right)$$
(9)
$${\text{MedthC}}_{\text{i}} = {\text{med}}\left( {{\text{C}}_{\text{i}} } \right)$$
(10)
$${\text{MedthD}}_{\text{i}} = {\text{med}}\left( {{\text{R}}_{\text{i}} } \right)$$
(11)
$${\text{X}}^{\prime} = {\text{med}}\left( {{\text{MedthR}}_{\text{i}} , {\text{ MedthC}}_{\text{i}} ,{\text{ MedthD}}_{\text{i}} } \right)$$
(12)

The function med represents the median value.

3 Verge filter

The verge filter is an another type of filter applied to reconstruct the noisy pixels by considering verge distance values. The small verge value corresponds to high correlation between the pixels. With respect to the central pixel eight verge distances are calculated. The Calculation of Verge distance is shown in Fig. 2

Fig. 2
figure 2

Verge distance calculation

The verge distance values are given by,

$$\begin{aligned} {\text{D}}1 & = \left| {{\text{P}}1 - {\text{P}}6} \right| + \left| {{\text{P}}4 - {\text{P}}9} \right| \\ {\text{D}}2 & = \left| {{\text{P}}1 - {\text{P}}8} \right| + \left| {{\text{P}}2 - {\text{P}}9} \right| \\ {\text{D}}3 & = \left| {{\text{P}}2 - {\text{P}}8} \right|*2 \\ {\text{D}}4 & = \left| {{\text{P}}2 - {\text{P}}7} \right| + \left| {{\text{P}}3 - {\text{P}}8} \right| \\ {\text{D}}5 & = \left| {{\text{P}}3 - {\text{P}}4} \right| + \left| {{\text{P}}6 - {\text{P}}7} \right| \\ {\text{D}}6 & = \left| {{\text{P}}4 - {\text{P}}6} \right|*2 \\ {\text{D}}7 & = \left| {{\text{P}}1 - {\text{P}}9} \right|*2 \\ {\text{D}}8 & = \left| {{\text{P}}3 - {\text{P}}7} \right|*2 \\ \end{aligned}$$
(13)

The verge distance indicates correlation between center pixel and pixels along the different direction. Minimum verge distance corresponds to high correlation between center pixel and pixels along that verge. The noisy pixels are reconstructed based on the verge distance as follows,

$$\begin{aligned} {\text{P5}}^{\prime} & { = }\left( {{\text{P1}} + {\text{P6}} + {\text{P4}} + {\text{P9}}} \right)\quad {\text{if Dmin}} = {\text{D1}} \\ & = \left( {{\text{P1}} + {\text{P2}} + {\text{P8}} + {\text{P9}}} \right)\quad {\text{if Dmin}} = {\text{D2}} \\ & = \left( {{\text{P2}} + {\text{P8}}} \right)/ 2\quad {\text{if Dmin}} = {\text{D3}} \\ & = \left( {{\text{P2}} + {\text{P3}} + {\text{P7}} + {\text{P8}}} \right)\quad {\text{if Dmin}} = {\text{D4 }} \\ & = \left( {{\text{P3}} + {\text{P4}} + {\text{P6}} + {\text{P7}}} \right)\quad {\text{if Dmin}} = {\text{D5}} \\ & = \left( {{\text{P4}} + {\text{P6}}} \right)/ 2\quad {\text{if Dmin}} = {\text{D6}} \\ & = \left( {{\text{P1}} + {\text{P9}}} \right)/ 2\quad {\text{if Dmin}} = {\text{D7}} \\ & = \left( {{\text{P3}} + {\text{P7}}} \right)/ 2\quad {\text{if Dmin}} = {\text{D8}} \\ \end{aligned}$$
(14)

where Dmin represents the minimum of verge distances. If the central pixel in a processing window is classified as noisy pixel using the TH1 and TH2, then it is replaced by Eq. (14).

After Denoising the images by Dual Threshold Median filter and Verge filter, wavelet transform is applied on the denoised images. The application of wavelet transform decompose the images into different sub-bands. The sub-band contains LL, LH, HL and HH bands. The high frequency band contains edge information. By combining the different sub-bands of the two denoised images, an image with different resolution can be obtained. Figure 3. Shows the proposed approach.

Fig. 3
figure 3

Proposed approach

The flow of proposed algorithm is given as,

Step1: Get noisy image

Step1: Apply Dual Threshold Median filter to get denoised image.

Step3: Apply verge filter to get denoised image.

Step4: Apply wavelet transform on denoised images

Step5: Mix the different Sub-bands of the Decomposed Images

Step6: Apply inverse wavelet transform of get resolution improved image.

Input Noisy Image

4 Results and discussion

The performance of the proposed approach for denoising the MRI images are evaluated in-terms of quantitative and visual analysis.

Peak Signal to Noise Ratio (PSNR) is used as a quantitative performance analysis metric and it is given by

$${\text{PSNR }}\left( {\text{db}} \right) = 10.{ \log }_{ 10} \frac{MAX}{MSE}$$
(15)

where MAX is the maximum gray value in an image (255), MSE is mean square error which is given by

$${\text{MSE}} = \frac{1}{P.Q}\mathop \sum \limits_{i = 0}^{P - 1} \mathop \sum \limits_{j = 0}^{Q - 1} | A_{i,j} - B_{i,j} |^{2}$$
(16)

P and Q are size of an images, A represents an input image, B represents the restored image. The visual analysis is shown in Fig. 4.

Fig. 4
figure 4

a, b, c Original images d Noise affected image e denoised image f Resolution improved image

The results of the Multiresolution Hybrid filter approach is compared with the Dual Threshold Median Filter (DTMF), Decision Tree Based Method (DTBM), Wiener Filter (WF), Median Filter (MF) and Adaptive Median Filter (AMF). Table 1 and Fig. 5 represents the PSNR comparison of the proposed method with above mentioned methods. It shows that the proposed method produces high PSNR values when compared to other methods when the noise level is too high.

Table 1 PSNR (db) comparison
Fig. 5
figure 5

a, d PSNR comparison of sectional view of brain image. b, e PSNR comparison upper view of hands image. c, f PSNR comparison of lateral view of brain image

5 Conclusion

This paper presents a Hybrid Multi-resolution filter for MRI image denoising in computing systems. It consists of Dual threshold Median filter and Verge filter. The classification of pixel into noisy or noisy free is done in a deterministic way. The experimental results shows that the proposed filter removes the Salt & Pepper noise in MRI images while improving the resolution of an image. It produces high PSNR values when the noise level is too high. Using this method, images with different resolutions can be obtained by mixing different sub-bands of the images using wavelet transform.