International Journal of Engineering Trends and Technology (IJETT) – Volume 7 Number 2- Jan 2014 Segmentation of Gray Matter, White Matter and Brain Tumour from Brain MR Images Ms. V. Kavitha#1, Mr. S. Rajesh Kumar Reddy*2 #1 PG student, #2 Assistant Professor,Dept. of Biomedical Engineering, Anna University, Udaya School of Engineering, Ammandivilai, Kanyakumari, Tamil Nadu, India. Abstract— Accurate segmentation of magnetic resonance (MR) images of the brain is of interest in the study of many brain disorders. In multiple sclerosis, for instance, quantification of white matter lesions is necessary for drug treatment assessment, while in schizophrenia and epilepsy, volumetry of gray matter, white matter, and cerebrospinal fluid is important to characterize morphological differences between subjects. Since such studies typically involve vast amounts of data, manual segmentation is too time consuming. Moreover, such manual segmentations show large inter and intra observer variability. Hence, there is a need for automated segmentation tools. A major problem for automated MR image segmentation is the corruption with a smoothly varying intensity inhomogeneity or bias field. Although not always visible for a human observer, such a bias can cause serious misclassifications when intensity based segmentation techniques are used. The Pulse Couple Neural Network (PCNN) was developed by Eckhorn to model the observed synchronization of neural assemblies in the visual cortex of small mammals such as a cat. In this work, PCNN based automatic segmentation algorithm was developed to segment Brain Magnetic Resonance Imaging (MRI). This algorithm is compared with Fuzzy C Means (FCM) segmentation algorithm and Fuzzy Local Gaussian Mixture Model (FLGMM) algorithms. Results show that the proposed PCNN algorithm can segment the brain MR image accurately than FCM and FLGMM algorithm. Keywords— Magnetic Resonance Image (MRI), Gray Matter (GM), White Matter (WM), Fuzzy C Means (FCMs), Gaussian Mixture Model (GMM), Fuzzy Local Gaussian Mixture Model (FLGMM), Pulse Coupled Neural Network. I. INTRODUCTION Segmentation of major brain tissues, including gray matter (GM), white matter (WM), and cerebrospinal fluid, from magnetic resonance (MR) images plays an important role in both clinical practice and neuroscience research. However, due to the nonuniform magnetic field or susceptibility effects, brain MR images may contain a smoothly varying bias field, which is also referred to as the intensity inhomogeneity or intensity nonuniformity. Therefore, bias field correction and segmentation should be interleaved in an iterative process so that they can benefit from each other and yield better results. Many brain MR image segmentation ISSN: 2231-5381 approaches with bias field correction are available so far. Among them, those based on the expectation-maximization (EM) algorithm and fuzzy C-mean (FCM) clustering are the most popular ones [24]. The conventional GMM implies the stochastic assumption that throughout the image, intensities in the same region are sampled independently from an identical Gaussian distribution. This assumption, however, is invalid for brain MR images due to the existence of the bias field. Proposed fuzzy local GMM (FLGMM) algorithm [24], assumes that the local image data within the neighborhood of each pixel follow the GMM, in which the mean of each Gaussian component is approximated as a tissue dependent constant multiplied by the bias field estimated at this pixel for brain MR image segmentation. The objective function of this algorithm is defined as the integration of the weighted GMM energy functions over the entire image. In the objective function, a truncated Gaussian kernel function is used to impose the spatial constraint, and fuzzy memberships are employed to balance the contribution of each GMM to the segmentation process. Pulse-coupled networks or pulse-coupled neural networks (PCNNs) are neural models proposed by modeling a cat’s visual cortex and developed for high-performance biomimetic image processing [8]. A PCNN is a two-dimensional neural network. Each neuron in the network corresponds to one pixel in an input image, receiving its corresponding pixel’s color information (e.g. intensity) as an external stimulus. Each neuron also connects with its neighboring neurons, receiving local stimuli from them. The external and local stimuli are combined in an internal activation system, which accumulates the stimuli until it exceeds a dynamic threshold, http://www.ijettjournal.org Page 79 International Journal of Engineering Trends and Technology (IJETT) – Volume 7 Number 2- Jan 2014 resulting in a pulse output. Through iterative computation, PCNN neurons produce temporal series of pulse outputs. The temporal series of pulse outputs contain information of input images and can be utilized for various image processing applications, such as image segmentation and feature generation. Compared with conventional image processing means, PCNNs have several significant merits, including robustness against noise, independence of geometric variations in input patterns, capability of bridging minor intensity variations in input patterns, etc. Filtering will be carried out after this step by using MATLAB coding for median filter which can filter the noises from the images with preserving the edges. Finally segmentation of brain MR images will be carried out using FCM, FLGMM and PCNN algorithms. II. PROPOSED SYSTEM A. System overview The proposed work is divided into two main stages. In the first stage preprocessing is done. In the second stage segmentation of Brain MR Images is done by using FCM, FLGMM and PCNN algorithms. Overall architecture of this work is shown in figure 1. Load brain MR Images Preprocessing Segmenting the brain MR Images using FCM Segmenting the brain MR Images using PCNN Segmenting the brain MR Images using FLGMM Fig. 2 Work Flow Diagram Fig. 1 Overall Architecture B. Work Flow Diagram III. MODULES AND MODULE DESCRIPTIONS The work flow of proposed work is shown in Following modules are presents in this work. figure 2. The brain MR images were collected from Image size estimation Johnson MRI, Erode for this work. Collected image Back ground normalization was loaded for further processing using simple Filtering MATLAB get file coding. If the image contains Segmentation of brain MR images unwanted texts such as patient name, age, image size etc.., then, it will be removed by using the simple MATLAB coding given in the demos for removing unwanted objects from the image. ISSN: 2231-5381 http://www.ijettjournal.org Page 80 International Journal of Engineering Trends and Technology (IJETT) – Volume 7 Number 2- Jan 2014 A. Image size estimation During segmentation process, only the brain image should be segmented. Thus by using back ground normalization process, the unwanted message present in the MRI image is eliminated. C. Filtering Image filtering is used to Remove noise, Sharpen contrast, Highlight contours and Detect edges [17]. Image filters can be classified as linear or nonlinear. Fig. 3 First module This module is for estimating the image size of the MR image. This is useful for segmenting the correct level of the image. This is a checking process of whether the image size is perfect for the segmentation process. If not this will be corrected to the valuable image size. Since, there are many images in the datasets which are not in the constant size. Thus, the non-similar image sizes are corrected. Fig. 5 Third module Linear filters are also know as convolution filters as they can be represented using a matrix B. Back ground normalization multiplication. Thresholding and image equalization are examples of nonlinear operations, Since, there are so many unwanted data’s as is the median filter. Median filtering is a are present in the MRI image. The unwanted nonlinear method used to remove noise from information like, images. It is widely used as it is very effective at 1. Patient’s name, removing noise while preserving edges. It is 2. Size of the image, particularly effective at removing ‘salt and pepper’ 3. Date, etc type noise. The median filter works by moving through the image pixel by pixel, replacing each value with the median value of neighbouring pixels. The pattern of neighbours is called the "window", which slides, pixel by pixel over the entire image. The median is calculated by first sorting all the pixel values from the window into numerical order, and then replacing the pixel being considered with the middle (median) pixel value. D. Segmentation of brain MR images Fig. 4 Second module These are must be eliminate or to prevent the confusion made during image segmentation. ISSN: 2231-5381 In this module “Fuzzy C Means and Fuzzy Local Gaussian Mixture model algorithms” are used for Brain image segmentation. Image segmentation is typically used to locate objects and boundaries in images. http://www.ijettjournal.org Page 81 International Journal of Engineering Trends and Technology (IJETT) – Volume 7 Number 2- Jan 2014 The objective function of Fuzzy Local Gaussian Mixture Model algorithm is defined as the integration of the weighted GMM energy function over the entire image. In the objective function, a truncated Gaussian kernel function is used to impose the spatial constraint, and fuzzy memberships are employed to balance the Fig. 6 Final module By using Fuzzy based image segmentation, contribution of each GMM to the segmentation we can segment the brain MRI image and can find process [24]. the Gray matter (GM), White matter (WM), and Step 1: Initialization. Brain tumour. Initialize the number of clusters, standard deviation, E. Fuzzy C Means algorithm and neighborhood radius of the truncated Gaussian kernel, cluster centroids, and bias field at each The Fuzzy C-Means (FCM) algorithm is voxel. commonly used for clustering. The performance of the FCM algorithm depends on the selection of the Step 2: Updating parameters. initial cluster center and/or the initial membership value. If a good initial cluster that is close to the Step 2.1: Updating membership function actual final cluster center can be found, the FCM algorithm will converge very quickly and the (5) processing time can be drastically reduced [15]. Step 1: Initialize the membership matrix U with Step 2.2: Updating covariance matrix random values between 0 and 1 such that the constraints in Equation (1) are satisfied. (1) (6) Step 2.3: Updating bias field Step 2: Calculate c fuzzy cluster centers, ci, i=1…... c using Equation (2). (2) (7) Step 2.4: Updating mixture weight (8) Step 3: Compute the cost function according to Equation (3). Stop if either it is below a certain tolerance value or its improvement over previous iteration is below a certain threshold. Step 2.5: Updating centroids (3) Step 4: Compute a new U using Equation (4). Go to step 2. (4) F. Fuzzy Local Gaussian Mixture Model Algorithm ISSN: 2231-5381 (9) Step 3: Checking the termination condition. If the distance between the newly obtained cluster centers and old ones is less than a user- http://www.ijettjournal.org Page 82 International Journal of Engineering Trends and Technology (IJETT) – Volume 7 Number 2- Jan 2014 specified small threshold ε, stop the iteration; otherwise, go to step 2. G. Pulse Coupled Neural Network Algorithm The Pulse-Coupled Neural Nets (PCNN) algorithm is based on the neurophysiologic models evolving from studies of small mammals. Shown in Fig.1, the PCNN will receive both stimulus by feeding and also inhibitory linking [11]. These are combined in an internal activation system. Which accumulates the signals until it exceeds a dynamic threshold, resulting in an output. This alters the threshold as well as linking and feeding neurons, as will be described below. a) Let tmax=20; t=1; b) Let the adjusted threshold Ta(t)=T(n); c) The first iterative t=1, from (10)~(14),calculate each PCNN internal and output part, then put the result in Yij (t)(n); (10) (11) (12) (13) (14) Fig. 7 PCNN neuron d) Find out the pixels pulsed in this sub-iterative, and calculate NIF of their neighbors; e) Calculate the linking of these neighbors with Eq.(15); The PCNN produces a temporal series of outputs. Depending on time as well as the parameters, this (15) dynamic output contains information, which makes f) Calculate the internal activity of these it possible to detect edges, do segmentation, neighbors and compare with Ta( t) , then identify textures and perform other feature affiliate the output into Yijt (n) . extractions. The PCNN can operate on different g) Ta(t) = Ta(t) - N (ε) , where N(ε) is the types of data since it is very generic to its nature. normalization of ε. The algorithm is performed by continual iterations h) t=t+1; of the input and the output using the following steps. i) If t<tmax then move to step c); otherwise output Yij(n). Step1: Initialization • Let the unitary image greyhound value as the Step4: n=n+1. Tsave= Yij(n). impulse signal Sij; • Initialize the parameter of the net; Step5: If n < nmax, then move to step 3; otherwise • Set the maximum iterative times nmax= 30. end and output Tsave, which is the result of segmentation. Step2: Let iterative variable n = 1 Step3: Fastlinking processing: t is the iterative variable ISSN: 2231-5381 http://www.ijettjournal.org Page 83 International Journal of Engineering Trends and Technology (IJETT) – Volume 7 Number 2- Jan 2014 IV. RESULTS Fig. 11 Segmented images using FLGMM algorithm Fig. 8 Input images (first row) and unwanted text in that images (second row) Fig. 12 Segmented images using PCNN algorithm Fig. 9 Unwanted text removed images (first row) and preprocessed images (second row) V. CONCLUSION The PCNN belongs to a unique category of neural networks, in that it requires no training unlike traditional models where weights may require updating for processing new inputs. Specific values of PCNN Coefficients used in this work were derived from Johnson and Padgett [11] and Waldemark et al [21]. MATLAB coding developed for Fuzzy Local Gaussian Mixture Model (FLGMM), Fuzzy C Means (FCM), Pulse Coupled Neural Network (PCNN) algorithms to segment the brain MR images. Results show that the PCNN algorithm is capable of producing more accurate segmentation results than FCM and FLGMM algorithms. Fig. 10 Segmented images using FCM algorithm ISSN: 2231-5381 http://www.ijettjournal.org Page 84 International Journal of Engineering Trends and Technology (IJETT) – Volume 7 Number 2- Jan 2014 ACKNOWLEDGMENT I am very thankful to Dr. N. A. MURUGESAN, M.B.B.S., DMRD, Director of Johnson MRI, Erode, for contributing MR images for this work. [22] Wells W., Grimson E., R. Kikinis, and F. Jolesz, (1996), ‘Adaptive segmentation of MRI data’, IEEE Trans. Med. Imag., vol. 15, no. 4, pp. 429–442. [23] Zhang Y., Brady M. and Smith S. (2001), ‘Segmentation of brain MR images through a hidden Markov random field model and the expectation maximization algorithm’ IEEE Trans.Med. Imag., vol. 20, no. 1, pp. 45– 57. [24] Zexuan J., Yong X., Quansen S., Qiang C. and Deshen X (2012), ‘Fuzzy local Gaussian Mixture Model for Brain MR Image Segmentation’ IEEE Trans. Info.Tech.Biomed.Vol. 16, no. 3, pp. 339-347. REFERENCES [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16] [17] [18] [19] [20] [21] Ahmed M. N., Yamany S. M., Farag A. and Moriarty T. (2002), ‘Bias field estimation and adaptive segmentation of MRI data using modified fuzzy c-means algorithm’ IEEE Trans. Med. Imag., vol. 21, no. 3, pp. 193–199. Bloch F. (1946), ‘Nuclear induction’ Phys. Rev. vol. 70, pp 460-474. Bloembergen N., Purcell E. M. and Pound R. V. (1948), ‘Relaxation effects in nuclear magnetic resonance absorption’, Phys. Rev. vol. 73, pp 679-712. Brian R., Hunt Ronald L., Lipsman Jonathan M. and Rosenberg (2001), ‘A guide to MATLAB for beginners and experienced user’, Cambridge University Press. Canet D. (1996), ‘Nuclear Magnetic Resonance: Concepts and Methods’, John Wiley & Sons, New York. Chen S. and Zhang D. (2004), ‘Robust image segmentation using FCM with spatial constraints based on new kernel-induced distance measure’, IEEE Trans. Syst. Man Cybernet., vol. 34, no. 4, pp. 1907–1916. Chunming L., Chenyang X., Anderson A. and J. Gore, (2009), ‘MRI tissue classification and bias field estimation based on coherent local intensity clustering: A unified energy minimization framework’, in Proc. 21st Int. Conf. Inf. Process. Med. Imag, Lecture Notes in Computer Science, vol. 5636, pp. 288– 299. Dansong Cheng., Xianglong Tang., Jiafeng Liu, (2008), ‘Image Segmentation Based on Pulse Coupled Neural Network’, 11th Joint Conference on Information Sciences, Atlantis Press. Frank H., John A. and James P. (2002), ‘Atlas of Neuroanatomy and Neurophisiology’, Special Edition, Icon custom communications, USA. Hashemi R. H. and Bradley W. J. (1997), ‘MRI: The Basics’, Williams & Williams, Baltimore, MD. Johnson JL, Padgett ML. PCNN models and applications. Neural Networks, IEEE Transactions on 1999. Leemput V., Maes K., Vandermeulen D. and Suetens P. (1999), ‘Automated model-based bias field correction of MR images of the brain’, IEEE Trans. Med. Imag., vol. 18, no. 10, pp. 885–896. Liang Z. P. and Lauterbur P. C. (1999), ‘Principles of Magnetic Resonance Imaging: a signal processing perspective’, IEEE press series in biomedical engineering. Liew A. and Yan H. (2003), ‘An adaptive spatial fuzzy clustering algorithm for 3-D MR image segmentation’, IEEE Trans. Med. Imag., vol. 22, no. 9, pp. 1063–1075. Ming Chuan H. and Don Lin Y. (2012), ‘Fuzzy C Means Algorithm – A Review’, IJSRP, Vol.2 Issue 12., November 2012., pp.1-3. Nishimura D. G. (1996), ‘Principles of Magnetic Resonance Imaging’, April. Pham D. and Prince J. (1999), ‘Adaptive fuzzy segmentation of magnetic resonance images’, IEEE Trans.Med. Imag., vol. 18, no. 9, pp. 737–752. Gonzalez Rafael C. and Woods Richard E. (2002), ‘Digital Image Processing’, Second Edition, Prentice Hall, Upper Saddle River, New Jersy. Schempp W. J. (1998), ‘Magnetic Resonance Imaging: Mathematical Foundations and Applications’, John Wiley and Sons, New York. Sikka K., Sinha N., Singh P. K. and Mishra A. K. (2011), ‘A fully automated algorithm under modified FCM framework for improved brain MR image segmentation’ Magn. Reson. Imag., vol. 27, pp. 994– 1004. Waldemark K, Lindblad T, Becanovic V, Guillen JLL, Klingner PL. Patterns from the sky: Sattilite image analysis using pulse coupled neural networks for preprocessing. Segmentation and edge detection. Pattern Recognition Letters 2000. ISSN: 2231-5381 http://www.ijettjournal.org Page 85