You are on page 1of 5

Automatic Segmentation of Brain Tumor using K-Means

Clustering and its Area Calculation

P. Dhanalakshmi & T. Kanimozhi


CSE Department, Annamalai University, Annamalainagar, Chidambaram 608002
E-mail : abi-dhana@rediffmail.com, Kani_2488@yahoo.co.in

physician gives the treatment for the strokes rather than


the treatment for tumor. So detection of tumor is
important for that treatment. They are mass and
malignant. The detection of the malignant tumor is
somewhat difficult to mass tumor. For the accurate
detection of the malignant tumor that needs a 3-D
representation of brain and 3-D analyzer tool. The
developing platform for the detection is mat lab.
Because it is easy to developed and execute. At the end,
we are providing systems that detect the tumor and its
shape.

Abstract In this paper, a simple algorithm for detecting the


range and shape of tumor in brain MR Images is described.
Generally, CT scan or MRI that is directed into intracranial
cavity produces a complete image of brain. This image is
visually examined by the physician for detection and
diagnosis of brain tumor. To avoid that, this project uses
computer aided method for segmentation (detection) of brain
tumor based on the combination of two algorithms. This
method allows the segmentation of tumor tissue with
accuracy and reproducibility comparable to manual
segmentation. In addition, it also reduces the time for
analysis. At the end of the process the tumor is extracted
from the MR image and its exact position and the shape also
determined. The stage of the tumor is displayed based on the
amount of area calculated from the cluster.

1.1 Literature review


An effective modified region growing technique for
detection of brain tumor. Modified region growing
includes an orientation constraint in addition to the
normal intensity constrain (Weaver et al., 2012). The
performance of the technique is systematically evaluated
using the MRI brain images received from the public
sources.

Keywords Abnormalities, Brain tumor, Fuzzy C-means, kmeans, Magnetic Resonance Imaging(MRI), Preprocessing, Thresholding.

I.

INTRODUCTION

This paper deals with the concept of automatic brain


tumor segmentation. Normally the anatomy of the Brain
can be viewed by the MRI scan or CT scan. In this paper
the MAI scanned image is taken for the entire process.
The MRI scan is more comfortable than CT scan for
diagnosis. It will not affect the human body. Because it
doesnt use any radiation. It is based on the magnetic
field and radio waves. There are different types of
algorithm were developed for brain tumor detection. But
they may have some drawback in detection and
extraction.

A Self-Organizing Map (SOM) is a competitive


artificial neural network with unsupervised learning. To
increase the SOM learning effect, a Fuzzy-Soft Learning
Vector Quantization (FSLVQ) algorithm has been
proposed in the literature, using fuzzy functions to
approximate lateral neural interaction of the SOM WenLiang Hung., 2011). In 1985, Computational
performance of FSLVQ is still not good enough,
especially for large data sets. In this work, we propose a
suppressed FSLVQ(S-FSLVQ) using suppression with a
parameter learning schema. We then apply the SFSLVQ to MRI segmentation and compare it with
several existing methods.

Tumor is due to the uncontrolled growth of the


tissues in any part of the body. The tumor may be
primary or secondary. If the part of the tumor is spread
to another place and grown as its own then it is known
as secondary. Normally the brain tumor affects
CSF(Cerebral Spinal Fluid).It causes Strokes. The

The traditional interpretation of MR images by a


specialist is difficult and time-consuming task, and the
result directly depends on the experience of the
ISSN (Print) : 2278-8948, Volume-2, Issue-2, 2013

130

International Journal of Advanced Electrical and Electronics Engineering (IJAEEE)

specialist (Vida Harati et al., 2010). Also, the protocols


and the noise due to imaging systems, make brain tumor
segmentations difficult to provide an acceptable
performance. As a result of this segmentation procedure,
the quantitative measure of tumor area can be calculated
and used for the follow-up of the disease.

structure and its normal behavior .This problem is


known as brain tumor.
1.2 Outline of the work
Pre processing is done by filtering. Segmentation is
carried out by advanced K-means algorithm. Feature
extraction is by thresholding and finally, Approximate
reasoning method to recognize the tumor shape and
position in MRI image using edge detection method.
The proposed method is a combination of two
algorithms were developed for segmentation. But they
are not good for all types of the MRI images.
Segmentation. But they are not good for all types of the
MRI images.

The segmentation becomes more challenging when


one wants to desrive common decision boundaries on
different object types in a set of images. Due to the
complex structure of different tissues such as white
matter (WM), gray matter (GM) and cerebrospinal fluid
(CSF) in the brain images, extraction of useful feature is
a fundamental task.
Brain tissue and tumor segmentation in MR images
have been an active research area. Extraction of good
features is fundamental to successful image
segmentation (Shaheen Ahmed et al., 2011, Khan M.
Iftekharuddin et al., 2011). Due to complex structures of
different tissues such as the gray matter (GM), white
matter (WM), and cerebrospinal fluid (CSF) in the MR
brain images, extraction of useful features is a
challenging task. Variability in tumor location, shape,
size, and texture properties further complicates the
search for robust features. Posterior-fosse (PF) tumor is
usually located near the brain stem and cerebellum.
About 55-70% pediatric brain tumors arise in the PF.

Pre-processing

Segmentation
using K-means

Approximate
Reasoning

Feature
extraction

Fig.1 : Block diagram of Proposed method

Fig.1 is the block diagram for proposed system. It


uses the combination of two algorithms for
segmentation. The proposed method consists of five
modules. Each modules and its function will be
explained below.

The MRI is a well-established and non invasive


means of acquiring high-resolution images of the brain
of live subjects. Its precision and good soft tissue
contrast permits the discrimination of the nerve
connection from the congregations of neurons and
cerebrospinal fluid (CSF) (Mohamed et al., 2011).
Analysis of the spatial distribution of those tissues is
used to support the diagnosis of various brain illness
such as Alzheimers disease, dementia with Lowy
bodies and Parkinsons disease.

II. METHODS
2.1 Pre-processing
According to the need of the next level the pre
processing step convert the image. It performs filtering
of noise and other artifacts in the image and sharpening
the edges in the image. RGB to grey conversion and
Reshaping also takes place here. It includes median
filter for noise removal.

There are about 200 other types of tumors


diagnosed in UK each year. About 16 out of every 1,000
cancers diagnosed in the UK are in the brain (or 1.6%).
In India, totally 80,271 people are affected by various
types of tumor (M.Karnan et al., 2007 estimates). A new
meta aoristic algorithm HSOM with Fuzzy is used to
extract suspicious region to classify the brain tumor
image for segmentation.

2.2 Segmentation
Segmentation is carried out by advanced K-means
and Fuzzy C-means algorithms.
2.3 Feature extraction and approximate reasoning
The feature extraction is extracting the cluster which
shows the predicted tumor at the FCM (Fuzzy C-means)
output. The extracted cluster is given to the threshold
process. It applies binary mask over the entire image. In
the approximate reasoning step the tumor area is
calculated using the binarization method.

Brain is the kernel part of the body. Brain has a very


complex structure. Brain is hidden from direct view by
the protective skull. This skull gives brain protection
from injuries as well as it hinders the study of its
function in both health and disease. But brain can be
affected by a problem which cause change in its normal

ISSN (Print) : 2278-8948, Volume-2, Issue-2, 2013

131

International Journal of Advanced Electrical and Electronics Engineering (IJAEEE)

3.1.2 K-Means algorithm


Brain MR Image

The purpose of k-means algorithm is to cluster the


data. K-means algorithm is one of the simplest partitions
clustering method.

Pre-processing

K-Means is the one of the unsupervised learning


algorithm for clusters. Clustering the image is grouping
the pixels according to the some characteristics. In the
k-means algorithm initially we have to define the
number of clusters k. Then k-cluster center are chosen
randomly. The distance between the each pixel to each
cluster centers are calculated. The distance may be of
simple Euclidean function. Single pixel is compared to
all cluster centers using the distance formula. The pixel
is moved to particular cluster which has shortest
distance among all. Then the centroid is re-estimated.
Again each pixel is compared to all centroids. The
process continuous until the center converges.

Segmentation
using K-means
&FCM
Feature Extraction

Approximate Reasoning

Tumor Area
Measurement

W (C )

k 1 C ( i ) k C ( j ) k

Fig. 2 : Flowchart of Feature Extraction

xi x j N k
k 1

xi m k

C (i) k

(1)
III. DESIGN AND IMPLEMENTATION

For a given cluster assignment C of the data points,


compute the cluster means

According to the need of the next level the pre


processing step convert the image. It performs filtering
of noise and other artifacts in the image and sharpening
the edges in the image. RGB to grey conversion and
Reshaping also takes place here. It includes median
filter for noise removal. The possibilities of arrival of
noise in modern MRI scan are very less. It may arrive
due to the thermal effect. For better understanding the
function of median filter, we added the salt and pepper
noise artificially and removing it using median filter.

For a current set of cluster means, assign


observation as:

C ( i ) arg min x i m k

, i 1, , N

1 k K

3.1 MODELING TECHNIQUES


3.1.1 K-Means clustering
A cluster is a collection of objects which are similar
between them and are dissimilar to the objects
belonging to other clusters. Clustering is an
unsupervised learning method which deals with finding
a structure in a collection of unlabeled data. A loose
definition of clustering could be the process of
organizing objects into groups whose members are
similar in some way.

each

(2)

Iterate above two steps until convergence

For a current set of cluster means, assign each


observation as:

Iterate above two steps until convergence

Algorithm:
1. Give the no of cluster value as k.
2. Randomly choose the k cluster centers
3. Calculate mean or center of the cluster
4. Calculate the distance between each pixel to each
cluster center

K-means clustering is an algorithm to group objects


based on attributes/features into k number of groups
where k is a positive integer. The grouping (clustering)
is done by minimizing the Euclidean distance between
data and the corresponding cluster centroid. Thus the
purpose of k-means clustering is to cluster the data.

5. If the distance is near to the center then move to that


cluster.
6. Otherwise move to next cluster.
7. Re-estimate the center.

ISSN (Print) : 2278-8948, Volume-2, Issue-2, 2013

132

International Journal of Advanced Electrical and Electronics Engineering (IJAEEE)

features form a vector space and tries to find natural


clustering in them. As a part of this project, an iterative
version of the algorithm was implemented. The
algorithm takes a 2 dimensional image as input.

INPUT
DATA

3.2 K-MEANS SEGMENTATION


Image segmentation is typically used to locate
object and boundaries in image. The result of image
segmentation is a set of regions that collectively cover
the entire image, or a set of contours extracted from the
image. Segmentation is an important process to extract
information from complex medical image. Segmentation
has wide application in medical field. The main
objective of the image segmentation is to partition an
image into mutually exclusive and exhausted regions
such that each region of interest is spatially contiguous
and the pixels within the region are homogeneous with
respect to a predefined criterion.

GET K VALUE
AND CHOOSE K
RANDOM

CALCULATE THE
MEAN OR CENTER
FOR EACH CLUSTER

CALCULATE
DISTANCE B/W EACH
PIXEL AND CLUSTER

IF PIXEL
CLOSE TO

no

COMPARE TO
NEXT CLUSTER

Yes
MOVE TO SAME
CLUSTER

RE-ESTIMATE THE
CENTER

REPATE
PROCESS

Fig.4 : Output image for pre-processing and k-means for k=5


CLUSTERED
IMAGE

Fig.4 is the MR image given as input to the preprocessing and K-means algorithm. Here 0.02% of salt
and pepper noise is added and that has been removed
using the median filter. The K-mean algorithm clusters
the image according to some characteristics. Figure is
the output for K-Means algorithm with five clusters. At
the fifth cluster the tumor is extracted.

Fig.3 Flowchart of k-means algorithm

3.1.3 Mathematical representation


The distance between the cluster centers to each
pixel is calculated as

IV. EXPERIMENTAL RESULT


4.1 Data set

xi

The performance of brain tumor segmentation is


evaluated based on K-means clustering. Dataset consists
of Magnetic Resonance Imaging (MRI) size of
181X272. The MRI image dataset that we have utilized
in image segmentation technique is taken from the
publicly available sources. This image dataset consists
of 40 brain MRI images in which 20 brain images with

r.c(i)=k

M=

, k=1,.....,k.

(3)

Nk
D(i)=argmin||xi-Mk||2,i=1,...,N

(4)

Repeat the above two steps until mean value


convergence. The algorithm assumes that the data

ISSN (Print) : 2278-8948, Volume-2, Issue-2, 2013

133

International Journal of Advanced Electrical and Electronics Engineering (IJAEEE)

tumor and remaining brain images without tumor. The


brain images dataset are divided into two sets. Training
dataset and Testing dataset.

[2]

Wen-Liange, De-Hua Chen, Mii-shen Yang,


Suppressed fuzzy-soft learning vector quantization for
MRI segmentation,Elsevier ltd, 2011.

4.2 Performance Evaluation

[3]

Vida Harati, Rasoul Khayati, Abdolreza Farzan, Fully


automated tumor segmentation based on improved
fuzzy connectedness algorithm in brain MR
images,Elsevier ltd, 2011.

[4]

R.B.Dubey, M.Hanmandlu, Sr.Member, Shantaram


Vasikarla, Evaluation of ThreeMethods for MRI
Brain Tumor segmentation, IEEE, 2011.

[5]

Shaheen Ahmed, Khan M.Iftekharuddin, Efficacy of


Texture,Shape,and Intensity Feature Fusion for
Posterior-Foss
Tumor
Segmentation
in
MRI,IEEE,2011.

[6]

P.Vasuda, S.Satheesh, Improved Fuzzy C-Means


Algorithm for MR Brain Image Segmentation, IJCSE,
2010.

[7]

David
Rivest-Henault,
Mohamed
Cheriet,
Unsupervised MRI segmentation of brain tissues
using a local linear model and set,Elsevier, 2011.

[8]

T.Logeswari, M.Karnan, Hybrid Self Organizing Map


for improved Implementation of Brain MRI
Segmentation,IEEE, 2010.

[9]

T.
Logeswari,
M.Karnan,
An
Improved
Implementation of Brain Tumor Detection using
Segmentation
Based on Hierarchical Self
Organizing Map, IEEE, 2010.

[10]

Ehab F.Badran, Esraa Galal Mahmoud,and Nadder


Hamdy, An Algorithm for Detecting Tumors in MRI
Images,IEEE, 2010.

[11]

Ali Gooya, George Biros Christos Davatzikos, An


EM Algorithm for Brain Tumor Images Registration:A
Tumor Growth Modling Based
Approach,
IEEE,2010.

[12]

A.Alexandra Constantin, B.Ruzena Bajcsy, C.Sarah


Nelson, UnsupervisedSegmentation of Brain Tissue
inMulitvariate MRI,IEEE, 2010.

[13]

El-Sayed Ahmed El-Dahshan, Tamer Hosny, AbdelBadeeh M.Salem, Hybrid intelligent techniques for
MRI Brain Images classification, Elsevier ltd, 2009.

[14]

S.Taheri, S.H.Ong, V.F.H. Chong, Level-set


segmentation of brain tumors using a threshold-based
speed function, Elsevier, 2009.

[15]

Brijesh Shah, Satish Shah, Y P Kosta,Novel


Improved Fuzzy C-Mean Algorithm MR-images
Segmentation,IJSCE,2010

The Training dataset is used to segment the brain


tumor images and the testing dataset is used

Fig. 5 : Output image of the brain tumor

to analyze the performance of the proposed technique.


From this result, fig 5 is the output image of the brain
tumor segmentation and achieves better performance.
V. CONCLUSION AND FUTURE WORK
There are different types of tumors available. They
may be mass in brain or malignant over the brain.
Suppose if it is a mass then K- means algorithm is
enough to extract it from the brain cells. If there is any
noise present in the MR image it is removed before the
Kmeans process. The noise free image is given as input
to the k-means and tumor is extracted from the MRI
image.
The proposed method gives more accurate result.
The future work concentrates on segmentation using
Fuzzy C means for accurate tumor shape extraction of
malignant tumor and thresholding of output in feature
extraction. Finally approximate reasoning for
calculating tumor shape can be carried out.
VI. REFERENCES
[1]

A.R.Kavitha,Dr.C.Chellamuthu, Ms.Kavin Rupa, An


Efficient Approach for Brain Tumour Detection Based
on Modified Region Growing and Network in
MRIImages,IEEE, 2012.

ISSN (Print) : 2278-8948, Volume-2, Issue-2, 2013

134

You might also like