Watershed and Region Growing Segmentation Tumor Detection

DOI : 10.17577/IJERTV4IS031088

Download Full-Text PDF Cite this Publication

Text Only Version

Watershed and Region Growing Segmentation Tumor Detection

Padmakant Dhage

Department of Electronics and Telecommunications STESs SKNCOE, Vadgaon (Bk.)

Pune, India

Dr. S. K. Shah.

Department of Electronics and Telecommunications STESs SKNCOE,Vadgaon (Bk.)

Pune, India

AbstractIn medical image processing, segmentation of anatomical regions of brain is the fundamental problem.Accurate segmentation is critical, especially when the tumor morphological changes remain subtle, irregular and difficult to assess by clinical examination. Traditionally, segmentation which is performed manually in clinical environment is operator dependent and it is a very tedious and time consuming labor intensive work. Two different segmentation techniques, namely Region Growing Technique (RGT) and Watershed algorithm are compared. Watershed algorithm proves to be a more promising technique for the segmentation of tumor in 2D MR Images irrespective of their location in the human body and even if their size is not known.

Keywords- Brain Tumor;Magnetic Resonance Imaging (MRI); WatershedSegmentation;ConnectedComponentlabeling(CCL); Region Growing Technique( RGT); MATLAB.


    Detection of brain tumor is one of the emerging issue in research of biomedical image processing. Human body is made up of many types of cells. Each type of cell has special function. Most cells in the body grow and then divide in an orderly way to form new cells as they are needed to keep the body healthy and working properly. When cells lose the ability to control their growth, they divide too often and without any order. The extra cells form a mass of tissue called tumor. Brain tumor detection plays an important role in medical field [1]. Brain tumor detection is detection of tumor affected part in the brain along with its shape size and boundary.

    Brain tumor is the leading cause of cancer death in human body. The cases of brain tumors are increasingly rapidly, particularly in the younger population. It was estimated that 14,320 adults would die because of the disease in 2013-14.The diagnosis estimation for this year is 23,380 for adults and 43,000 for children [2]. So its diagnosis and treatment has a vital importance in the medical field.Visual detection of these abnormal tissues may result in misdiagnosis of area and location of unwanted tissues due to human errors caused by visual fatigue.

    Brain tumors are classified based on the type of tissue involved, the location of the tumor, whether it is benign or malignant, and other consideration. Visually detection of these abnormal tissues may result in misdiagnosis of area and location of unwanted tissues due to human errors caused by visual fatigue .Early detection and correct treatment based on accurate diagnosis are important steps to improve disease outcome. Nowadays,Magnetic Resonance Imaging (MRI) is the noninvasive and much sensitive imaging test of the brain

    in routine clinical practice[3]. MR imaging uses a powerful magnetic field radio frequency pulses and a computer to produce detailed picture of organs, soft tissues,brain MRI is the procedure of choice for most brain disorders. It provides clear images of brainstem and posterior brain, which are difficult to view on a CT scan. As shown in Fig.1its image of MRI for patient with brain tumor.

    Axial slices Saggital slices Coronal slices

    Fig. 1MRI Image For Brain Tumor.

    From Last decades there is wide usage of Image processing in various applications. Broadly image processing breaks into two categories where one category gives major concentration on basic operation on image(Input and output both are images) and the second category is image analysis whose outputs are attributes extracted from input image(Input is an image while output is extracted feature). Image segmentation is one of the important part of image analysis[4]. Image segmentation is a technique that partitioned the input image into prerequisite semantic unique regions. In other words segmentation is a preprocess which subdividing an image into constituent parts or objects and should stop as object of interest in an application is isolated[5]. The ultimate goal is to make image more simplified one and that to get more meaningful to analyze .

    The principle of task is to recognize a tumor and quantifications from a particular MRI scan of brain image using digital image processing techniques and compute the area of the tumor by fully automated process and its symmetry analysis. Nowadays there are several methodologies for classifying MR images. Among all medical image processing, image segmentation is initial and important work, for example quantification of specified area must based on accurate segmentation.


    Tumor Segmentation




    Level Set Method

    Morphological Wavelet Method

    Fig.2Different Tumor Segmentation Methods

    A large variety of different segmentation approaches for images have been developed and published which have its own assumptions, advantages, and limitations[6]. Different tumor segmentation methods are shown in Fig. 2.

    1. Thresholding:

      Threshold based techniques are generally used for gray scaled image. It is one of the popular technique as it is very simple to implement. For gray scale image f(x,y) the image is assumed to be divided into two parts namely : background and forground. The forground is defined as the interesting objects and background as the rest. Threshold value T is first decided by analyzing all image pixels intensity. Any pixel (x,y) for which f(x,y) >T is called object point. Otherwise, that point is called background point. Thus, intensity level is compared to the background image and a threshold value decides if the pixel differs enough to belong to the foreground or not. Histogram Thresholding (HT) technique was used by

      N.M. Saeed.[7] to remove malignant tissue from DW-MRI images. HT method requires the use of Diffusion weighted Image(DWI) data set. In this method intensity is normalized from 0 to 1. It remove background and skull from DWI Images. Then data set images were enhanced by gamma law transformation and contrast stretching algorithms. These are applied to span the narrow range of DWI histogram for thresholding purpose, It is sensitive to noise and intensity inhomogenities, which can occur in MRIs. Both of these artifacts essentially corrupt the histogram of the image making separation more difficult. Due to this reason, this method fails to find a threshold that gives good segmentation.

    2. Classifier:

      Classifiers are known as supervised methods because they require training data that are manually segmented and then used for references for automatically segmenting new data. A simple classifier is the nearest neighbor classifier, in which each pixel is classified in the same class as the training datum with the closest intensity. The k-nearest neighbor classifier is considered a non-parametric classifier because it makes no underlying assumption about the statistical structure of the data. Bezdek JC and Hall LO [8][9] used classifier methods based on pattern recognition for segmentation of tumor from brain MR images. This requires feature space which is the range space of any function of the image, with the most common feature space being the image intensities themselves. Partitions feature space are derived from the image by using data with known labels. In this case variation in shape and gray level of tumors are very difficult to characterize. Limitation of classifiers is that thy generally do not perform any spatial modeling. Another limitation is the requirement of manual interaction to obtain training data.

    3. Clustering:

      Clustering is dividing of data into groups of similar objects. Each group consists of objects that are similar between themselves and dissimilar to objects of other groups. Clustering of data is a method in which large sets of data are grouped into clusters of smaller sets of similar data. The clustering algorithm finds the centroid of group of data sets. It can be categorized into supervised clustering demands human interaction to decide the clustering criteria.Unsupervised clustering includes hierarchical

      approaches such as relevance feedback techniques and it also includes density based clustering methods. K-mean clustering technique is used by J.Selvakumar and A.Lakshmi [10] [11] to recognize tumor shape and position in MRI image. In this method k-cluster center are chosen randomly distance between the each pixel to each cluster centers are calculated, pixel is moved to particular cluster which has shortest distance among all. Then main disadvantage of clustering is that it does not produce same result with each run, because the resulting clusters depend on initial random experiment

    4. Level Set Method:

      This technique approach for the medical image segmentation because it can handle any of the cavities, concavities, convolution, splitting, or merging. Adaptive level set algorithm technique is used by Zhibin Chen and TianshuangQiu[12][13] segment brain tumor tissues in MRI images.This technique introduced Geodesic Active Contour (GAC) model based on gradient information within the GAC framework to determine evolution directions, and speed of interface propagation using finite difference and upwind difference, but its usefulness has been limited by twoproblems. First 3D levels sets are relatively slow to compute, secondtheir formulation usually entails several free parameters, which can be very difficult to correctly tune for specific applications. The second problem is compounded by the first. Thus level set segmentation is not sufficient for the segmentation of the complex medical images and they must be combined with powerful initialization techniques to produce successful segmentation.

    5. Morphology based Wavelet Transform Method:

    Morphological image processing is a tool for extracting or modifying information on shape and structure of tumor within an image. Dilation, Erosion, skeltonization are particularly used in the analysis of grayscale MRI images.

    Wavelet transform is useful for the compression of digital image file for storing images using less memory and transmitting images faster and more reliably. It is also useful for cleaning the image from unwanted noise and blurring. Ahmed K[14] used morphology based wavelet transform method for tumor detection in medical field. In this method enhancement process applied by mathematical morphology then wavelet transform is applied at different resolution levels to extract localized tumor from MR image. But it isnt always easy to classify a brain tumor as benign or malignant as many factors other than the pathological features.

    Keeping in mind the limitation of existing brain tumor segmentation methods, this paper represent CCL based Watershed algorithm to identify and segment the brain tumors in patients efficiently which requires quick processing time and minimize the over segmentation problem up to a large extent as compared to Region growing technique.Watershed segmentation use intensity as a parameter to segment the whole image data set [9].Moreover, the additional complexity of estimation imposed to such algorithms causes a tendency towards connected component labeling approaches. This segmentation is reliable approach to achieve a proper estimation of tumor area. In all possible methods for this purpose, watershed can be used as a powerful tool which implicitly extracts the tumor surface.

    Process-II Removal of Noise using Bilateral filter

    Process-I Removal of Noise using Median filter

    Location of Tumor

    Area Calculation

    Image Preprocessing

    Output Image


    Image Acquisition

    Performance Evaluation

    Required Filtered MRI

    Watershed/Region Growing Segmentation

    Connected Component Labeling (CCL)

    Fig.3Block Structure of Proposed Method

    that can blur an imagewhile respecting strong edges. Its ability to decompose an image into different scales without causing haloes after modification has made it. Bilateral filtering is a technique to smooth images while preserving edges[18][19].

    (iii) Performance Evaluation

    In order to compare different segmentation algorithms, it is better to design some methods for the evaluation. Median filter and bilateral filter are used for performance evaluation, out of which Median filter proved to be best.

    1. Mean Square Error (MSE)

      It is defined for two m x n monochrome images I and K where one of the image is considered as noisy approximation and other is defined as

      The proposed system has four modulesnamelypreprocessing, segmentation,CCL and multiparameter calculation.Preprocessing includes filtering of

      = 1

      1 1

      [ ,

      =0 =0


      image. Segmentation is carried out by watershed and region growing algorithm. Using CCL location is found out and area is calculated of tumor in MR image.

      (, )]

    2. Peak Signal to Noise Ratio (PSNR)

        1. Image Acquisition

          Images of brain obtained by MRI Scan are of three types: axial images, saggital images, coronal images[15]. The number of images depends on the resolution of the movement of the MRI magnets.

          MRI scan images of brain are displayed as an array of pixels and stored in Malab7.10. Grayscale or intensity images are displayed by default size 256 x 256. All the MRI examinations were performed on a 0.35T magneto vision scanner (Siemens-syngo-fast view).The brain MR images are stored in the database in GIF or JPEG format.

          It is measure of quality of reconstruction in image compression and it is calculated as below :

          = 10 log 2

          = 2010 (2)

    3. Correlation (CORR)

      The correlation coefficient x,y between two random variables X and Y with expected values µx and µy standard deviation and is defined as

      (, )

        1. Image Preprocessing

          , =

          ( )( )

          = x y


          Original Image Noise Added Image

          Median Filter Image Bilateral Filter Image

          Fig. 4 Denoising Using Median Filter and Bilateral Filter

          It performs image filtering and sharpens the edges in the image. RGB to gray conversion and reshaping also takes place. For removal of noise median filter and bilateral filter have been used [16]. Median filter technique calculates the median of surrounding pixels to determine the new value of pixel by sorting all pixel values by their size, then selecting the median value as the new value for the pixel. The intensity value of the center pixel is replaced with median value. For better understanding the function of median filter, Add the salt and pepper noise artificially and removing it using median filter [17]. Bilateral filter is a non-linear technique

          Where E is the expected value operator and Cov means covariance. Since


          2 = 2 2 (4)

          The correlation is defined only if both of the standard deviations are finite and both of them are nonzero.

    4. Contrast parameter (H)

    An intensity image is a data matrix MATLAB stores intensity image as a single matrix, with each element of the matrix corresponding to one image pixel. MATLAB handles intensity images as indexed images. Contrast (H) is often used to characterize the xtent of variation in pixel intensity.Object in an image is I(x, y).Where min H and max H represent the minimum and maximum intensity values of the neighborhood pixel Cg(IH),as shown in below equation(6). Hd is obtained by totaling the contrast of a supervised block as shown in below equation. Contrast is calculated as below:

    (x,y) = ,


    Suppose the lower point in image are B1, B2,B3,.Bz are

    coordinates of these points for the image.I(i,j)and CBm refers to the points of catchment basins associated with the

    ( ,) = (, ) (, )(6)

    The following TABLE I shows the MSE, PSNR, ContrastCorrelation, values of the above filters.


    Performance Parameter

    Median Filter

    Bilateral Filter


















    minimum region Bz(x,y) represented by X[n] accordingly


    X[n]={ , ) (, < } (7)

    X[n] is the coordinate of points in I(i,j) geometrically lying under the plain I(i,j)=n. Topographically the image filled with the water in integer filling increments begin from n=tmax- I to n= n=tmin+I..

    The number of points under the fluid is necessary, due to that marker will used in black color for the coordinates in X[n] which are below the level I(i,j)=n and the other point in white color.

    = (8)

    Where represents the coordinates in catchment basins related to Bm, which are fluid filling at the level n.Then let C[n] refer to union of the filling fluid of the points of catchment basins of level n:


    40 Bilateral

    30 Filter




    20 Median Filter


    Fig. 5 Plot of MSE, PSNR, Contrast, Correlation values of Median Filter

    and Bilateral Filter

    1. Watershed Segmentation

      Fig. 6 Watershed Segmentation Fig.7 Watershed Principle Method Simplified 2 dimension

      Watershed segmentation is a well known edge based segmentation algorithm [20].Watershed means area of land where all the water drains off it and goes into the same place. In geography, watershed line is defined as the line separating two catchment basins, as shown in Fig.6. The rains that fall on either side of the watershed line will flow into the same lake. This idea is used in image processing as a method of solving problems. Watershed segmentation into two dimension is shown in Fig.6.The principle of watershed in image processing is shown in Fig.7.

      Finally Ctmax+I refer to all catchment basins union.


      +1 = (10)

      From equation (8) and (9),C[n] is a subgroup of X[n] accordingly then watershed lines is prepared when C[tmax+1]=X[tmin-1].Then the procedure follows to reconstruct C[n-1] at level n. C[n] can be obtained from C[n- 1] by assuming S as the set of the connected component in X[n],at s S[n] there are three assumption.

      1. sC[n-1] is empty and the assumption is verify at a new minimum is encountered, in this case s is incorporated into C[n-1] to produce C[n].

      2. sC[n-1],contains more than one connected component of C[n-1] and this lead to sis incorporated in to C[n-1] to produce C[n].

      3. In last case sC[n-1] contains more than one connected component of C[n-1] and this verify at all or part of rim separating two or more catchment basins in encumbered. Additional water is filled lead to merge the water at these catchment basins. According to that one or more than one dam must reconstruct to pervert overflow between catchment basins within s.

    2. Region GrowingSegmentation

      It is a well developed technique for image segmentation. It is a technique for extracting an image region that is connected based on some predefined criteria. These criteria can be based on intensity information or edges in the image. It requires a seed point that is manually selected by an operator and extracts all pixels connected to the initial seed based on some predefined criteria. The possible criterion might be to grow the region until an edge in the image is met. Noise in the image can cause the seeds to be poorly placed.Disadvantage is that it requires manual interaction to obtain the seed point.

      Thus, for each region that needs to be extracted, a seed must be planted [21].

    3. Connected Component Labeling (CCL)

      CCL is an image and groups its pixels into components based on pixel connectivity.i.e. all pixels in connected component share similar pixelintensity values and are in some way connected with each other. Once all groups have been determined, each pixel is labeled with a gray level or a color (color labeling) according to the component it was assigned to.CCL works by scanning an image, pixel-by-pixel (from top to bottom and left to right) in order to identify connected pixel regions, i.e. regions of adjacent pixels which share the same set of intensity values V(For a binary image V={1};however, in a gray level image V will take on a range of values, for example:V={51,52,53,78,79,80}).

      It works on binary or gray level images and different measures of connectivity are possible. For the following we assume binary input images and 8-connectivity.The connected components labeling operator scans the image by moving along a row until it comes to a point p(where p denotes the pixel to be labeled at any stage in the scanning process) for which V={1}.when this is true, it examines the our neighbors of p which have already been encountered in the scan (i.e. the neighbors (i) to the left of p,(ii) above it,(iii and iv) the two upper diagonal terms).Based on this

      Flow Chart : Tumor Detection Watershed Segmentation


      Read Input Image and Convert into Gray Scale Image

      Remove noise from Grayscale Image using Median and Bilateral Filter

      Evaluate Performance Parameter of Median and Bilateral Filter. Choose Median Filter for

      Post Processing

      Mark Foreground Object Compute Background Marker

      Compute Watershed transform and perform morphological operation by Dilation and Erosion operation

      Compute Morphological image in size(1) and Size(2)


      information, the labeling of p occurs as follows :

      1. If all four neighbors are 0, assign a new label to p,


        If image (i,j)=0


        Display Tumor


      2. If only one neighbor has V={1}, assign to its label p, else

      3. If more than one of the neighbors have V=

    {1},assign one of the labels to p and make a note of the equivalences.

    After completing the scan, the equivalent label pairs are sorted into equivalence classes and a unique label is assigned to each class. As a final step, a second scan is made through the image, during which each label is replaced by the label assigned to its equivalence classes. For display, the labels might be different gray levels or colors[22].

    Fig. 8 Connected Component Labeling

    Compute crop area and perimeter of tumor segmented image and initialize a=0, p=0


    image (i,j)=1 No a=a+1,p=p+1


    Display area and perimeter of

    tumor image Stop

    Flow Chart: Tumor Detection Region GrowingSegmentation


    Read Input Image and Convert into Gray Scale Image

    Remove noise from Grayscale Image using Median and Bilateral Filter

    Evaluate Performance Parameter of Median and Bilateral Filter. Choose Median Filter for

    Post Processing

    Compute Region Growing transform using by seed point operation


    Initialize input image1;(R,C)=seed point; Tolerance=25;Mean of Region=Iseg


    Store Image in size (1) and size(2)

    for i=j=1


    If image (i,j)=0

    Display Tumor

    Fig. 9 Tumor Detection Using Watershed Segmentation

    Compute crop area and perimeter of tumor segmented image and initialize a=0, p=0

    If No

    image (i, j)=1 a=a+1, p=p+1

    Display area and perimeter of tumor image




area is less than 500, resulting image shown in Fig.9(g).Assign the RGB label for connected components


shown in Fig.9(h).Final detected tumor from MRI image is


shown in Fig.9(i).



In this section, the experimental results of proposed model watershed segmentation technique are presented.Input image shown in Fig.9.The input image Fig.9(a) was processed. It is denoise MRI image using median filter, resulting image is obtained shown in Fig. 9(c). Original MR image having binary, distance transform, watershed superimposed image shown in Fig.9(d), Fig.9(e) and Fig.9(f) respectively. Compute CCL to dilated image whose object

Fig.10Tumor Detection Using Region GrowingTechnique



Watershed Segmentation

Region Growing Technique














X=113 Y=76

X=128 Y=102


Region growing technique results for brain images are shown in Fig.10. Starting with the input image Fig. 10(a) is



Watershed Segmentation

processed. Denoise MRI image with median filter, resulting


500 Region Growing

image is obtained shown in Fig.10(d). 0

The superiority of this work is compared in terms of area, perimeter, eccentricity, entropy and centroid shown in TABLE II.According to this result, Watershed algorithm proves to be a more promising technique for the segmentation of tumor.


Fig. 11 Plot of Parameter values derived from Watershed Segmentation and Region Growing Technique


The advantage of this method is its simplicity, efficiency. It can remove the noise, high frequency component from MRI without disturbing edges and it is used to reduce salt and pepper noise.It can more accurately localize activated brain adjacent to regions of abnormal tissue such as tumors.No automatic approach yet exists for automatically and accurately computing the area. Its application to several datasets with different tumors sizes intensities and locations show that it can automatically detect and segment very different types of brain tumors with a good quality.Quantifying the area of the tumor is key indicator of tumor progression.An accurate area measurement can be used to analyze the effectiveness of new treatments.


Preprocessing can effectively detect and remove a considerable amount of the noise and artifacts with the help of median filter. Developed technique is introduced to solve the problem for tumor case of clinical MRI analysis. The proposed technique is based on Watershed segmentation and it has been successfully tested on MRI image data.Developed algorithm is used to know about the location and size of the tumor. Hence watershed segmentation can successfully segment a tumor provided parameters are set properly in MATLAB environment.All parameters which are extracted using developed algorithm specify the size and other dimensions of the tumor.


  1. P.Narendran,Mr.V.K.Narendrira Kumar, Dr.K.Somasundaram 3D Brain Tumors and Internal Brain Structures Segmentation in MR Images.I.JImage,Graphics and Signal Processing,2012,35-43 in MECS.

  2. American Society of Clinical Oncology National Brain Tumor Society Minstry of Health America.

  3. http://www.listen-up.org/med/ct-mri.html

  4. C.N.de Graaf, A.S.E Koster, K.L. Vincke, M.A. Viergever A Methodology for the Validation of Image Segmentation Methods 5th Annual IEEE Symposium on Computer Based Medical Systems 2007.

  5. Image Segmentation-Segmentation in Image Processing Wikipedia, the free encyclopedia.

  6. ShitalRaut, Dr. M.Raghuvanshi, Dr.R. Dharaskar ImageSegmentaion- A State of Survey for Prediction International Conference on Signal, circuits and systems 2009.

  7. NorhashimahMohd.Saad,S.A.R Abu-Bakar, SobriMuda, Musa Mokji- Segmentation of brain lesions in diffusion weighted MRI using Thresholdingtechinique IEEE International Conference on Signal and Image Processing application 2011.

  8. BezdekJC,HallLo,Clarke LP. Review of MR Image Segmentation techniques using pattern recognition.20:1033-1048; Med Phys 1993

  9. Schalkoff J. Pattern recognition: Stastical, structural and neural approach Newyork : Wiley & Sons, 1992.

  10. J.selvakumar,A.Lakshmi, T.Arivoli Brain Tumor Segmentation and its Area calculation in brain MR images using K-mean clustering and Fuzzy C-mean algorithm IEEE International Conference on Advances in engineering, Science and Management March 30,31, 2012.

  11. S.Saraswathi, Dr.A.AlliraniA Survey on Image Segmentation via clustering, pattern Recog.,

  12. Dai Yuan-ming, Wewei, Linn Yi-ning. A level set image segmentation method using prior region information

  13. Zhibin Chen, Tianshuang, Qui & Su Ruan (2008).Fuzzy Adaptive Level Set algorithm for brain tissue segmentation. In: 9th International Conference on Signal Processing, Beijing, 26-29.

  14. Ahmed K. Mohamed Ben M. Detection of Brain tumor in Medical images using Morhphological and Wavlet transform International Conference on signal, circuits and systems 2009.

  15. G.M.N.R.Gajanayake, R.D.Yapa, B.Hewawithana Comparision of Standard Image Segmentation Methods for Segmentation of Brain Tumors from 2D MR Images.Fourth International Conference on Industrial and Information Systems, ICIIS2009,28-31december 2009,Sri lanka

  16. Bhausahebshinde, DnyandeoMhaske, A.R. Dani Study of noise Detection and noise removal techniques in medical images.I.J Image, Graphics and Signal Processing,2012,51-60 in MECS.

  17. J.Jaya, K.Thanushkodi, M.Karnan Tracking Algorithm for De-noising of MR Brain Images. IJCSNS International Journal of Computer Science and Network Security, Vol.9 No.11,November 2009.

  18. GhassanHamarneh and Judith Hradsky Bilateral Filtering of Diffusion Tensor Magnetic Resonance Images IEEE transactions on image processing, vol. 16, no. 10, October 2007

  19. Sylvain Paris, Pierre Kornprobst, Jack Tumblin and FredoDurand."Bilateral Filtering: Theory and Application Vol.4.Nov. (2008).

  20. Rajiv Ratan Sanjay Sharma and S.K.Sharma Brain Tumor Detection based on Multiparameter MRI Image Analysis Indian Journal of Science and Technology Vol.2.No.2(Feb2009)

  21. Mehdi Jafari, shohreshKasaei Automatic Brain Tissue Detection in MRI Images using Seeded Region Growing Segmentation and Neural Network Classification Australian Journal Basic and applied Science 5(8) 1066-1079,2011 ISSN1991-8178.

  22. Image Analysis-Connected Components LabelingWikipedia, the free encyclopedia.

  23. Rafael C,Gonzalez and Richard Woods E. Digital image processing 2nd edition, PrenticeHall,2002

Leave a Reply