Research Journal of Recent Sciences _________________________________________________ ISSN 2277-2502 Vol. 4(ISC-2014), 51-56 (2015) Res. J. Recent. Sci. International Science Congress Association 51 A Study on Noise Filters to Pre-Process Magnetic Resonant Biomedical Images for Segmentation Ravi S. and Khan A.M. Department of Electronics, Mangalore University, Mangalagangotri 574199, Karnataka, INDIAAvailable online at: www.isca.in, www.isca.me Received 4th November 2014, revised 14th January 2015, accepted 28th January 2015 AbstractImage Segmentation is a process of extracting region of interest from the whole image. The success of segmentation depends on the quality of the signal at the input. Noises are prevalent during image acquisition, due to various reasons and sources, thus making it hard to distinguish the healthy and abnormal tissues. Pre-processing is essential to remove these noises from the acquired images before subjecting to the actual processing algorithms. This paper gives the results of our study on different filters used to pre-process the biomedical images. The study shows that for a specific sequence of MR Images, a specific filter yields better results as compared with others. We have chosen three different image sequences i.e. T1-series, T2-series and DWI series of MRI and three different filters for the experiment. The statistical comparisons of the methods used are in agreement with our conclusion. For the study, we have taken real images from hospitals. Keywords: Image Segmentation, Filters, MR Images, Noises, Pre-processing. Introduction The purpose of image segmentation is to isolate the image to its constituent regions, based on certain conditions, to use in advanced processing techniques. Image segmentation plays a very important role in medical image analysis to diagnose abnormality and to plan treatment, surgery and extraction of specific body parts from the image acquired. The noise in medical image arises during acquisition, mainly from the imaging device employed. The noise may also exist due to its digital nature employed for storing and transmission. The noise is an unwanted signal that is observable in all modalities of image acquisition. Image denoising is the most necessary task in image processing. It makes a good sense to understand the noise models before designing a denoising technique. Among the exisiting noise models, Gaussian noise has wide spectral existence and impulse noise has the least. The simplest way to denoise an image is to subject the image to spatial low pass filters, which are easy to design and are computationally less expensive. But the major concern in application low pass filters is that removes the noise at the cost of blurring the image. So the challenge is open to design a denoising filter which removes noise and keeps the required data in the image unaffected. Frequency domain filters removes the noise significantly but it smoothes the image to greater extent that the edge information is lost. In this paper, three different filters are discussed along with the results obtained by using them. The three filters are chosen one each from linear filter, non-linear filter and frequency based filter. The efficiency of linear and non-linear filter can be improved significantly by using adaptive nature to filters. In this paper, section II gives materials and methods used, section III highlights the results obtained and section IV concludes with the observations made. Material and Methods MR Imaging: Magnetic resonance imaging (MRI) is a non-invasive technique of acquiring images of internal organs and tissues in body to help doctors for diagnosis. MR imaging is an invaluable tool to diagnose and monitor treatments of internal soft-tissue structures like brain, liver, heart and also the spinal cord. Magnetic resonant imaging technique uses magnetic field and radio pulses to generate images. The proton in nucleus of the hydrogen atom serves the required nuclear magnetic resonant (NMR) signal to create images. The images are acquired in axial (cutting at right angles), sagittal (front-to-back) and in coronal (parallel to skull) axes. The intensity of a MRI pixel is proportional to the strength of NMR signal. The MR image sequences are classified as Spin-Echo Sequence, Inversion Recovery Sequences and Gradient-Echo Sequences. The basic types of MR images used for diagnosis of various abnormalities are T1 and T2 images. But these sequences give less information if the abnormality is stroke; hence diffusion weighted image (DWI) sequence is most widely used in diagnosis of Stroke. Image weighting is a technique that uses weighting parameters to select a specific contrast for an image. T1 weighted images: T1 weighted image is a basic pulse sequence in MRI and possess contrast that is dependent on the difference in the recovery time of the tissues and have weights corresponding to the spin-lattice longitudinal relaxation time of protons. T1 weighting has shorter echo and relaxation time. A high signal in T1 sequence can be fat, slow flowing blood, haemangioma and low signal can be infarction, sclerosis, tumours, and calcification and so on. The following figure shows a sample T1 weighted image. Research Journal of Recent Sciences ______________________________________________________________ ISSN 2277-2502Vol. 4(ISC-2014), 51-56 (2015) Res. J. Recent. Sci. International Science Congress Association 52 Figure 1 Sample images of T1 weighted, T2 weighted and DWI sequence in MRI T2 Weighted Images: T2 weighted image is a basic spin echo pulse sequence in MRI and possess contrast that is dependent on the difference in the decay time of the tissues and have weights corresponding to the spin-lattice transverse relaxation time of protons. T2weighting has longer echo and relaxation times. A high signal in T2 corresponds to CSF, inflammation, haemorrhage and some kind of tumours and low signal represents cortical bone, calcification, haemosiderin.DWI Sequences: The diffusion weighted imaging is based on the diffusion of water molecules within a voxel and hence it allows the mapping of molecular diffusion to understand the microscopic details about tissues. The diffusion of water molecules is not uniform in normal and affected tissue, this principle is used to acquire the images in DWI sequence. Apparent diffusion coefficient mapping is used along with DWI sequence to diagnose stroke. The voxels become brighter if the restriction caused is more.Noise Models: Image acquisition is the primary step, where noise arises. The noise, being the unwanted element, is hard to remove from the image if it arises. Noise has a very wide spectral existence and the techniques employed for de-noising causes degradation of actual information that exists in images. Understanding of noise models is often required to design de-noising filters. There are various noise models that are often used in digital image processing applications, like Gaussian noise, Rayleigh noise, Erlang noise, Exponential noise and Impulse noise. Among these, Gaussian noise and impulse (salt and pepper) noises are discussed. Gaussisan Noise: The Gaussian noise model is frequently used in practice due to its mathematical tractable advantages. The Gaussian noise arises during acquisition and is primarily due to malfunction of acquiring sensors and/or during transmission, caused by electronic circuits. The Gaussian noise also depends on operating temperature. The probability distribution function of Gaussian noise is given by (1) Figure 2 Gaussian model Where z is the intensity value; is the mean intensity value; is standard deviation. Salt and Pepper Noise: This is a random noise and also called as impulse noise. It possess bipolar characteristic. Salt and pepper elements have the probability of occurrence less than 0.1, if this value exceeds, then the noise dominates considerably over the image. This noise exists due to memory cell failures and/or due to synchronization error between digitization and transmission. The probability distribution function of Gaussian noise is given by (2) Figure 3 Salt and pepper model Research Journal of Recent Sciences ______________________________________________________________ ISSN 2277-2502Vol. 4(ISC-2014), 51-56 (2015) Res. J. Recent. Sci. International Science Congress Association 53 Where a, b and z are intensity values; if a b, a corresponds to pepper (dark) and b corresponds to salt (bright). Filtering: Filtering is a widely used technique to enhance the quality of image by removing unwanted pixels from the image. It essentially holds information available in specific band and suppresses the information outside that band. In image processing, filtering is usually done either in spatial domain or in frequency domain. Each of these techniques has specific advantages. A low pass filter is usually used for removing noise from the image. The major drawback of using low pass filter is that it introduces blurring effect in images so that the edges are modified and hence the information is lost at those locations. The challenge in filtering a biomedical image is that the noise should be removed without causing blurring and also the edges have to be retained. There are various filters that can be used for removing noise, depending on the type of noise model that exists in an image. The major types of noise that can be observed in images are Gaussian noise and salt and pepper noise. Since these two noises are most prevalent, the study is done on the filters to remove these noises. Among the available filters we have chosen two spatial filters, adaptive filter (wiener filter) and median filter, and also the filtering in frequency domain is used. Adaptive Filtering: An Adaptive filtering includes a linear filter with transfer function and means to adjust to the changing parameters in the transfer function. The adaptive filtering is often used in the situations where the local changes in an image are not known. This situation often arises with presence of wide spectral noises, like Gaussian noise. These filters depend mainly on the mean and variance of the region in an image for adapting themselves for the change. Wiener filter is often used as an adaptive filter and the design is given by (3) Where: H( ) is degradation function, S ) is power spectrum of noise and S ) is power spectrum of undegraded image. Median Filtering: The median filter used, is basically a non linear digital filter, to remove noise. A median filter works on the neighbourhood of the test pixel, often called as window, to consider it or not has an object pixel. It replaces the test pixel by its median value. The median value can be calculated by first organising the neighbour values in numerical order to consider the value at middle position as the median value. The median filter offers an advantage of edge preserving characteristic, if image is corrupted by moderate amount of noise. Median filter has best performance against impulse noises. The performance can be enhanced by using adapting nature to the filter. Filtering in Frequency Domain: Image is a function of spatial coordinates. In practice, spatial filter functions gives poorer result compared to filters designed in frequency domain. The filters in frequency domain can either be directly designed as frequency functions or spatial filter functions can be Fourier transformed to frequency domain. As in spatial filters, low pass filter and high pass filter in frequency domain smooth and sharpen the image respectively. A high pass filter can be designed using a low pass filter. The low pass frequency filter with Gaussian response can be designed using the relation (4) Where: D is cutoff frequency. Statistical Parameters: Peak Signal to Noise Ratio: PSNR of an image is the ratio of peak energy to maximum square error in the reconstructed image, expressed in terms of decibels. Higher the value of PSNR better is the quality of the reconstructed image. Another advantage of higher PSNR value is that it can be compressed and reconstructed to near original image. The PSNR of an image can be found using the relation (5) Where: ‘R’ is the maximum possible gray value allowed for the image and ‘MSE’ is the mean square error value of the image. Root Mean Square Error: The Root Mean Square Error RMSE) is a measure of the difference between values predicted by a model and the values actually observed from the environment that is being modelled. The RMSE of a model prediction with respect to the estimated variable is defined as the square root of the mean squared error: (6) Results and Discussion The pre-processing operation performed is noise removal from the acquired images. For illustration, we have externally added two most prevalent noises, Gaussian noise and salt and pepper noise, to the images and the effect of filtering is studied. The operations were performed on MatLab2013a software on system Intel(R) Pentium(R) 4CPU 2.80GHz 1Gb 32-bit OS. The pre-processing operation is performed on several images and the result of 12 images is given in this paper. We have used the T1, T2 and DWI sequences of MR imaging. For every sequence of image the noises were added and filtered using adaptive wiener filter, median filter and low-pass frequency filter. The prime statistical parameters like peak-signal-to-noise ratio and root mean square error values were found in each case and are given below. The histogram of the noisy image and filtered image are also given. Research Journal of Recent Sciences ______________________________________________________________ ISSN 2277-2502Vol. 4(ISC-2014), 51-56 (2015) Res. J. Recent. Sci. International Science Congress Association 54 Noisy Image 0 500 1000 1500 2000 0 50 100 150 200 250 adaptive pass filtered 0 500 1000 1500 0 50 100 150 200 250 median filtered 0 500 1000 1500 0 50 100 150 200 250 Frequency Filtered 0 500 1000 1500 2000 0 0.2 0.4 0.6 0.8 1 Figure-4 T2 test image corrupted with Gaussian noise and response of filters along with their histogram plot Noisy Image 0 2000 4000 6000 8000 0 50 100 150 200 250 adaptive pass filtered 0 2000 4000 6000 8000 0 50 100 150 200 250 median filtered 0 2000 4000 6000 8000 10000 0 50 100 150 200 250 Frequency Filtered 0 1000 2000 3000 4000 5000 6000 0 0.2 0.4 0.6 0.8 1 Figure-5 T1 test image corrupted with Salt and Pepper noise and response of filters along with their histogram plot Research Journal of Recent Sciences ______________________________________________________________ ISSN 2277-2502Vol. 4(ISC-2014), 51-56 (2015) Res. J. Recent. Sci. International Science Congress Association 55 Noisy Image 0 200 400 600 800 1000 1200 0 50 100 150 200 250 adaptive pass filtered 0 200 400 600 800 1000 1200 0 50 100 150 200 250 median filtered 0 200 400 600 800 1000 1200 0 50 100 150 200 250 Frequency Filtered 0 200 400 600 800 1000 1200 1400 0 0.2 0.4 0.6 0.8 1 Figure-6 DWI test image corrupted with Gaussian noise and response of filters along with their histogram plot Table-1 Response of Filters on T1 Image Sequence corrupted with Gaussian and Salt and Pepper Noises T1 Gaussian Noise Salt and Pepper Noise Adaptive Filter Median Filter Frequency Filter Median Filter Adaptive Filter Frequency Filter PSNR (dB) RMSE PSNR (dB) RMSE PSNR (dB) RMSE PSNR (dB) RMSE PSNR (dB) RMSE PSNR (dB) RMSE V4 69.5744 8.7427 68.2218 8.6557 68.5410 0.1025 77.9296 2.8456 69.0643 2.1027 69.4734 0.0924 I4 69.5339 8.7122 65.2945 8.7746 61.7742 0.1344 74.6879 3.3062 64.7464 2.6993 61.3181 0.1378 G4 69.5951 8.6455 65.2847 8.7821 61.7511 0.1341 75.2336 3.2436 64.6916 2.6693 61.5632 0.1388 R4 69.0360 8.6895 65.3106 8.7916 61.7603 0.1331 74.3957 3.2389 64.7058 2.6309 61.3897 0.1375 Table-2 Response of Filters on T2 Image Sequence corrupted with Gaussian and Salt and Pepper Noises T2 Gaussian Noise Salt and Pepper Noise Adaptive Filter Median Filter Frequency Filter Median Filter Adaptive Filter Frequency Filter PSNR (dB) RMSE PSNR (dB) RMSE PSNR (dB) RMSE PSNR (dB) RMSE PSNR (dB) RMSE PSNR (dB) RMSE V4 70.7573 8.7377 68.1584 8.7056 68.2447 0.1077 76.4855 3.8893 69.0832 3.3241 69.0889 0.0975 I4 69.3663 8.7650 67.7565 8.6609 66.0628 0.1112 74.8931 3.9323 68.1184 3.2390 66.4560 0.1054 G4 68.9704 8.7621 68.2921 8.7136 68.1248 0.1047 75.6092 3.9331 68.9859 3.3622 69.6127 0.0971 R4 70.1319 8.7584 67.9082 8.7061 67.8203 0.1073 75.8150 3.8199 68.4767 3.2368 68.6190 0.1001 Table-3 Response of Filters on DWI Image Sequence corrupted with Gaussian and Salt and Pepper Noises DWI Gaussian Noise Salt and Pepper Noise Adaptive Filter Median Filter Frequency Filter Median Filter Adaptive Filter Frequency Filter PSNR (dB) RMSE PSNR (dB) RMSE PSNR (dB) RMSE PSNR (dB) RMSE PSNR (dB) RMSE PSNR (dB) RMSE B2 70.9421 8.6266 68.9832 8.7933 73.9964 0.0824 75.9426 2.2846 68.9738 1.8821 75.2650 0.0819 C4 68.9182 8.9125 68.2233 8.8996 71.0182 0.0919 71.6174 5.1800 69.0897 5.2340 72.5718 0.0823 G4 66.8332 9.1126 65.6655 8.8706 62.2711 0.1283 68.7868 3.3414 65.9750 2.5759 62.3635 0.1198 E4 70.1267 8.7589 68.6100 8.8180 72.6718 0.0863 73.5457 2.5397 68.9748 2.0607 73.8971 0.0818 Research Journal of Recent Sciences ______________________________________________________________ ISSN 2277-2502Vol. 4(ISC-2014), 51-56 (2015) Res. J. Recent. Sci. International Science Congress Association 56 The obtained result shows that if the image is corrupted with Gaussian noise then the adaptive filter gives good result and for salt and pepper noise median filter gives better results. For both noises, the performance of frequency filter is good, it has high signal to noise ratio and also minimum error. But it fails to preserve edges that are present in the image since it smoothes the image to higher order. For biomedical images the edges are more significant since they carry more information than the flat intensity areas. From the histogram of the filtered images it can also be observed that pre-processing like noise reduction do not change image characteristic, this is evident by the shape of histogram. While noise pixels are removed, the shape of histograms in filtered images is identical to the original image. As a result, the number of pixels at a particular intensity value has changed. It can also be observed from the images and table above, that the root mean square value is higher in case of Gaussian noise if compared with salt and pepper noise. This is due to the fact that Gaussian noise has wider spectrum and salt and pepper noise has a narrow spectrum. Conclusion Noise is most common element in any type of signals and essentially should be removed. In this paper, we describe the results of our study on noise performance of adaptive wiener filter, median filter and frequency filter. For any signal PSNR should be high and RMSE should be low. Based on the results obtained, we conclude that for images corrupted by Gaussian noise adaptive wiener filter gives good noise performance and if image is corrupted by salt and pepper noise median filter gives better noise performance. We also conclude that pre-processing has no effect on attributes of image but removes only noisy pixels from the original image. Apart from the parameter values, we have also considered visual quality of the image. Though frequency filter has better statistical performance, the visual quality of image is poor since filtering has introduced blurring effect, thus making the image potentially weak to extract required abnormality information. Acknowledgement This is a part of the project work being carried under DST-PURSE scheme at Mangalore University. References 1.Balafar M.A., Ramli A.R. , Saripan M.I. and Mashohor S., Review of Brain Mri Image Segmentation Methods, Artif Intell Rev, Doi 10.1007/S10462-010-9155-0,33, 261–274(2010)2.Balafar M.A., Review Of Noise Reducing Algorithms For Brain Mri Images, IJTPE, 4(13), 54-59 (2012)3.Gonzalez R.C. and Woods R.E., Digital Image Processing, third edition, PHI publication, ISBN 978-81-203-3640-7 (2012)4.http://fonar.com/glossary.htm (2014)5.Jose Alex Mathew and A.M. Khan Development of Intelligent Algorithms for diagnosis of Brain Abnormality and Diseases from MRI, (2011)6.http://angeljohnsy.blogspot.com/2011/12/adaptive-filtering-local-noise-filter.html (2014)7.Peak Signal-to-Noise Ratio as an Image Quality Metric via http://www.ni.com/white-paper/13306/en/ (2013)8.Buades A, Coll B, and Morel J M, A Review of Image Denoising Algorithms, With A New One, Siam Journal On Multiscale Modeling And Simulation, 4(2), 490-530(2005)9.https://www.cs.auckland.ac.nz/courses/compsci373s1c/PatricesLectures/Image%20Filtering_2up.pdf (2014) 10.Ben George E., Karnanmri M Brain Image Enhancement Using Filtering Techniques IJCSET, ISSN: 2229-3345 , 3, 399-403 (2012) 11.Bhausaheb Shinde, Dnyandeo Mhaske and Dani A.R., Study of Noise Detection and Noise Removal Techniques in Medical Images I.J. Image, Graphics and Signal Processing, 2, 51-60 (2012)12.Mussarat Yasmin, Muhammad Sharif, Saleha Masood, Mudassar Raza and Sajjad Mohsin Brain Image Enhancement - A Survey World Applied Sciences Journal ISSN 1818-4952, 17(9), 1192-1204 (2012)