Copyright © 2013 IJECCE, All right reserved
A Comparative Study on Image Segmentation Using
Various Combinations of Spatial Filters and Structuring
Elements in Watershed Algorithm
Pinaki Pratim Acharjya, Santanu Santra, Dibyendu Ghoshal
Abstract — A comparative study on image segmentation using mathematical morphology has been carried out for various combination of edge detecting spatial filters and structuring elements to accomplish morphologically smoothing the test image. It has been found out from the present study subjectively that the Laplacian of Gaussian (LoG) filter and Octagon structuring element yields the satisfactory image segmentation with respect to the image appearance. From objective point of view the aforesaid combination has been found to produce minimum entropy in the segmented image.
Keywords – Segmentation, Edge Detecting Filters, Structuring Elements, Watershed Algorithm.
I. I
NTRODUCTIONImage segmentation [1-5] has become an important aspect in image processing oaring to its ability to be fed into the computer for subsequent image analysis and computer vision. There are broadly two categories of image segmentation process, edge based and region based [6-12, 38]. Apparent from these, watershed algorithm (which is inherently based on mathematical morphology) [13-22] is often used for image segmentation and this is based on edge detection and morphological smoothing operator. The main efficiency of watershed segmentation process lies in the fact that it is stable and it eliminates post processing process such as edge linking. There are various studies are found in different research papers [23-32] but no comparative study on watershed algorithm which is based on multiple combination of edge detection filters and morphological operation with structuring elements of various shapes is found in published literatures or in on-line papers [23-37].
The filter is actually a mask of weights arranged in a rectangular pattern and in image processing filtering techniques [38-39] are important parts, in particular when it comes to image enhancement and restoration. Spatial filters are designed to highlight or suppress features in an image based on spatial frequency, such as suppressing 'noise' or highlighting specific image characteristics. A structuring element [40-41] is a shape, used to probe or interact with a given image, with the purpose of drawing conclusions on how this shape fits or misses the shapes in the image. It is typically used in morphological operations, such as dilation, erosion, opening, and closing, as well as the hit-or-miss transform. From graphical pint of view, structuring elements can be represented either by a matrix having 0’s and 1’s or as a set of foreground pixels all having values 1. In both the representations, the origin of the structuring elements must be clearly identified.
The present study has evaluated the result of nine combination of edge detecting spatial filters and structuring elements during morphological smoothing operation using image opening and closing [19-24]. It has been found from the parent study that a combination of LoG filter and structuring element of octagonal shape has yielded the best subjective segmented view of the test image. Apart from this, the same combination has been found to give the minimum entropy in the final version of the segmented image in comparison with other combination. The execution times for all combinations are also studied in this paper.
II. W
ATERSHEDA
LGORITHMFig.1. Watershed segmentation-local minima yield catchment basins, local maxima define the watershed
lines.
This algorithm works on gray level images where a grey-level image may be seen as a topographic relief. In a topographic relief the grey level of a pixel is interpreted as its altitude. A drop of water falling on a topographic relief flows along a path to finally reach a local minima or catchment basin (CB) and flows towards the nearest minima and accordingly local maxima build barriers or watersheds when different sources are meeting. The mathematical formulae of watershed algorithm are : Assume, Mi where i= 1 to n be the set of coordinates
points in the regional minima (catchment basins), of the image P(x,y) and C(Mi) be the coordinates points of
catchment basins associated with the regional minima Mi
= {( , ) | ( , ) < }
(1) Where,
T[n] = set of points in P(x,y) which are lying below the plane p(x,y) = n
min, max = minimum or maximum gray level value. n = stage of flooding varies from min + 1 to max + 1 Let Cn(M1) be the set of points in the catchment basin
Copyright © 2013 IJECCE, All right reserved ( 1) = ∩ { ( 1), [ ]} (2)
Where,
( ) = 1,0, ℎ( , ) ∈ ( ) ( , ) ∈ [ ] (3) C[n] is the union of flooded catchment basin portions at the stage n.
Where,
[ ] = ( 1) ∪ ( 2) . . . ( ) (4) [ + 1] = ( 1) ∪ ( 2) . . . ( ) (5) If the algorithm keeps on increasing flooding level then Cn(Mi) and T[n] will either remain constant or increase.
Algorithm initializes [ + 1] = [ + 1], and then precedes recursively by assuming that at step n C [n -1] has been constructed.
Let, G is a set of connected components in T[n] and for each connected component g ∈G[n], there possibilities will arise.
1. g∩ C[n- 1] is empty.
2. g ∩ C[n - 1] contains one connected component of C[n - 1].
3. g ∩ C[n - 1] contains more than one connected component of C[n - 1].
III. P
RESENTA
LGORITHMIn morphological image processing the selection of edge detecting filters and morphological structuring elements is a key factor. The basic theory edge detecting filters and morphological structuring elements is to construct different structure elements in the same square window. The flowchart of the present algorithm is stated below. This approach is based on the concept of edge detection filters and morphological structural elements with markers. In an image marker is a connected component. There are two types of markers in an image, internal markers and external markers. The set of internal markers are associated with objects of interest or with the foreground objects and set of external markers are associated with the background. These markers are used to modify the gradient image which is obtained by applying special edge detecting filters. In first step of present algorithm one color image chosen and accordingly converted into a gray scale image in second step. The gray scale image also called as black and white image only contains the intensity information of an image varying from black at the weakest intensity to white at the strongest. In third step the gradient image is computed using different edge detection filters where sobel, LoG and prewitt filter is applied in present study. The gradient magnitude image has high pixel values along object edges and low pixel values everywhere else. Next step of present algorithm computes the foreground objects using internal markers with the concept of morphological structuring elements. Disk, square and octagon structuring elements are applied in present study. In next step, the back ground objects are computed using external markers and finally the watershed transform is computed in the final step. In final segmented images (Figure: 3 to 11) the watershed ridge lines are superimposed on the original image.
IV. E
XPERIMENTALR
ESULTS ANDD
ISCUSSIONCopyright © 2013 IJECCE, All right reserved boundaries. The combination of LoG filter and octagon
structuring element has been shown in figure 8. In this case, edges are found to be sharper than earlier images and the overall view is more sparse. The combination has been found to yield minimum entropy (Table 1). Figure 10 indicates the segmented image for prewitt and octagon. This shows comparatively degraded view compared to figure 11. It can be ascertained from the figures that LoG filters gives sparse thin segments with octagonal structural element and this combination is optimum among the nine combinations dealt here. The execution times are also shown in table 1 for each of the combinations. It has been found that the execution time in combination of sobel operator and octagon element is maximum. The combination of LoG operator and square element has been found to yield minimum execution time.
Fig.2. Original image.
Fig.3. Segmented image using sobel operator and disk element.
Fig.4. Segmented image using prewitt operator and disk element.
Fig.5. Segmented image using LoG operator and disk element.
Fig.6. Segmented image using sobel operator and square element.
Fig.7. Segmented image using prewitt operator and square element.
Fig.8. Segmented image using LoG operator and square element.
Fog.9. Segmented image using sobel operator and octagon element.
Copyright © 2013 IJECCE, All right reserved Fig.11. Segmented image using prewitt operator and
aoctagon element. Table 1: Statistical Measurements Operator and Element
Combination
Entropy Execution Time
Sobel and disk 3.5995 2.888790 seconds. Prewitt and disk 3.5976 2.901011 seconds. Log and disk 3.5941 2.907123 seconds. Sobel and square 4.1968 2.405730 seconds. Prewitt and square 4.1932 2.414353 seconds. Log and square 4.1877 2.402202 seconds. Sobel and octagon 3.5795 3.046701 seconds. Log and octagon 3.5700 2.936981 seconds. Prewitt and octagon 3.5772 2.928377 seconds.
V. C
ONCLUSSIONA morphological study among nine combinations of edge detection filters and structuring elements to accomplish the edge detection and smoothing operations towards watershed segmentation has been carried out. A combination Laplacian of Gaussian filter and octagonal structural element, has been found to produce best result in regards to image clarity, sharpness of the watershed ridge lines and program execution time.
R
EFERENCES[1] Orlando J. Tobias and Rui Seara, ”Image Segmentation by Histogram Thresholding Using Fuzzy Sets”, IEEE Transactions
on Image Processing, Vol.11, No.12, 2004, pp. 1457-1465. [2] M. Abdulghafour, ”Image segmentation using Fuzzy logic and
genetic algorithms”, Journal of WSCG, vol. 11, no.1, 2003.
[3] K. Hohne, H. Fuchs, S. Pizer, “3D imaging in medicine:
Algorithms, systems, Applications”, Berlin, Germany, Springer –Verlag, 1990.
[4] N. Senthilkumaran and R. Rajesh, “Edge Detection Techniques
for Image Segmentation-A Survey”, Proceedings of the
International Conference on Managing Next Generation Software Applications(MNGSA-08),2008,pp.749-760.
[5] S. Beucher. The Watershed Transformation Applied to Image Segmentation. Proc.Pfefferkorn Conf. on Signal and Image Processing in Microscopy and Microanalysis, Cambridge, UK, pp. 299-314, Sept.1991.
[6] Kostas Haris, Serafim N. Efstratiadis and Aggelos K. Katsaggelos, “Hybrid Image Segmentation Using Watersheds and Fast Region Merging”, IEEE Trans. On Image Processing,
Vol. 7, No. 12, 1998.
[7] T. Pavlidis and Y. Liow, “Integrating region growing and edge detection,” IEEE Trans. Pattern Anal. Machine Intell., vol. 12,
pp. 225–233, Mar. 1990.
[8] F. D. Natale, G. Desoli, D. Giusto, and G. Vernazza,
“Polynomial approximation and vector quantization: A
region-based integration,” IEEE Trans. Commun., vol. 43, 1995.
[9] R. Beveridge et al., “Segmenting images using localized histograms and region merging,” Comput. Vis., Graph., Image
Process., vol. 2, pp. 311–347, 1989.
[10] Chu-Song Chen, Ja-Ling Wu and Yi-Ping Hung, “Theoretical
Aspects of Vertically Invariant Gray-Level Morphological Operators and Their Application on Adaptive Signal and Image
Filtering”, IEEE Trans. On Singal Processing, Vol. 47, No. 4,
1999.
[11] A. Morales and R. Acharya, “Non-linear multiscale filtering using mathematical morphology,” in Proc. 1992 IEEE Comput.
Soc. Conf. Comput. Vision Pattern Recogn., CVPR, Champaign, IL, 1992, pp. 572–578.
[12] M. Niedzwiecki and W. A. Sethares, “Smoothing of
discontinuous signals: The competitiveapproach,” IEEE Trans.
Signal Processing, vol. 43, pp. 1–13, Jan. 1995.
[13] K. Haris,“Hybrid image segmentation using watersheds and fast region merging,” IEEE Trans Image Processing, 7(12), pp. 1684 -1699, 1998.
[14] Jos B.T.M. Roerdink and Arnold Meijster.: “The watershed transform: Definitions, algorithms and parallelization strategies,”
Fundamental Informatics, Vol. 41, pp.187-228, 2001.
[15] S. Beucher,“The Watershed Transformation Applied To Image Segmentation”, Centre De Morphologie Mathématique. Ecole Des Mines De Paris, 1991.
[16] Shameem Akthar, D. RajyaLakshmi , Syed Abdul Sattar,
“Suppression of Over Segmentation in Watershed Transform Using Pre Processing Method”, International Journal of
Computer Technology and Electronics Engineering, Volume 2, Issue 2, April 2012.
[17] S. Beucher, M. Bilodeau, X. Yu. Road segmentation by watershed algorithms. Proceedings of the Pro-art vision group PROMETHEUS workshop, Sophia-Antipolis, France, April 1990.
[18] J. M. Gauch, “Image segmentation and analysis via multiscale
gradient watershed hierarchies”, IEEETrans Image Processing,
vol. 8, pp. 69–79, 1999.
[19] M. Ali HAMDI. Modified Algorithm marker-controlled watershed transform for Image segmentation Based on Curvelet Threshold. Canadian Journal on Image Processing and Computer Vision. pp, 88-91. Vol. 2 No. 8, December 2011.
[20] K. Parvati, et al, Image Segmentation Using Gray-Scale Morphology and Marker-Controlled watershed Transformation. Discrete Dynamics in Nature and Society, vol. 2008, Article ID 384346, 8 pages, 2008.
[21] M. C. Jobin Christ and R. M. S. Parvathi, “Segmentation of Medical Image using K-Means Clustering and
[22] Marker Controlled Watershed Algorithm”, European Journal of
Scientific Research Vol.71 No.2, pp. 190-194, 2012.
[23] R. Lotufo,W. Silva, Minimal set of markers for the watershed transform, in: Proc. ISMM2002.
[24] S. Z. Li, “On discontinuity-adaptive smoothness priors in
computer vision,” IEEE Trans. Pattern Anal. Machine Intell.,
vol. 17, pp. 576–586, 1995.
[25] Susanta Mukhopadhyay and Bhabatosh Chanda. “Multiscale Morphological Segmentation of Gray Scale Image” IEEE
Transactions on Image Processing, Vol.12, No. 5, May 2003. [26] N. Senthilkumaran and R. Rajesh, “Edge Detection Techniques
for Image Segmentation-A Survey”, Proceedings of the
International Conference on Managing Next Generation SoftwareApplications(MNGSA-08),2008,pp.749-760.
[27] E. Bataillou, “Weighted averaging using adaptive estimation of the eights,” Signal Processing, vol. 44, no.1, pp. 51-66, January 2009.
[28] Daniel L. Schmoldt, Pei Li and A. Lynn Abbott, “Machine
vision using artificial neural networks with local 3D
neighborhoods”, Computers and Electronics in Agriculture,
vol.16, 1997, pp.255-271.
[29] D. L. Page, A. F. Koschan, M. A. Abidi,”Perception-based 3D
Triangle Mesh Segmentation Using Fast Marching Watersheds”,
Proc. IEEE International Conference on Computer Vision and Pattern Recognition, Madison, WI, USA, Vol. II, pp. 27-32, June 2003.
Copyright © 2013 IJECCE, All right reserved
[31] A.N. Moga and M. Gabbouj,“ Parallel image component labeling with watershed transformation”, IEEE Trans., Pattern Anal Machine Intel., vol. 19, pp. 441-450, May 1997.
[32] J.M. Gauch,“Image segmentation and analysis via multiscale gradient watershed hierarchies,” IEEE Trans, Image Processing,
vol. 8, pp. 69-79, 1999.
[33] M. H. Chen and P. F. Yan, “A multiscaling approach based on
morphological filtering,” IEEE Trans. Pattern Anal. Machine
Intell., vol. 11, pp. 694–700, 1989.
[34] E. J. Coyle, J. H. Lin, and M. Gabbouj, “Optimal stack filtering
and the estimation and structural approaches to image
processing,” IEEE Trans. Acoust., Speech, Signal Processing,
vol. 37, pp. 2037–2066, 1989.
[35] C. R. Giardina and E. R. Dougherty, Morphological Methods in Image and Signal Processing. Englewood Cliffs, NJ: Prentice-Hall, 1988.
[36] H. J. A. M. Heijmans and C. Ronse, “The algebraic basis of
mathe-matical morphology, I. Dilations and erosions,” Comput.
Vis., Graph., Image Process., vol. 50, pp. 245–295, 1990. [37] J. Song and E. J. Delp, “The analysis of morphological filters
with multiple structuring elements,” Comput. Vis., Graph.,
Image Process., vol. 50, pp. 308–328, 1990.
[38] J. A. Benediktsson, M. Pesaresi, and K. Arnason, “Classification and feature extraction for remote sensing images from urban
areas based on morphological transformations,” IEEE
Transactions on Geoscience and Remote Sensing, vol. 41, no. 9, pp. 1940–1949, Sept. 2003.
[39] J. Inglada, “Automatic recognition of man-made objects in high resolution optical remote sensing images by SVM classification of geometric image features,” ISPRS Journal ofPhotogrammetry Rem. Sens., vol. 62, pp. 236–248, 2007.
[40] Philippe Salembier, “Structuring Element Adaptation for Morphological Filters”, Journal of Visual Communication and Image Representation, Volume 3, Issue 2, Pp. 115-136, June 1992.
[41] A.P. Ilayaraja, M. P. Gopinath, “An Analysis of Morphological Operation Using Arbitrary Structuring Element”, International
Journal of Modern Engineering Research, Vol.2, Issue.2, pp-354-357, 2012.
A
UTHOR’SP
ROFILEPinaki Pratim Acharjya
received his B.Tech degree in Information Technology, M.Tech degree in Computer Science and Engineering in 2007 and 2009 respectively from West Bengal University of Technology. He is doing his research works in National Institute of Technology, Agartala. Presently he is working in Bengal Institute of technology and Management, Santiniketan. He joined the institute in 2009 as a lecturer and now working as Assistant Professor in the Department of Computer Science and Engineering. His research interests include Digital Image Processing, Signal Processing.
Santanu Santra
received his BSC degree in Computer Science from Vidyasagar University in 2004, MSC degree in Computer Science from Vidyasagar University in 2006 and M.TECH. degree in Computer Science and Engineering from West Bengal University Of Technology in 2009. Presently he is working in Bengal Institute of technology and Management, Santiniketan. He joined the institute in 2009 as a lecturer and now working as Assistant Professor in the Department of Computer Science and Engineering. His research interests include Digital Image Processing, Wireless networking.
Dibyendu Ghoshal
received his B.Sc. degree in physics (Hons), B.Tech degree in Radio Physics and Electronics, M.Tech degree in Radio Physics and Electronics and the Ph.D. degree in Engineering, in 1981, 1984, 1986 and in 1997 respectively from University Of Calcutta. He was awarded Senior Research