Performance Evaluation of Watershed Segmentation
Algorithm for Noisy and Noise free images using
Adaptive Thresholding and Masking
Inderpal Singh
Department of CSE, PG Student,DAV Institute of Engineering &
Technology,Jalandhar,Punjab,522101,India
for the image segmentation. Examples are, edge based
Abstract— This paper has presented a performance evaluation segmentation, region based segmentation, threshold based
of different image segmentation techniques. The image segmentation, markov random field based segmentation,
segmentation; segments a given image into separate regions and hybrid techniques and clustering based image segmentation
objects. It is widely used in various vision applications like face [12]. These segmentation methods differ from their
detections, motion detection etc. The overall objective of this computation complexity and segmentation quality.
paper is to design and implement various techniques of image
segmentation. The shortcomings of image segmentation II. IMAGE SEGMENTATION TECHNIQUE
techniques will also be evaluated. This paper ends up with the
performance evaluation of the over-segmentation, watershed Most segmentation techniques are either region-based or edge
segmentation using masking and also effect of the noise on the based Region-based techniques rely on common patterns in
masking based watershed segmentation techniques. It has been intensity values within a cluster of neighboring pixels. The
shown that the noise has affected the segmentation at a great cluster is referred to as the region, and the goal of the
extent.
segmentation algorithm is to group regions according to their
Index Terms—IMAGE SEGMENTATION, WATERSHED,
anatomical or functional roles [11]. Edge-based techniques
CLUSTERING, THRESHOLDING. rely on discontinuities in image values between distinct
regions, and the goal of the segmentation algorithm is to
accurately demarcate the boundary separating these regions
I. INTRODUCTION [11].
The purpose of image segmentation is to partition an image
III. Masking Based Watershed Transform
into meaningful regions with respect to a particular
application. The segmentation is based on quantities taken
from the image and might be colour, texture, grey level, depth Watershed transform has concerned with great attention
or motion. in recent years as an efficient morphological image
segmentation tool. It is similar to region-based approach; it
Applications of image segmentation range from filtering of begins the growing process from every regional minimum
noisy images, medical imaging, locating objects in satellite point, each of which creates a single region after the
images (roads, forests, etc.), automatic traffic controlling transform. Watershed algorithm combines both the
systems, machine vision to problems of feature extraction and discontinuity and similarity properties successfully [5][16]. It
recognition [8]. Image segmentation means assigning a label performs well when it can distinguish the background
to each pixel in the image such that pixels with same labels location and the foreground object. It is based on grayscale
share common visual appearances. It makes an image easier mathematical morphology. The main drawback of watershed
to analyze in the image processing tasks. transform is over-segmentation, sensitive to noise and high
computational complexity those make it unsuitable for
There are many different methods available to implement real-time process [6][17].
image segmentation. There are many approaches available
The masking operations are divided into two stages: cell
and nucleus making. The better cell-mask and nucleus- mask
Manuscript received October 9, 2001. (Write the date on which you value are determined by Eq. 3 and Eq. [Link] adaptive
submitted your paper for review.) This work was supported in part by the masking operations are used image normalization (N) and
U.S. Department of Commerce under Grant BS123456 (sponsor and
financial support acknowledgment goes here). Paper titles should be written
adaptive thresholding (T1 and T2) on the R, G and B color
in uppercase and lowercase letters, not all uppercase. Avoid writing long channels. The adaptive threshold, we have used a dynamic
formulas with subscripts in the title; short formulas that identify the threshold selection process (T1 and T2) by Eq. 1 and Eq. 2
elements are fine (e.g., "Nd–Fe–B"). Do not write "(Invited)" in the title. based on Gray-threshold function.
Full names of authors are preferred in the author field, but are not required.
Put a space between authors' initials. Where, Gray threshold is calculated by Gt.
F. A. Author is with the National Institute of Standards and Technology,
Boulder, CO 80305 USA (e-mail: author@ [Link]).
S. B. Author was with Rice University, Houston, TX 77005 USA. He is T2 Gt (N(N>T1)) (1)
now with the Department of Physics, Colorado State University, Fort
Collins, CO 80523 USA (e-mail: author@lamar. [Link]). M1 N>T1 (2)
T. C. Author is with the Electrical Engineering Department, University
of Colorado, Boulder, CO 80309 USA, on leave from the National Research Where, cell-mask and nucleus-mask are denoted by M1 and
Institute for Metals, Tsukuba, Japan (e-mail: author@[Link]).
M2 respectively.
M2 N>T2 (3)
An image can have several regional maxima or minima
but only one global maxima or minima. We have used Impose
Minima to create new minima in the mask image at certain
desired location by adaptively selecting threshold operation
(T1 and T2) for morphological reconstruction to eliminate all Figure 5.1(a) Figure 5.1(b)
minima from the image except the minima we specified. For
morphological processing, we have applied Impose Minima
function to create morphological process image using
nucleus-masking (M2) and adaptive mask image on
three-color channels.
IV. LITERATURE SURVEY
Figure 5.1(c) Figure 5.1(d)
The watershed transformation is a powerful tool for image
segmentation based on well-known mathematical (a) Original image (b) Gradient image (c) Watershed Transform
morphology- based approach. In reference [7], the authors (d) Segmented output
propose an improved method watershed algorithm for natural Figure 5.1(b) has shown the gradient image for the image
color image segmentation based on adaptive shown in Figure 5.1(a). It is clearly shown that the Figure
marker-extraction to overcome over-segmentation of the 5.1(b) shows the sharp changes areas in efficient manner.
watershed transform. In reference [8], the authors have Figure 5.1(c) has shown the watershed of the image shown in
presented a marked extraction based on adaptive color image Figure 5.1(d). It is clearly shown that the watershed has been
segmentation algorithm to improve the watershed, the over segmented while segmenting the Figure 5.1(a) so will
traditional marker for the lack of extraction methods, many produce poor results as shown in Figure 5.1(d). Therefore some
consider the minimum characteristics of properties, and set special aid likes masking or markers are required while using
the adaptive threshold. the watershed transform.
The authors proposed method performs better than original B. Analysis of Masking Based Watershed Algorithm for
watershed algorithm with a strong anti-noise performance. In Noise Free Image.
reference [3], the authors presented an integrated K-Means
clustering algorithm with marker controlled watershed The Watershed method, also called the watershed transform, is
segmentation algorithm. Several approaches exist to solve the an image segmentation approach based on gray-scale
over- segmentation problem, such as integrating watershed mathematical morphology, to the case of color or, more
with region merging algorithm [9], watershed based on generally speaking, multi component images. Different
gradient modification and hierarchical region merging strategies are presented and a special attention is paid to the
algorithms [10], combined marker-based watershed and “bit mixing approach”. This method objectively maps
region merger [11], marker-controlled watershed crown multi-dimensional data into a mono-dimensional space[13]. In
segmentation [12], morphological gradient applied to new geography, a watershed is the ridge that divides areas drained
active contour model [13], marker-based watershed by different river systems. By viewing an image as a geological
algorithm [14], and interactive segmentation by matching landscape, the watershed lines determine the boundaries that
attributed relational graphs are based on watershed, graph separate image regions. In the topographic representation of an
cuts, shortest paths (geodesic) and random walker [15]. image I, the numerical value (i.e., the gray tone) of each pixel
stands for the evolution at this point. The watershed transform
V. PERFORMANCE EVALUATION computes the catchments basins and ridgelines, with catchment
basins corresponding to image regions and ridgelines relating
a. Evaluation of Over Segmentation to region boundaries.
The watersheds transformation makes a number of regions
as an output. The over-segmentation problem comes mostly
from the noise and quantization error [11]. To eliminate the
effect of local minima from noise or quantization error on the
final results. First, the gradient of the original image is
computed as a pre-processing and then the watersheds
transformation is applied on the gradient of image[12][15].
Figure 5.2 Red, Green and Blue Channel output
Another approach is to apply a post-processing where a
large number of regions are merged until the output meets a Figure 5.2 has shown the red channel of the image,
given criteria which can be the number of regions or a Green channel of the image and the blue channel of the image.
dissimilarity value between homogeneous regions. Figure
6.1(a) has shown the original image going to be segment. It is
color image, which can be easily split, or segment into
various parts.
Figure 6.3 Red, Green and Blue Adaptive Mask Output Figure 6.7(c) Figure 6.7(d)
Figure 6.3 has shown the output of the masked images of each
(a) Noisy image (b) Segmented image (c) Noisy image (d) Segmented image
color channel shown in Figure 6.3.
Figure 6.7(a) has shown the salt and pepper noise effected
image with 10 % noise. Whereas the Figure 6.7(b) has sown
the segmented image. It is clearly shown that the results are
not much accurate than without noisy image. Figure 6.7(c)
has shown the salt and pepper noise effected image with 50 %
noise of the Figure 6.1(a). Whereas the Figure 6.7(d) has
shown the segmented image. It is clearly shown that the
Figure 6.4 Smoothed Red, Green and Blue Segmented Image results are not much accurate than without noisy image.
Figure 6.4 has shown the morphological outputs of the Figure
6.3 respectively i.e. of each channel of RGB. Table I,II and III has shown the comparison of the original
and noisy image. It has been clearly shown that when noise
increases at high rate the resultant images lost all its features
at rapid rate. Like at density 50 % PSNR found to 7.88, which
is far away from the 100.
Mean Square Error (MSE) is calculated pixel-by-pixel by
adding up the squared difference of all the pixels and dividing
Figure 6.5 Red, Green and Blue Channel Segmented Image
by the total pixel count.
Figure 6.5 has shown the final segmented outputs of the Figure
6.4 respectively i.e. of each channel of RGB. VI. CONCLUSION
The literature review has shown that the over-segmentation
Figure 6.6 has shown the final segmented image which problem has been ignored in the most of existing work. The
concatenation of the Figure 6.5. The image very clearly noise has also found to be critical issue for image
segmented and showing the each segmented plane separately. segmentation techniques. So it is required to modify the
existing methods in such a way that the modified technique
will work better for noisy images as well and also overcome
the problem of over segmentation.
This performance evaluation of the over-segmentation,
watershed segmentation using masking and also effect of the
noise on the masking based watershed segmentation
techniques has been shown. It has been proved that the noise
has affected the segmentation at a great extent. In near future
Figure 6.6 Segmented Output
we will extend this work to propose a new technique which
will modify the image watershed based segmentation using
C. Analysis Of Masking Based Watershed Algorithm For switching median filter and dynamic thresholding to improve
Noisy Image. the segmentation area even in case of noisy images.
Digital image noise may come from various sources. The
REFERENCES
acquisition process for digital images converts optical signals
into electrical signals and then into digital signals and is one
process by which the noise is introduced in digital 1. Yuqian Zhao, Jianxin Liu, Huifen Li, and Guiyuan Li,“ Improved
images[14]. watershed algorithm for dowels image segmentation,” 7th IEEE World
Congress on Intelligent Control and Automation, 2008. pp. 7644-7648.
Each step in the conversion process experiences fluctuations, 2. Xiaoyan Zhang, Yong Shan, Wei Wei, and Zijian Zhu, “An image
caused by natural phenomena, and each of these steps adds a segmentation method based on improved watershed algorithm,” IEEE
random value to the resulting intensity of a given pixel. International Conference on Computational and Information Sciences
(ICCIS), 2010,pp.258-261.
3. Ashwin Kumar and Pradeep Kumar, “A New Framework for Color
Image Segmentation Using Watershed Algorithm”, Computer
Engineering and Intelligent Systems, Vol. 2, No.3 pp.41-46, 2011.
4. Anju Bala, “An Improved Watershed Image Segmentation Technique
using MATLAB,” International Journal of Scientific & Engineering
Research Vol.3, No.6, pp.1-4, June 2012.
Figure 6.7(a) Figure 6.7 (b) 5. Yuncai Zhou and Hui Ren,“Segmentation Method for Rock Particles
Image Based on Improved Watershed Algorithm,” IEEE International
Conference on Computer Science & Service System (CSSS), 2012,
pp.347-349.
6. Jie Chen, Meng Lei, Yao Fan, and Yi Gao,“Research on an improved
watershed algorithm to image segmentation,” 7th International
Conference on Computer Science & Education (ICCSE), 2012,
pp.1917-1919.
7. Changmin Zhang, Shuaiqi Zhang, Junxia Wu and Shaoxiong Han, “An 2 0.1088 57.7990 0.3298 0.0173
improved watershed algorithm for color image segmentation,”2012 3 0.0898 58.6302 0.2297 0.0171
International Conference on Computer Science and Electronics 4 0.1903 55.3698 0.4363 0.0181
Engineering (ICCSEE), 2012, pp.69-72. 5 0.2769 53.7423 0.5262 0.0186
8. Md. Sharifur Rahman and Md. Rafiqual Islam, “Counting objects in an 6 0.2359 54.4382 0.4857 0.0184
image by marker controlled watershed segmentation and thresholding,” 7 0.3087 53.2688 0.5557 0.0188
3rd IEEE International on Advance Computing Conference (IACC), 8 0.2594 54.0249 0.5093 0.0185
2013, pp.1251-1256. 9 0.1889 55.4033 0.4346 0.0180
9. Xianwei Han, Yili Fu and Haifeng Zhang,“A fast two-step
10 0.3239 53.0603 0.5691 0.0188
marker-controlled watershed image segmentation method,”
International Conference on Mechatronics and Automation
Table II: Comparative Analysis of watershed for noise free image
(ICMA),2012, pp.1375-1380.
10. Boren Li, Mao Pan, and Zixing Wu, “An improved segmentation of high
Image Watershed for noise free image
spatial res- olution remote sensing image using Marker-based
MSE PSNR RMSE BER
Watershed Algorithm,” 20th IEEE International Conference on
1 0.0155 66.2582 0.1245 0.0151
Geoinformatics, 2012, pp.1-5.
2 0.0148 66.4574 0.1217 0.0150
11. Farheen K. Siddiqui and Vineet Richhariya,“An Efficient Image
Segmentation Approach through Enhanced Watershed Algorithm,” 3 0.0376 62.4073 0.1940 0.0160
Computer Engineering and Intel- ligent Systems, Vol.4, No.6, pp 4 0.0560 60.6805 0.2367 0.0165
1-7,2013. 5 0.0125 67.2055 0.1117 0.0149
12. P.P. Acharjya, A. Sinha, S. Sarkar, S. Dey and S. Ghosh,“A New 6 0.0480 61.3557 0.2190 0.0163
Approach Of Watershed Algorithm Using Distance Transform Applied 7 0.0809 59.0835 0.2845 0.0169
To Image Segmentation,” International Journal of Innovative Research 8 0.0293 63.4962 0.1712 0.0157
in Computer and Communication Engineering, Vol.1, No.2, pp 9 0.1205 57.3552 0.3471 0.0174
185-189, April 2013. 10 0.0094 68.4316 0.0970 0.0146
13. Dibyendu Ghoshal and Pinaki Pratim Acharjya,“Effect of Various
Spatial Sharpening Filters on the Performance of the Segmented Images Table III: Comparative Analysis of watershed for noisy image
using Watershed Approach based on Image Gradient Magnitude and
Direction,” International Journal of Computer Applications, Vol. 82, Image Watershed for noise image
No.6, pp 19-25, November 2013. MSE PSNR RMSE BER
14. [Link] Rahman and [Link] Islam,“Segmentation of color 1 0.0813 59.0659 0.2851 0.0169
image using adaptive thresholding and masking with watershed 2 0.2107 54.9287 0.4590 0.0182
algorithm,” IEEE International Conference on Informatics, Electronics 3 0.2188 54.7638 0.4678 0.0183
& Vision (ICIEV), 2013, pp.1-6. 4 0.1563 56.2263 0.3953 0.0178
15. Rabul H Laskar, Kalyan Banerjee and Debajit Basak,“Removal of High 5 0.1027 58.0474 0.3205 0.0172
Density Salt and Pepper Noise from Color Images through Variable 6 0.1326 56.9386 0.3642 0.0176
Window Size,” IEEE International Conference on Circuits, Power and
7 0.0870 58.7684 0.2950 0.0170
Computing Technologies, 2013, pp. 1132-1136.
8 0.1293 57.0472 0.3597 0.0175
16. S. Beucher, F. Meyer, “The morphological approach to segmentation:
9 0.1635 56.0284 0.4044 0.0178
The water- shed transformation, Mathematical Morphology in Image
10 0.1329 56.9294 0.3646 0.0176
processing, Marcel Dekker Inc”, New York, pp.433-481, 1993.
17. [Link], [Link], and [Link], Image Processing, Analysis, and
Machine Vision, PWS Publishing, 1999.
Test Images: Figure (a) has the original image which is taken
from the Berkeley image Segmentation database. Figure (b)
clearly shown that the watershed has been over-segmented
while segmentation. It will produce poor result as shown in
Figure (b) therefore some special aid likes masking and (a) (b) (c) (d)
marker are required while using the watershed segmentation
algorithm.
Figure (c) shows the segmented image using existing
watershed algorithm based upon masking method. The image
is very well segmented and showing the each segmented
plane separately.
Figure (e) shows the segmented image of figure (d) using (a) (b) (c) (d)
existing watershed algorithm based upon masking method. It
is clearly shown that the results are not much accurate than
without noise image.
Table I: Comparative Analysis of Oversegmentation
Image Oversegmentation
MSE PSNR RMSE BER (a) (b) (c) (d)
1 0.2716 53.8253 0.5212 0.6186
(a) (b) (c) (d)
(a) (b) (c) (d)
(a) (b) (c) (d)
(a) (b) (c) (d)
(a) (b) (c) (d)
(a) (b) (c) (d)
(a) (b) (c) (d)