- 2. Prepared by: Siddiqui Arshad Hussain A. M.E.(MSA) Part-2 Roll no. 296 Course: Image Processing Hars10203@gmail.com Faculty of Technology And Engineering, Maharaja Sayajirao University Of Baroda Department of Electrical Engineering
- 3. Contains 1) Image Segmentation 2) Historical Background 3) Introduction 4) Basic Concept I. Different Levels Of Flooding 5) Dam Construction 6) Watershed Segmentation Algorithm 7) Drawback of Watersheds algorithm 8) Gradient of image 9) Use of Marker ī§ Summery ī§ References 3hars10203@gmail.com
- 4. 1. Image Segmentation: âĸ Let R represent entire spatial image region occupied by an image. We may view image segmentation as a process that partition R into n Sub-region R1,R2,âĻ..,Rn . 4hars10203@gmail.com
- 6. 2. Historical Background of Watershed Segmentation. âĸ In 1975 first algorithm was developed, for Topographical digital elevation.(US, and 1984/86) âĸ In 1978/82/90 first algorithm was developed for digital image processing.(US, and 1982/90) â focus on elevation (gradient). â Not accurate, â because extreme computational demand, Not efficient âĸ In 1991 L. Vincent and P. Soile make this idea practical.(Make this concept successful) â Each minima represent one basin.(Flooding) â Fill from bottom. â Algorithm based on sorting the pixel in increasing order of their gray values. âĸ 1994 modified watershed segmentation. . . 6hars10203@gmail.com
- 7. There are two basic approaches to watershed image segmentation. 1. Flooding.(Catchment Basin) (Used in Watershed Segmentation) 1. Rainfall (Finding, downstream path from each pixel to local minima)or gradient. 7hars10203@gmail.com
- 8. 3. INTRODUCTION OF WATERSED SEGMENTATION īą Image segmentation is based on three principal concepts īą Detection of discontinuities īą Thresholding īą Region Processing īą Morphological Watershed Image Segmentation embodies many of the concepts of above three approaches īą Often produces more stable segmentation including continuous segmentation boundaries īą Provides a simple framework for incorporating knowledge based constraints 8hars10203@gmail.com
- 9. 4. BASIC CONCEPT OF WATERSED SEGMENTATION īą Image is visualized in 3-DIMENSIONS. īą 2 spatial dimensions īą grey levels īą Any grey tone image can be considered as a TOPOLOGICAL SURFACE. 9hars10203@gmail.com
- 10. Based on visualizing an image in 3D 0 20 40 60 80 100 0 50 100 0 5 10 15 20 25 10hars10203@gmail.com
- 12. CONTINUEDâĻ. īą Topographical interpretation consist of three points īą Points belonging to regional minimum īą Catchment Basin or watershed īą Divide lines or watershed lines (Points at which water would be equally likely to fall to one or more such minima) īą Main aim of the segmentation algorithm based on this concept is to find watershed lines. 12hars10203@gmail.com
- 13. īą Punch the regional minimum and flood the entire topography at uniform rate from below īą A dam is built to prevent the rising water from distinct catchment basins from merging īą Eventually only the tops of the dams are visible above the water line īą These dam boundaries correspond to the divide lines of the watersheds I. DIFFERENT LEVELS OF FLOODING 13hars10203@gmail.com
- 16. īą In topographical view shown earlier the height of the mountains was proportional to the grey scale value of the original image īą Water level is rising in consecutive images shown in the previous slide īą In order to prevent water from spilling out of the structure we imagine the entire topography to be enclosed by dams of height greater than highest possible mountain īą The value of the height is determined by the highest possible gray-level value in the input image 16hars10203@gmail.com
- 17. 5. Dam Construction īą Dam construction is based on binary images, which are members of 2-D integer space īą The dam must be built to keep water from spilling across the basins. īą Let M1 and M2 be the set of coordinates of the points in the two regional minima. īą The set of coordinates of the points in the catchment basin associated with the two minima in the flooding level n be Cn(M1) and Cn(M2). īą Let the Union of these sets be C[n]. 17hars10203@gmail.com
- 19. CONTDâĻ. īą Now let q denote the connected component formed in the figure b by dilation from flooding stage n -1 to stage n īą The dilation of the connected components by the structuring element in figure 3 is subjected to 2 conditions īą The dilation has to be constrained to q īą The center of the structuring element can be located only at the points of q during dilation īą The dilation cannot be performed on the set of points that may cause the sets being dilated to merge 19hars10203@gmail.com
- 20. CONTDâĻ. īą Condition 1 is satisfied by every point during dilation and condition 2 did not apply to any point during dilation process in the first figure īą In figure 2 several points fail the condition 1 while meeting condition 2 resulting in broken perimeter shown in the figure īą In figure 4, 1-pixel cross-hatched path shows the desired separating dam at the nth stage of flooding īą Construction of dam at this level of flooding is completed by setting all the points in the path just determined to the value greater than maximum gray- level value in the image 20hars10203@gmail.com
- 21. 6. WATERSHED SEGMENTATION ALGORITHM īą Let M1, M2, M3âĻ.Mn be the sets of coordinates of points in the regional minima of the image g(x,y) īą C(Mi) be the coordinates of points of the catchment basin associated with regional minima Mi īą T[n] = { (s,t) | g(s,t) < n } īą T[n] = Set of points in g(x,y) which are lying below the plane g(x,y) = n īą n = Stage of flooding, varies from min+1 to max+1 īą min = minimum gray level value īą max = maximum gray level value 21hars10203@gmail.com
- 22. ALGORITHM CONTDâĻ. īą Let Cn(M1) be the set of points in the catchment basin associated with M1 that are flooded at stage n. īą īą Cn(Mi) = 1 at location (x,y) if (x,y) Đ C(Mi) īą AND (x,y) Đ T[n], otherwise it is 0. īą C[n] be the union of flooded catchment basin portions at the stage n īą => īą => 22hars10203@gmail.com
- 23. ALGORITHM CONTDâĻ. īĸ Algorithm keeps on increasing the level of flooding, and during the process Cn(Mi) and T[n] either increase or remain constant. īĸ Algorithm initializes C[min +1] = T[min+1], and then proceeds recursively assuming that at step n C[n-1] has been constructed. īĸ Let Q be set of connected components in T[n]. īĸ For each connected component q Đ Q[n], there are three possibilities: 23hars10203@gmail.com
- 24. ALGORITHM CONTDâĻ. īĸ Condition (a) occurs when a new minima is encountered, in this case q is added to set C[n-1] to form C[n]. īĸ Condition (b) occurs when q lies within a catchment basin of some regional minima, in that case īĸ Condition (c) occurs when ridge between two catchment basins is hit and further flooding will cause the waters from two basins will merge, so a dam must be built within q. 24hars10203@gmail.com
- 25. DAM CONSTRUCTION īĸ As shown in the previous images, a one pixel thick dam can be constructed when needed by dilating q âŠ C[n-1] with a 3 Ã 3 Structuring matrix of 1âs and constraining the dilation to q. īĸ Algorithm efficiency can be improved by using only values of n that correspond to existing gray level values in g(x,y). īĸ Histogram of g(x,y) can be used to evaluate min, max and these values. 25hars10203@gmail.com
- 26. 7. Drawback of Watershed Algorithm âĸ Drawback of Watershed Algorithm based image segmentation. īąOver Segmentation īąSensitivity to noise īąLow contrast boundaries īąPoor detection of thin edge 26hars10203@gmail.com
- 27. 8. GRADIENT OF IMAGE īĸ Regions of the image characterized by small variations in gray levels have small gradient values, so watershed segmentation is applied on the gradient of the image rather than the actual image. īĸ In this way, the regional minima of catchment basins correlate nicely with the small value of the gradients corresponding to the objects of interest. 27hars10203@gmail.com
- 29. 9. Use of Marker īĸ Direct application of the watershed segmentation algorithm generally lead to over-segmentation of an image due to noise and other local irregularities of the gradient. īĸ Solution is to limit the number of allowable regions by incorporating a preprocessing stage designed to bring additional knowledge into the segmentation procedure. īĸ A concept of markers is used as a solution, A Marker is a connected component belonging to an image. 29hars10203@gmail.com
- 31. MARKERS CONTDâĻ. īĸ Selection of markers consists of two principal steps: ī Preprocessing ī Definition of a set of criteria īĸ There two types of markers: ī External : associated with the background ī Internal : associated with the objects of interest īĸ In the previous image due to large number of potential minima, image is over-segmented. 31hars10203@gmail.com
- 32. MARKERS CONTDâĻ. īĸ An effective measure to minimize the effect of small spatial details is to filter the image with a smoothing filter. ī i.e. a Preprocessing step. īĸ For example, we can define the Internal markers to be : īą region surrounded by the higher altitude points. īą every region should be a connected component īą every point in the region should have same gray level value. īą External markers can be some regions of particular background color. 32hars10203@gmail.com
- 33. Summery: âĸ The watershed algorithm Is extremely power full and faster compare to others. But it is also proved to be more accurate. Furthermore , it turn out to be very flexible, since it can be easily adapted to any kind of digital grid and extended to n- dimensional images and graph. 33hars10203@gmail.com
- 34. References: īą M. Sonka, V. Halava and Roger B., âImage Processing Analysis and Machine Visionâ, Second Edition By: PWS Publication, Page no. 590,186. īą R. C. Gonzalez and R. E. Woods, âDigital Image Processingâ third edition, Prentice Hall, 2010. īą William K. Pratt âDigital Image Processingâ, Third Edition, Page number 563. īą Sonka, Hlava and Boyle, âDigital Image Processing And Computer Visionâ, Page number-202,549. īą Vincent L. and Soille P. âWatersheds in digital Spaces: An efficient Algorithm based on immersion Simulationsâ, IEEE Transaction on Pattern Analysis and Machine Intelligence, 13(6):583-598-1991. 34hars10203@gmail.com
- 35. Thankyou