SlideShare a Scribd company logo
1 of 31
Watershed Algorithm
Watershed Segmentation
• In this context, a monochrome image is considered to be an
altitude surface in which high-amplitude pixels correspond
to ridge points, and low-amplitude pixels correspond to
valley points.
• If a drop of water were to fall on any point of the altitude
surface, it would move to a lower altitude until it reached a
local altitude minimum.
• The accumulation of water in the vicinity of a local
minimum is called a catchment basin.
• All points that drain into a common catchment basin are
part of the same watershed.
• A valley is a region that is surrounded by a ridge. A ridge is
the loci of maximum gradient of the altitude surface.
Watershed Algorithms
• There are two basic algorithmic approaches to
the computation of the watershed of an image:
rainfall and flooding.
• In the rainfall approach, local minima are found
throughout the image. Each local minima is
given a unique tag. Adjacent local minima are
combined with a unique tag.
• Next, a conceptual water drop is placed at each
untagged pixel. The drop moves to its lower-
amplitude neighbor until it reaches a tagged
pixel, at which time it assumes the tag value.
• Figure 17.3-2 illustrates a section of a digital
image encompassing a watershed in which the
local minimum pixel is black and the dashed line
indicates the path of a water drop to the local
minimum.
Watershed Algorithm
• In the flooding approach,
conceptual single pixel holes are
pierced at each local minima, and
the amplitude surface is lowered
into a large body of water.
• The water enters the holes and
proceeds to fill each catchment
basin. If a basin is about to
overflow, a conceptual dam is built
on its surrounding ridge line to a
height equal to the highest-
altitude ridge point.
Watershed Segmentation
• Any gray scale image can be viewed as a 3 d
topological surface. Black represents less pixel
value and the white region represents the
increasing pixel value. The pixel value
increases from lowest minima to the height of
topological image.
Watershed Segmentation
• There is a point in ridge valley where
probability for pixels values to fall either in
catchment basin 1 or 2.
• This ridge valley forms image boundary.
Watershed Segmentation
• Three types of pixels
• Points belonging to a regional minima
• Catchment basin of a regional minimum – Points at
which a drop of water will certainly fall to a single
minimum.
• Ridge lines/ watershed lines
– Points at which a drop of water will be equally like to fall to
more than one minimum.
Watershed Segmentation
• The concept of a watershed is based on
visualizing an image in three dimensions, two
spatial coordinates versus intensity.
• In such a “topographic” interpretation, three
types of points are considered :
• (1) points belonging to a regional minimum;
• (2) points at which a drop of water, if placed at
the location of any of those points, would fall
with certainty to a single minimum; and
• (3) points at which water would be equally likely
to fall to more than one such minimum.
Watershed Segmentation
• For a particular regional minimum, the set of
points satisfying condition (2) is called the
catchment basin or watershed of that minimum.
• The points satisfying condition (3) form crest lines
on the topographic surface, and are referred to as
divide lines or watershed lines.
• The principal objective of segmentation
algorithms based on these concepts is to find the
watershed lines .
Dam Construction
• In this method, A gray-scale image is taken in topographic
view, in which the height of the “mountains” is
proportional to intensity values in the input image. For ease
of interpretation, the backsides of structures are shaded.
• This is not to be confused with intensity values; only the
general topography of the three-dimensional
representation is of interest.
• In order to prevent the rising water from spilling out
through the edges of the image, the perimeter of the entire
topography (image) is being enclosed by dams that are
higher than the highest possible mountain, whose value is
determined by the highest possible intensity value in the
input image.
Dam Construction
• Suppose that a hole is punched in each regional
minimum [shown as dark areas ] and that the entire
topography is flooded from below by letting water
rise through the holes at a uniform rate.
• Figure 10.57(c) shows the first stage of flooding,
where the “water,” shown in light gray, has covered
only areas that correspond to the black background
in the image.
Dam Construction
• In Figs.(1) and (2) we see that the water now has
risen into the first and second catchment basins,
respectively.
• As the water continues to rise, it will eventually
overflow from one catchment basin into another .
Dam Construction
Dam Construction
• The first indication of this is shown in 10.57(f).
Here, water from the lower part of the left
basin overflowed into the basin on the right,
and a short “dam” (consisting of single pixels)
was built to prevent water from merging at
that level of flooding.
Dam Construction
• One of the principal applications of watershed
segmentation is in the extraction of nearly uniform
(blob-like) objects from the background.
• Regions characterized by small variations in intensity
have small gradient values. Thus, in practice, we often
see watershed segmentation applied to the gradient of
an image, rather than to the image itself.
• In this formulation, the regional minima of catchment
basins correlate nicely with the small value of the
gradient corresponding to the objects of interest.
Dam Construction
DAM CONSTRUCTION
• Dam construction is based on
binary images .
• The simplest way to construct
dams separating sets of binary
points is to use morphological
dilation .
• Figure illustrates the basics of
dam construction using dilation.
• Fig. (a) shows portions of two
catchment basins at flooding
step n − 1, and
• Fig. (b) shows the result at the
next flooding step, n.
• The water has spilled from one basin to the another
and, therefore, a dam must be built to keep this from
happening.
• In order to be consistent with notation to be
introduced shortly, let M1 and M2 denote the sets of
coordinates of points in two regional minima.
• Then let the set of coordinates of points in the
catchment basin associated with these two minima at
stage n − 1 of flooding be denoted by Cn-1(M1) and
Cn-1(M2) , respectively. These are the two gray regions .
• Let C[n − 1] denote the union of these two sets. There are
two connected components in Fig. (a), and only one
component in Fig.(b). This connected component
encompasses the earlier two components, which are
shown dashed.
• Two connected components having become a single
component indicates that water between the two
catchment basins has merged at flooding step n.
• Let this connected component be denoted by q. Note that
the two components from step n − 1 can be extracted from
q by performing a logical AND operation, qnC[n − 1].
• Observe also that all points belonging to an individual
catchment basin form a single connected component.
• Suppose that each of the
connected components in Fig. (a) is
dilated by the structuring element
in Fig.(c), subject to two conditions:
• (1) The dilation has to be
constrained to q (this means that
the center of the structuring
element can be located only at
points in q during dilation); and
• (2) the dilation cannot be
performed on points that would
cause the sets being dilated to
merge (i.e., become a single
connected component).
• Figure (d) shows that a first dilation pass (in
light gray) expanded the boundary of each
original connected component.
• Note that condition (1) was satisfied by every
point during dilation, and that condition (2)
did not apply to any point during the dilation
process; thus, the boundary of each region
was expanded uniformly.
• In the second dilation, shown in black in 10.58(d),
several points failed condition (1) while meeting
condition (2), resulting in the broken perimeter
shown in the figure.
• It is evident that the only points in q that satisfy
the two conditions under consideration describe
the one-pixel-thick connected path shown
crossed-hatched in Fig. 10.58(d). This path is the
desired separating dam at stage n of flooding.
• Construction of the dam at this level of flooding is
completed by setting all the points in the path just
determined to a value greater than the maximum
possible intensity value of the image (e.g., greater than
255 for an 8-bit image).
• This will prevent water from crossing over the part of
the completed dam as the level of flooding is
increased.
• As noted earlier, dams built by this procedure, which
are the desired segmentation boundaries, are
connected components. In other words, this method
eliminates the problems of broken segmentation lines.
WATERSHED SEGMENTATION
ALGORITHM
Watershed Algorithm
• Any grayscale image can be viewed as a topographic
surface where high intensity denotes peaks and hills
while low intensity denotes valleys. You start filling
every isolated valleys (local minima) with different
colored water (labels). As the water rises, depending
on the peaks (gradients) nearby, water from different
valleys, obviously with different colors will start to
merge. To avoid that, you build barriers in the locations
where water merges. You continue the work of filling
water and building barriers until all the peaks are
under water. Then the barriers you created gives you
the segmentation result.

More Related Content

Similar to Watershed Algorithm for segmentation .pptx

contouring.pptx
contouring.pptxcontouring.pptx
contouring.pptxSaiSrija7
 
Integrated hydro-geological risk for Mallero basin (Alpine Italy) – part 2: h...
Integrated hydro-geological risk for Mallero basin (Alpine Italy) – part 2: h...Integrated hydro-geological risk for Mallero basin (Alpine Italy) – part 2: h...
Integrated hydro-geological risk for Mallero basin (Alpine Italy) – part 2: h...Alireza Babaee
 
Integrated hydro-geological risk for Mallero basin (Alpine Italy) – part 2: h...
Integrated hydro-geological risk for Mallero basin (Alpine Italy) – part 2: h...Integrated hydro-geological risk for Mallero basin (Alpine Italy) – part 2: h...
Integrated hydro-geological risk for Mallero basin (Alpine Italy) – part 2: h...Maryam Izadifar
 
UNit no 1 Contouring.pptx
UNit no 1 Contouring.pptxUNit no 1 Contouring.pptx
UNit no 1 Contouring.pptxADCET, Ashta
 
reservoir detail description Lecture 13,14.pdf
reservoir detail description Lecture 13,14.pdfreservoir detail description Lecture 13,14.pdf
reservoir detail description Lecture 13,14.pdfNazmulHossainSifat
 
Chapter 6 design of irrigation channel1
Chapter 6 design of irrigation channel1Chapter 6 design of irrigation channel1
Chapter 6 design of irrigation channel1Mulugeta Abera
 
River hydraulic modelling for river Serio (Northern Italy), 2014
River hydraulic modelling for river Serio (Northern Italy), 2014River hydraulic modelling for river Serio (Northern Italy), 2014
River hydraulic modelling for river Serio (Northern Italy), 2014Alireza Babaee
 
Flood risk evaluation for Serio river, Italy
Flood risk evaluation for Serio river, ItalyFlood risk evaluation for Serio river, Italy
Flood risk evaluation for Serio river, ItalyMaryam Izadifar
 
River hydraulic for flood risk evaluation
River hydraulic for flood risk evaluationRiver hydraulic for flood risk evaluation
River hydraulic for flood risk evaluationNikola Rakonjac
 
Measurement of discharge in channels & Design of lined canal
Measurement of discharge in channels & Design of lined canalMeasurement of discharge in channels & Design of lined canal
Measurement of discharge in channels & Design of lined canalJaswinder Singh
 
contouring-180417110533.pdf
contouring-180417110533.pdfcontouring-180417110533.pdf
contouring-180417110533.pdfshucaybcabdi
 
IRJET - Effect of Local Scour on Foundation of Hydraulic Structure
IRJET - Effect of Local Scour on Foundation of Hydraulic StructureIRJET - Effect of Local Scour on Foundation of Hydraulic Structure
IRJET - Effect of Local Scour on Foundation of Hydraulic StructureIRJET Journal
 
m1vrhqoqsoxyptiol1b4-signature-7f20760b9f97167ae74c1ef33fe58a16817ef3afaab94a...
m1vrhqoqsoxyptiol1b4-signature-7f20760b9f97167ae74c1ef33fe58a16817ef3afaab94a...m1vrhqoqsoxyptiol1b4-signature-7f20760b9f97167ae74c1ef33fe58a16817ef3afaab94a...
m1vrhqoqsoxyptiol1b4-signature-7f20760b9f97167ae74c1ef33fe58a16817ef3afaab94a...shucaybcabdi
 

Similar to Watershed Algorithm for segmentation .pptx (20)

Solved Examples in fluid mechanics
Solved Examples in fluid mechanics Solved Examples in fluid mechanics
Solved Examples in fluid mechanics
 
Examples solutions in open channel flow
Examples solutions in open channel flowExamples solutions in open channel flow
Examples solutions in open channel flow
 
designing simple drainage system.pptx
designing simple drainage system.pptxdesigning simple drainage system.pptx
designing simple drainage system.pptx
 
contouring.pptx
contouring.pptxcontouring.pptx
contouring.pptx
 
Integrated hydro-geological risk for Mallero basin (Alpine Italy) – part 2: h...
Integrated hydro-geological risk for Mallero basin (Alpine Italy) – part 2: h...Integrated hydro-geological risk for Mallero basin (Alpine Italy) – part 2: h...
Integrated hydro-geological risk for Mallero basin (Alpine Italy) – part 2: h...
 
Integrated hydro-geological risk for Mallero basin (Alpine Italy) – part 2: h...
Integrated hydro-geological risk for Mallero basin (Alpine Italy) – part 2: h...Integrated hydro-geological risk for Mallero basin (Alpine Italy) – part 2: h...
Integrated hydro-geological risk for Mallero basin (Alpine Italy) – part 2: h...
 
UNit no 1 Contouring.pptx
UNit no 1 Contouring.pptxUNit no 1 Contouring.pptx
UNit no 1 Contouring.pptx
 
reservoir detail description Lecture 13,14.pdf
reservoir detail description Lecture 13,14.pdfreservoir detail description Lecture 13,14.pdf
reservoir detail description Lecture 13,14.pdf
 
Chapter 6 design of irrigation channel1
Chapter 6 design of irrigation channel1Chapter 6 design of irrigation channel1
Chapter 6 design of irrigation channel1
 
River hydraulic modelling for river Serio (Northern Italy), 2014
River hydraulic modelling for river Serio (Northern Italy), 2014River hydraulic modelling for river Serio (Northern Italy), 2014
River hydraulic modelling for river Serio (Northern Italy), 2014
 
Flood risk evaluation for Serio river, Italy
Flood risk evaluation for Serio river, ItalyFlood risk evaluation for Serio river, Italy
Flood risk evaluation for Serio river, Italy
 
River hydraulic for flood risk evaluation
River hydraulic for flood risk evaluationRiver hydraulic for flood risk evaluation
River hydraulic for flood risk evaluation
 
Paper_Horsley
Paper_HorsleyPaper_Horsley
Paper_Horsley
 
Measurement of discharge in channels & Design of lined canal
Measurement of discharge in channels & Design of lined canalMeasurement of discharge in channels & Design of lined canal
Measurement of discharge in channels & Design of lined canal
 
contouring-180417110533.pdf
contouring-180417110533.pdfcontouring-180417110533.pdf
contouring-180417110533.pdf
 
Contouring
ContouringContouring
Contouring
 
IRJET - Effect of Local Scour on Foundation of Hydraulic Structure
IRJET - Effect of Local Scour on Foundation of Hydraulic StructureIRJET - Effect of Local Scour on Foundation of Hydraulic Structure
IRJET - Effect of Local Scour on Foundation of Hydraulic Structure
 
m1vrhqoqsoxyptiol1b4-signature-7f20760b9f97167ae74c1ef33fe58a16817ef3afaab94a...
m1vrhqoqsoxyptiol1b4-signature-7f20760b9f97167ae74c1ef33fe58a16817ef3afaab94a...m1vrhqoqsoxyptiol1b4-signature-7f20760b9f97167ae74c1ef33fe58a16817ef3afaab94a...
m1vrhqoqsoxyptiol1b4-signature-7f20760b9f97167ae74c1ef33fe58a16817ef3afaab94a...
 
WATERSHED CATCHMENT.pptx
WATERSHED CATCHMENT.pptxWATERSHED CATCHMENT.pptx
WATERSHED CATCHMENT.pptx
 
Gradually varied flow
Gradually varied flowGradually varied flow
Gradually varied flow
 

More from ssuser7ec6af

cell injury and necrosis mechanism Pathology.ppt
cell injury and necrosis mechanism   Pathology.pptcell injury and necrosis mechanism   Pathology.ppt
cell injury and necrosis mechanism Pathology.pptssuser7ec6af
 
relatrionship of pixels - Connectivity.ppt
relatrionship of pixels - Connectivity.pptrelatrionship of pixels - Connectivity.ppt
relatrionship of pixels - Connectivity.pptssuser7ec6af
 
Elements of visual perception Eye vision .pptx
Elements of visual perception Eye  vision .pptxElements of visual perception Eye  vision .pptx
Elements of visual perception Eye vision .pptxssuser7ec6af
 
Leukemia - Cancer of white blood cells Leukocytes
Leukemia - Cancer of white blood cells LeukocytesLeukemia - Cancer of white blood cells Leukocytes
Leukemia - Cancer of white blood cells Leukocytesssuser7ec6af
 
CELLULAR ADAPTATIONS OF GOWTH AND DIFFERRENTIATION.ppt
CELLULAR ADAPTATIONS OF GOWTH AND DIFFERRENTIATION.pptCELLULAR ADAPTATIONS OF GOWTH AND DIFFERRENTIATION.ppt
CELLULAR ADAPTATIONS OF GOWTH AND DIFFERRENTIATION.pptssuser7ec6af
 
Bacterial growth curve - Characteristics
Bacterial growth curve - CharacteristicsBacterial growth curve - Characteristics
Bacterial growth curve - Characteristicsssuser7ec6af
 
Disaster management lecture notes presentation
Disaster management  lecture notes presentationDisaster management  lecture notes presentation
Disaster management lecture notes presentationssuser7ec6af
 
Digital Image Processing - Reprsentation
Digital Image Processing - ReprsentationDigital Image Processing - Reprsentation
Digital Image Processing - Reprsentationssuser7ec6af
 
Carcinogenesis.pptx
Carcinogenesis.pptxCarcinogenesis.pptx
Carcinogenesis.pptxssuser7ec6af
 
Image Enhancement in the Spatial Domain U2.ppt
Image Enhancement in the Spatial Domain U2.pptImage Enhancement in the Spatial Domain U2.ppt
Image Enhancement in the Spatial Domain U2.pptssuser7ec6af
 
SecurityBasics.ppt
SecurityBasics.pptSecurityBasics.ppt
SecurityBasics.pptssuser7ec6af
 
Micturition Reflex.ppt
Micturition Reflex.pptMicturition Reflex.ppt
Micturition Reflex.pptssuser7ec6af
 
Face recognition.ppt
Face recognition.pptFace recognition.ppt
Face recognition.pptssuser7ec6af
 
Unit-1-NANOparticles.pptx
Unit-1-NANOparticles.pptxUnit-1-NANOparticles.pptx
Unit-1-NANOparticles.pptxssuser7ec6af
 
Lymphatic system.ppt
Lymphatic system.pptLymphatic system.ppt
Lymphatic system.pptssuser7ec6af
 
Lymphatic system.ppt
Lymphatic system.pptLymphatic system.ppt
Lymphatic system.pptssuser7ec6af
 
Physiology of Vision.ppt
Physiology of Vision.pptPhysiology of Vision.ppt
Physiology of Vision.pptssuser7ec6af
 
bone formation _Osteogenesis Flowchart.ppt
bone formation _Osteogenesis Flowchart.pptbone formation _Osteogenesis Flowchart.ppt
bone formation _Osteogenesis Flowchart.pptssuser7ec6af
 
1.4 Performance Measures.ppt
1.4 Performance Measures.ppt1.4 Performance Measures.ppt
1.4 Performance Measures.pptssuser7ec6af
 

More from ssuser7ec6af (20)

cell injury and necrosis mechanism Pathology.ppt
cell injury and necrosis mechanism   Pathology.pptcell injury and necrosis mechanism   Pathology.ppt
cell injury and necrosis mechanism Pathology.ppt
 
relatrionship of pixels - Connectivity.ppt
relatrionship of pixels - Connectivity.pptrelatrionship of pixels - Connectivity.ppt
relatrionship of pixels - Connectivity.ppt
 
Elements of visual perception Eye vision .pptx
Elements of visual perception Eye  vision .pptxElements of visual perception Eye  vision .pptx
Elements of visual perception Eye vision .pptx
 
Leukemia - Cancer of white blood cells Leukocytes
Leukemia - Cancer of white blood cells LeukocytesLeukemia - Cancer of white blood cells Leukocytes
Leukemia - Cancer of white blood cells Leukocytes
 
CELLULAR ADAPTATIONS OF GOWTH AND DIFFERRENTIATION.ppt
CELLULAR ADAPTATIONS OF GOWTH AND DIFFERRENTIATION.pptCELLULAR ADAPTATIONS OF GOWTH AND DIFFERRENTIATION.ppt
CELLULAR ADAPTATIONS OF GOWTH AND DIFFERRENTIATION.ppt
 
Bacterial growth curve - Characteristics
Bacterial growth curve - CharacteristicsBacterial growth curve - Characteristics
Bacterial growth curve - Characteristics
 
Disaster management lecture notes presentation
Disaster management  lecture notes presentationDisaster management  lecture notes presentation
Disaster management lecture notes presentation
 
Digital Image Processing - Reprsentation
Digital Image Processing - ReprsentationDigital Image Processing - Reprsentation
Digital Image Processing - Reprsentation
 
Carcinogenesis.pptx
Carcinogenesis.pptxCarcinogenesis.pptx
Carcinogenesis.pptx
 
Image Enhancement in the Spatial Domain U2.ppt
Image Enhancement in the Spatial Domain U2.pptImage Enhancement in the Spatial Domain U2.ppt
Image Enhancement in the Spatial Domain U2.ppt
 
SecurityBasics.ppt
SecurityBasics.pptSecurityBasics.ppt
SecurityBasics.ppt
 
Micturition Reflex.ppt
Micturition Reflex.pptMicturition Reflex.ppt
Micturition Reflex.ppt
 
Face recognition.ppt
Face recognition.pptFace recognition.ppt
Face recognition.ppt
 
biometrics.ppt
biometrics.pptbiometrics.ppt
biometrics.ppt
 
Unit-1-NANOparticles.pptx
Unit-1-NANOparticles.pptxUnit-1-NANOparticles.pptx
Unit-1-NANOparticles.pptx
 
Lymphatic system.ppt
Lymphatic system.pptLymphatic system.ppt
Lymphatic system.ppt
 
Lymphatic system.ppt
Lymphatic system.pptLymphatic system.ppt
Lymphatic system.ppt
 
Physiology of Vision.ppt
Physiology of Vision.pptPhysiology of Vision.ppt
Physiology of Vision.ppt
 
bone formation _Osteogenesis Flowchart.ppt
bone formation _Osteogenesis Flowchart.pptbone formation _Osteogenesis Flowchart.ppt
bone formation _Osteogenesis Flowchart.ppt
 
1.4 Performance Measures.ppt
1.4 Performance Measures.ppt1.4 Performance Measures.ppt
1.4 Performance Measures.ppt
 

Recently uploaded

Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfAyushMahapatra5
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDThiyagu K
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfAdmir Softic
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingTeacherCyreneCayanan
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactPECB
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajanpragatimahajan3
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Disha Kariya
 

Recently uploaded (20)

Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdf
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writing
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Advance Mobile Application Development class 07
Advance Mobile Application Development class 07Advance Mobile Application Development class 07
Advance Mobile Application Development class 07
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajan
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..
 

Watershed Algorithm for segmentation .pptx

  • 1.
  • 3. Watershed Segmentation • In this context, a monochrome image is considered to be an altitude surface in which high-amplitude pixels correspond to ridge points, and low-amplitude pixels correspond to valley points. • If a drop of water were to fall on any point of the altitude surface, it would move to a lower altitude until it reached a local altitude minimum. • The accumulation of water in the vicinity of a local minimum is called a catchment basin. • All points that drain into a common catchment basin are part of the same watershed. • A valley is a region that is surrounded by a ridge. A ridge is the loci of maximum gradient of the altitude surface.
  • 4. Watershed Algorithms • There are two basic algorithmic approaches to the computation of the watershed of an image: rainfall and flooding. • In the rainfall approach, local minima are found throughout the image. Each local minima is given a unique tag. Adjacent local minima are combined with a unique tag. • Next, a conceptual water drop is placed at each untagged pixel. The drop moves to its lower- amplitude neighbor until it reaches a tagged pixel, at which time it assumes the tag value. • Figure 17.3-2 illustrates a section of a digital image encompassing a watershed in which the local minimum pixel is black and the dashed line indicates the path of a water drop to the local minimum.
  • 5. Watershed Algorithm • In the flooding approach, conceptual single pixel holes are pierced at each local minima, and the amplitude surface is lowered into a large body of water. • The water enters the holes and proceeds to fill each catchment basin. If a basin is about to overflow, a conceptual dam is built on its surrounding ridge line to a height equal to the highest- altitude ridge point.
  • 6. Watershed Segmentation • Any gray scale image can be viewed as a 3 d topological surface. Black represents less pixel value and the white region represents the increasing pixel value. The pixel value increases from lowest minima to the height of topological image.
  • 7. Watershed Segmentation • There is a point in ridge valley where probability for pixels values to fall either in catchment basin 1 or 2. • This ridge valley forms image boundary.
  • 8. Watershed Segmentation • Three types of pixels • Points belonging to a regional minima • Catchment basin of a regional minimum – Points at which a drop of water will certainly fall to a single minimum. • Ridge lines/ watershed lines – Points at which a drop of water will be equally like to fall to more than one minimum.
  • 9. Watershed Segmentation • The concept of a watershed is based on visualizing an image in three dimensions, two spatial coordinates versus intensity. • In such a “topographic” interpretation, three types of points are considered : • (1) points belonging to a regional minimum; • (2) points at which a drop of water, if placed at the location of any of those points, would fall with certainty to a single minimum; and • (3) points at which water would be equally likely to fall to more than one such minimum.
  • 10. Watershed Segmentation • For a particular regional minimum, the set of points satisfying condition (2) is called the catchment basin or watershed of that minimum. • The points satisfying condition (3) form crest lines on the topographic surface, and are referred to as divide lines or watershed lines. • The principal objective of segmentation algorithms based on these concepts is to find the watershed lines .
  • 11. Dam Construction • In this method, A gray-scale image is taken in topographic view, in which the height of the “mountains” is proportional to intensity values in the input image. For ease of interpretation, the backsides of structures are shaded. • This is not to be confused with intensity values; only the general topography of the three-dimensional representation is of interest. • In order to prevent the rising water from spilling out through the edges of the image, the perimeter of the entire topography (image) is being enclosed by dams that are higher than the highest possible mountain, whose value is determined by the highest possible intensity value in the input image.
  • 12. Dam Construction • Suppose that a hole is punched in each regional minimum [shown as dark areas ] and that the entire topography is flooded from below by letting water rise through the holes at a uniform rate. • Figure 10.57(c) shows the first stage of flooding, where the “water,” shown in light gray, has covered only areas that correspond to the black background in the image.
  • 13.
  • 14. Dam Construction • In Figs.(1) and (2) we see that the water now has risen into the first and second catchment basins, respectively. • As the water continues to rise, it will eventually overflow from one catchment basin into another .
  • 16. Dam Construction • The first indication of this is shown in 10.57(f). Here, water from the lower part of the left basin overflowed into the basin on the right, and a short “dam” (consisting of single pixels) was built to prevent water from merging at that level of flooding.
  • 17. Dam Construction • One of the principal applications of watershed segmentation is in the extraction of nearly uniform (blob-like) objects from the background. • Regions characterized by small variations in intensity have small gradient values. Thus, in practice, we often see watershed segmentation applied to the gradient of an image, rather than to the image itself. • In this formulation, the regional minima of catchment basins correlate nicely with the small value of the gradient corresponding to the objects of interest.
  • 19. DAM CONSTRUCTION • Dam construction is based on binary images . • The simplest way to construct dams separating sets of binary points is to use morphological dilation . • Figure illustrates the basics of dam construction using dilation. • Fig. (a) shows portions of two catchment basins at flooding step n − 1, and • Fig. (b) shows the result at the next flooding step, n.
  • 20. • The water has spilled from one basin to the another and, therefore, a dam must be built to keep this from happening. • In order to be consistent with notation to be introduced shortly, let M1 and M2 denote the sets of coordinates of points in two regional minima. • Then let the set of coordinates of points in the catchment basin associated with these two minima at stage n − 1 of flooding be denoted by Cn-1(M1) and Cn-1(M2) , respectively. These are the two gray regions .
  • 21. • Let C[n − 1] denote the union of these two sets. There are two connected components in Fig. (a), and only one component in Fig.(b). This connected component encompasses the earlier two components, which are shown dashed. • Two connected components having become a single component indicates that water between the two catchment basins has merged at flooding step n. • Let this connected component be denoted by q. Note that the two components from step n − 1 can be extracted from q by performing a logical AND operation, qnC[n − 1]. • Observe also that all points belonging to an individual catchment basin form a single connected component.
  • 22. • Suppose that each of the connected components in Fig. (a) is dilated by the structuring element in Fig.(c), subject to two conditions: • (1) The dilation has to be constrained to q (this means that the center of the structuring element can be located only at points in q during dilation); and • (2) the dilation cannot be performed on points that would cause the sets being dilated to merge (i.e., become a single connected component).
  • 23. • Figure (d) shows that a first dilation pass (in light gray) expanded the boundary of each original connected component. • Note that condition (1) was satisfied by every point during dilation, and that condition (2) did not apply to any point during the dilation process; thus, the boundary of each region was expanded uniformly.
  • 24. • In the second dilation, shown in black in 10.58(d), several points failed condition (1) while meeting condition (2), resulting in the broken perimeter shown in the figure. • It is evident that the only points in q that satisfy the two conditions under consideration describe the one-pixel-thick connected path shown crossed-hatched in Fig. 10.58(d). This path is the desired separating dam at stage n of flooding.
  • 25. • Construction of the dam at this level of flooding is completed by setting all the points in the path just determined to a value greater than the maximum possible intensity value of the image (e.g., greater than 255 for an 8-bit image). • This will prevent water from crossing over the part of the completed dam as the level of flooding is increased. • As noted earlier, dams built by this procedure, which are the desired segmentation boundaries, are connected components. In other words, this method eliminates the problems of broken segmentation lines.
  • 27.
  • 28.
  • 29.
  • 31. • Any grayscale image can be viewed as a topographic surface where high intensity denotes peaks and hills while low intensity denotes valleys. You start filling every isolated valleys (local minima) with different colored water (labels). As the water rises, depending on the peaks (gradients) nearby, water from different valleys, obviously with different colors will start to merge. To avoid that, you build barriers in the locations where water merges. You continue the work of filling water and building barriers until all the peaks are under water. Then the barriers you created gives you the segmentation result.