Comparative improvement of image segmentation performance with

0 downloads 0 Views 578KB Size Report
Keywords: Watershed transformation, Graph based image segmentation,. Marker, Over ... the help of marker and then produce the required segmented image.
Compar ative impr ovement of image segmentation per for mance with gr aph based method over water shed tr ansfor m image segmentation Suman Deb1, Subarna Sinha1 1

National Institute Of Technology Agartala, Tripura, India {sumandebcs, subarna.sinha9}@gmail.com

Abstr act. Watershed transformation based segmentation which is a segmentation based on marker is a special tool used in image processing. Color based image segmentation has been considered an important area since its inception, due to its wide variety of applications in the field of weather forecasting to medical image analysis etc. Due to this color image segmentation is widely researched. This paper analyses the performance of two main algorithms used for image segmentation namely Watershed algorithm and graph based image segmentation. The performance analysis proves that graph based segmentation is better than watershed algorithm in cases where noise is maximum and also the over segmentation problem is removed. Color segmentation with graph based image segmentation gives satisfactory results unlike watershed algorithm. Keywor ds: Watershed transformation, Graph based image segmentation, Marker, Over segmentation.

1 Intr oduction and Related Work Image segmentation analyses and segments a particular image into meaningful segments. Generally segmentation is done on particular region of interest to detect the objects within it. The partitioned segments in an image can have same color or texture. The combination of segments produced by image segmentation is the entire image. Some particular feature like color, texture etc are used to determine the membership of a particular pixel in a particular image segment. Image segmentation has various applications like locating tumours [1], face recognition [2], and image retrieval[3]. The quality of result obtained by image segmentation is dependent on the segmentation algorithm chosen. Watershed algorithm which is based on morphology have been a major topic of discussion since it came into being.[4], [5], [6], [7]. Watershed algorithm is sensitive to noise, causing problems of over-segmentation. Whereas several modifications of watershed algorithm have been developed which claim to have solved the problems of watershed segmentation [5]. For example, the long time consumption disadvantage of traditional watershed algorithm has been

solved in few works [5], but the oversegmentation problem still remains to be a hurdle. The area of image segmentation is full of challenges and ideas. Even in case of human vision the perception segmentation plays an important role. Various recognition techniques and image indexing techniques make use of segmented image. This gives the importance of image segmentation in the field of image processing. Many low level image segmentation techniques like edge detection thresholding technique etc are there which provide output with minimal usability in other fields like recognition. To obtain desired results, a segmentation method should work properly even in presence of noise by diminishing it or by performing any kind of preprocessing. The segmentation technique in case of watershed transform based method does not have efficient execution or processing time. Whereas an image segmentation technique should be time efficient. The graph based segmentation aims at solving this problem as well. Moreover the regions or segments formed by watershed algorithm do not give the desired output when compared to that of graph based segmentation. Image segmentation should result in extraction of semantically meaningful objects automatically from an image. Graph-based methods introduce a top-to-bottom approach, which models images as weighted graphs and provides segmentation by recursively partitioning the graph into sub-graphs. This approach is also seen in human perception, where a human interprets a whole perceptual view from top to bottom . The organization of this paper is as follows. In the next Section we discuss Watershed algorithm, and the Efficient Graph-Based Image Segmentation by Pedro F. Felzenszwalb to implement graph based segmentation. [8]. In Section 4 the comparative analysis is done and then the sections following it consists of the implementation environment information and the results obtained when both the algorithms depicted in Section 2 and Section 3 are applied on the set of image provided in Section 4 .

2 Water shed tr ansform image Segmentation There are numerous types of image segmentation method like region based methods, thresholding technique, clustering etc. Watershed transform based image segmentation can be considered as a type of region based segmentation which uses mathematical morphology[9]. The concept of watershed algorithm is taken from geography, where a topographic relief is flooded by water. The watershed lines form the divide lines of the domains of attraction of rain falling over the region as in the figure shown below. Vincent and Soille [10] proposed an alternative technique, namely immersion simulations, based on a FIFO queue to implement the watershed segmentation. Watershed algorithm is an iterative adaptive threshold algorithm. It takes the gradient magnitude of the image as a topographic map, the gradient magnitude in correspond with altitude, the different gradient in correspond with the peak and basin in valley in the image. Marker is knowledge about the object based on application-oriented; it is selected by the operator manually or by automatic process. The watershed algorithm can transform and develop regional growth with the help of marker and then produce the required segmented image.

The advantages of Watershed algorithm are-[11]. The segmented image produced by application of this approach consists of connected segments unlike edge based detection which gives disconnected contours as result. Secondly, the region contours adhere well to the real object boundaries. Thirdly, the combination of regions produced by watershed segmentation is equal to the entire image. Like the advantages of Watershed algorithm, it also has some disadvantages. Watershed segmentation is sensitive to noise, the main reason leading to over-segmentation. Besides, it doesn’t work well in detection of thin structures and significant areas with low contrast boundaries.

Fig. 1. Diagram of watershed algorithm

3 Gr aph based image segmentation The goal of Graph based image segmentation algorithm[8] described below is to develop computational approaches to image segmentation which can be used in various computer vision tasks like the widely used low level segmentation techniques(e.g.- edge based image segmentation). It is necessary that the segmentation technique should have two important properties. Firstly, the goal of an image segmentation method is to precisely understand the regions to be segmented perceptually. The important groupings or regions often reflect the global aspects of the image. The important aspects of the graph based segmentation method are to provide precise characterizations of what is perceptually important and produce the segments in the image accordingly. Secondly, the image segmentation techniques should be highly efficient, running in time nearly linear in the number of image pixels. In order to be of practical use, we believe that segmentation methods should run at speeds similar to edge detection or other low-level visual processing techniques

[8]. For example, a segmentation technique that runs at several frames per second can be used in video processing applications. Eigenvector-based image segmentation methods had been used extensively in the past few years [12]. These methods are too slow to be practical for many applications. The segmentation technique involving graph based approach satisfies both the properties mentioned above. It captures certain perceptually important non-local image characteristics and is computationally efficient, running in O(n log n) time for n image pixels. Graph-based image segmentation requires the image to be represented in the form of a graph. [8] G = (V; E) is an undirected graph with vertices vi ∊ V. The vertices together form the set of pixels to be and edges (vi, vj) ∊ E represents the pairs of neighboring vertices representing neighboring pixels. Each edge (vi, vj) ∊ E has a corresponding weight w ((vi, vj)), which is a non-negative measure of the dissimilarity between neighboring elements vi and vj. In the case of image segmentation, the elements in V are pixels and the weight of an edge is some measure of the dissimilarity between the two pixels connected by that edge (e.g., the difference in intensity, color, motion, location or some other local attribute). In the graph-based approach, a segmentation S is a partition of V into components such that each component (or region) C ∊ S corresponds to a connected component in a graph G' = (V, E'), where E' ⊆ E. In other words, any segmentation is induced by a subset of the edges in E. There are different ways to measure the quality of a segmentation but in general we want the elements in a component to be similar, and elements in different components to be dissimilar. This means that edges between two vertices in the same component should have relatively low weights, and edges between vertices in different components should have higher weights. 3.1 Algor ithm : Segmentation algor ithm. Input: Graph G = (V, E). It has p vertices and q edges. Output: Segmentation of V into components S = (C1,…., Cp), where p denotes the number of components. 1. Edges E is sorted into a non-decreasing order by weight. Let O = (o1,…, oq) be the order generated. 2. At the start each vi is placed in its own component. 3. Repeat step 3 for m = 1,…,q. 4. Sm-1 is generated from Sm in the following way. Let vi and vj denote the vertices connected by the m-th edge in the ordering, i.e., om = (vi,vj). If vi and vj are in disjoint components of Sm-1 and w(om) is small compared to the internal difference of both those components, then merge the two components otherwise do nothing. More formally, let Cim-1 be the component of Sm-1 containing vi and Cjm-1 the component containing vj .

If Cim-1≠Cjm-1 and w(om)≤ MInt(Cim-1,Cjm-1) ,(where w(om) is the weight difference between two vertices and MInt(Cim-1,Cjm-1) is the internal difference of two components Cim-1 and Cjm-1) then Sm is obtained from Sm-1 by merging Cim-1and Cjm-1. Otherwise Sm = Sm-1. 5. Return S = Sq This algorithm[8] has been implemented to perform the segmentation based on graph concept.

Fig. 2. Flow diagram of graph based segmentation

4 Analysis of Water shed image segmentation and Gr aph based image segmentation The comparative analysis of watershed algorithm and graph based algorithm for image segmentation can be made clear with the help of a set of images which we used for experiment purpose. The comparative study is done on the following set of images.

(a)

(b)

(c)

Fig. 3. Test images for segmentation There are several aspects of watershed algorithm which fall under its disadvantages. The results obtained after applying the two algorithms on the set of images separately, show the flaws of watershed algorithm and prove that the graph based image segmentation is better for image segmentation. Watershed segmentation is sensitive to noise, the main reason leading to over-segmentation. Besides, it doesn’t work well in detection of thin structures and significant areas with low contrast boundaries. Whereas graph based segmentation is not much effected by noise as in the case of watershed algorithm. So the segmentation results are better. The graph based segmentation method has its own limitations as well. The method needs further research to be applied for automatic real time scenarios. Some important future explorations of research can be - incorporation of the fuzzy set theory into graph based frameworks to achieve enhanced segmentation performances, use of multi-criteria to partition a graph to achieve an efficient segmentation, constructing a graph using feature sets rather than pixel level information etc.

5 Implementation and Results The performances of the two algorithms are evaluated in the following section. The algorithm is implemented in Microsoft Visual Studio with OpenCv in C++ environment and executed on a core i3 processor, 2.27 GHZ, 3 GB RAM computer.

(a)

(b)

(c)

Fig. 4. Result images on application of Graph based segmentation on the set of images in Fig. 3

(a)

(b)

(c)

Fig. 5. Result images on application of Watershed based segmentation on the set of images in Fig. 3

(a)

(b)

(c) Fig. 6. (a) Original image histogram, (b) Histogram of image segmented by Graph based segmentation (c) Histogram of image segmented by Watershed algorithm

(a)

(b)

(c) Fig. 7. (a) Original image histogram, (b) Histogram of image segmented by Graph based segmentation (c) Histogram of image segmented by Watershed algorithm

(a)

(b)

(c) Fig. 8. (a) Original image histogram, (b) Histogram of image segmented by Graph based segmentation (c) Histogram of image segmented by Watershed algorithm

Standard Images deviation Mean Median Original Image 6 (a) 41.61 9.95 165 Graph segmented image 6(b) 81.94 160.35 0 Watershed algorithm segmented image 6(c) 25.64 7.76 0 Original Image 7 (a) 54.97 135.1 129 Graph segmented image 7(b) 64.89 133.99 144 Watershed algorithm segmented image 7(c) 83.42 137.84 179 Original Image 8 (a) 69.2 148.04 173 Graph segmented image 8(b) 59.04 145.4 168 Watershed algorithm segmented image 8(c) 44.13 54.63 80 Table 1. Mathematical data obtained from histogram of the images under test The mathematical analysis on the histograms of all the three images and their respective outputs on application of watershed algorithm and graph based segmentation algorithm also prove that the graph segmentation method is better. The comparison of values of standard deviation calculated from the histograms of the three images in Fig.7 (a), Fig.7(b) and Fig.7(c) shows that the standard deviation obtained from the image segmented by graph based segmentation is close to the original one compared to Fig.7(c),which has been segmented by watershed algorithm. Similar kind of results is found in case of Fig.8 (a), Fig.8 (b) and Fig.8(c). But if we notice the case of Fig.6 (a), Fig.6 (b) and Fig.6 (c), we can see that the value of standard deviation computed from the histogram of the image segmented from watershed transform algorithm is closer to that of original image unlike the cases in Fig.7 and Fig. 8. From that it can be concluded that the segmentation of image, (which is free from noise) in Fig.4 (a) is done nicely by the watershed based algorithm. And, thus it works for images without noise but does not work efficiently for images without noise. Even if the results are viewed by someone having no knowledge to image processing methods, he/she can easily say that the segmentation performance is improved in case of graph based segmentation. Fig.3, Fig.4, Fig.5, proves this simple fact. In Fig.5 (a) we can see that watershed algorithm is producing as many segments as those produced by graph based segmentation in Fig.4 (a). But if we compare Fig 4(a) and Fig.5 (a) we can see that the segmentation in Fig.4 (b) is definitely better that Fig.5 (b). The same goes for Fig.4 (c) and Fig.5 (c). Fig.4 (a) and Fig.5 (a) is having similarity due to the absence of noise in the original image Fig.3 (a). But when we take some complex images like Fig.3 (b) and Fig.3 (c), the resultant images from graph based segmentation are definitely better.

6 Conclusion Watershed transformation based segmentation and graph based image segmentation have been described and analyzed in this paper. Watershed algorithm which is based on geographical concept is a special tool used in image processing. Due to the wide range use of image segmentation in various fields of applications, it has become

important to find out a proper image segmentation method from the various image segmentation techniques available. Color segmentation with graph based image segmentation gives satisfactory results unlike watershed algorithm. Graph based segmentation methods when used for image segmentation produce nicer results compared to that of Watershed based algorithm especially when noise is present in the image. Moreover the over segmentation problem in traditional watershed transform image segmentation is removed in the graph based segmentation of images. The segmentation results obtained from the later is having more resemblance when compared to the actual segments in the original image unlike the images segmented by watershed algorithm based segmentation.

Refer ences 1. N. Forghani, M. Forouzanfar, E. Forouzanfar, MRI Fuzzy Segmentation of Brain Tissue using IFCM Algorithm with Particle Swarm Optimization, 22nd International Symposium on Computer and Information sciences, pp. 1-4, 2007. 2. A.A.G. Azzawi, M.A.H. Al-saedi, Face Recognition Based on Mixed between Selected Features by Multiwavelet and Particle swarm optimization, Development in E-system Engineering (DESE), pp. 199-204, 2010. 3. A.A. Younes, I. Truck, H. Akdaj, Color Image Profiling using Fuzzy Sets, Turk J Elec Engin, Vol. 13, No. 3, pp. 343-359, 2005. 4. Vincent L, Soille P, Watersheds in digital spaces: an efficient algorithm based on immersion simulations. IEEE Transactions on PAMI, 1991,13(6): 583-598. 5. J.B.KIM,H.J.KIM, A Wavelet-based Watershed Image Segmentation for VOP Generation. IEEE International Conference on Pattern Recognition ,2002,2(1):505-508. 6. O’Callaghan R. J., Bull D.R, Combined Morphological Spectral Unsupervised Image Segmentation. IEEE Trans. on Image Processing, 2005,14(1):49-62. 7. CHIEN Shao-yi, HUANG Yu-wen; CHEN Liang-ge, Predictivewatershed: a fast watershed algorithm for video segmentation . IEEE Transactions on Circuits and Systems for Video Technology,2003,13(5):453 – 461. 8. Pedro F. Felzenszwalb, Daniel P. Huttenlocher, Efficient Graph-Based Image Segmentation, International Journal of Computer Vision September 2004, Volume 59, Issue 2, pp 167-181 9. Tanygin, S. image dense stereo matching by technique of region growing,.Journal of Guidance, Control, and Dynamics, 1997.20(4): p. 625-632. 10. L. Vincent, P. Soille, Watersheds in digital spaces: An efficient algorithm based on immersion simulations, IEEE Trans. Pattern Analysis and Machine Intelligence, vol.13, no.6, pp. 583-598, 1991. 11. Xianwei Han, Yili Fu, Haifeng Zhang, A Fast Two-Step Marker-Controlled Watershed Image Segmentation Method, Proceedings of 2012 IEEE International Conference on Mechatronics and Automation August 5 - 8, Chengdu, China 12. Y. Weiss, Segmentation using Eigenvectors: A Unifying View. Proceedings of the International Conference on Computer Vision (2), pages 975-982, 1999.