34 views

Uploaded by Rathan N

watershed segmenetation in dip

- Ada 427003
- Reference Independent Moving Object Detection An
- Digital Image Processing Question Bank
- A Survey on Nuclear-To-cytoplasmic Ratio Analysis
- 00949797
- SLIC based Hand Gesture Recognition with Artificial Neural Network
- CON 02
- diff algo for seg.pdf
- MironeMan
- International Refereed Journal of Engineering and Science (IRJES)
- Mango Variety Recognizer - PCSC - V3
- Person Tracking in UAV Video
- 2
- 01577115
- Edge Detection Technique by Fuzzy Logic CLA and Canny Edge Detector Using Fuzzy Image Processing
- 10.1007%2F978-3-642-10268-4_23
- paper1
- Digital Image Processing
- image processing
- 639

You are on page 1of 19

Morphological Watersheds

Introduction

Based on visualizing an image in 3D

0

20

40

60

80

100

0

50

100

0

5

10

15

20

25

imshow(I,[ ]) mesh(I)

Introduction

Instead of working on an

image itself, this technique

is often applied on its

gradient image.

In this case, each object is

distinguished from the

background by its up-lifted

edges

0

20

40

60

80

100

0

20

40

60

80

100

0

2

4

6

8

Basic Definitions

I: 2D gray level image

D

I

: Domain of I

Path P of length l between p and q in I

A (l +1)-tuple of pixels (p

0

=p,p

1

,,p

l

=q) such that

p

i

,p

i+1

are adjacent (4 adjacent, 8 adjacent, or m

adjacent, see Section 2.5)

l(P): The length of a given path P

Minimum

A minimum M of I is a connected plateau of pixels

from which it is impossible to reach a point of lower

altitude without having to climb

Basic Definitions

Instead of working on an image itself, this technique is often applied

on its gradient image.

Three types of points

Points belonging to a regional minimum

Catchment basin / watershed of a regional minimum

Points at which a drop of water will certainly fall to a single minimum

Divide lines / Watershed lines

Points at which a drop of water will be equally likely to fall to more than one

minimum

Crest lines on the topographic surface

This technique is to identify all the third type of points for

segmentation

Basic Steps

1. Piercing holes in

each regional

minimum of I

2. The 3D topography

is flooded from

below gradually

3. When the rising

water in distinct

catchment basins is

about to merge, a

dam is built to

prevent the merging

3. The dam

boundaries

correspond to

the watershed

lines to be

extracted by a

watershed

segmentation

algorithm

- Eventually only

constructed

dams can be

seen from

above

Dam Construction

Based on binary morphological dilation

At each step of the algorithm, the binary

image in obtained in the following

manner

1. Initially, the set of pixels with minimum gray

level are 1, others 0.

2. In each subsequent step, we flood the 3D

topography from below and the pixels

covered by the rising water are 1s and

others 0s. (See previous slides)

Notations

M1, M2:

Sets of coordinates of points

in the two regional minima

C

n-1

(M

1

), C

n-1

(M

2

)

Sets of coordinates of points

in the catchment basins

associated with M1 M2 at

stage n-1 of flooding

(catchment basins up to the

flooding level)

C[n-1]

Union of C

n-1

(M

1

), C

n-1

(M

2

)

Dam Construction

At flooding step n-1, there are

two connected components. At

flooding step n, there is only

one connected component

This indicates that the water

between the two catchment basins

has merged at flooding step n

Use q to denote the single

connected component

Steps

Repeatedly dilate C

n-1

(M

1

), C

n-1

(M

2

)

by the 33 structuring element

shown, subject to the following

condition

Constrained to q (center of the

structuring element can not go

beyond q during dilation

Dam Construction

The dam is constructed by

the points on which the

dilation would cause the

sets being dilated to merge.

Resulting one-pixel thick

connected path

Setting the gray level at

each point in the resultant

path to a value greater than

the maximum gray value of

the image. Usually max+1

Watershed Transform

Denote M

1

, M

2

, , M

R

as the sets of

the coordinates of the points in the

regional minima of an (gradient) image

g(x,y)

Denote C(M

i

) as the coordinates of the

points in the catchment basin

associated with regional minimum M

i

.

Denote the minimum and maximum

gray levels of g(x,y) as min and max

Denote T[n] as the set of coordinates

(s,t) for which g(s,t) < n

Flood the topography in integer flood

increments from n=min+1 to n=max+1

At each flooding, the topography is

viewed as a binary image

M

i

C(M

i

)

n-1

T(n)

Watershed Transform

Denote C

n

(M

i

) as the set of

coordinates of points in the catchment

basin associated with minimum M

i

at

flooding stage n.

C

n

(M

i

)= C(M

i

) T[n]

C

n

(M

i

)=T[n]

Denote C[n] as the union of the

flooded catchment basin portions at

stage n:

Initialization

Let C[min+1]=T[min+1]

At each step n, assume C[n-1] has

been constructed. The goal is to

obtain C[n] from C[n-1]

M

i

C(M

i

)

n-1

T(n)

C

n

(M

i

)

C(n)

R

i

i

R

i

i n

M C C M C n C

1 1

) ( ] 1 [max and ) ( ] [

Watershed Transform

Denote Q[n] as the set of connected

components in T[n].

For each qQ[n], there are three

possibilities

1. q C[n-1] is empty (q

1

)

A new minimum is encountered

q is incorporated into C[n-1] to form C[n]

2. q C[n-1] contains one connected

component of C[n-1] (q

2

)

q is incorporated into C[n-1] to form C[n]

3. q C[n-1] contains more than one

connected components of C[n-1] (q

3

)

A ridge separating two or more catchment

basins has been encountered

A dam has to be built within q to prevent

overflow between the catchment basins

4. Repeat the procedure until n=max+1

C

n-1

(M

i

)

M

i

C(M

i

)

n-2

T(n-1)

C(n-1)

n-1

T(n)

q

1

q

2

q

3

Dam

C(n)

Examples 1

Watershed Transform of Binary Image

A: Original image B: Negative of image A

C: Distance transform of B D: Watershed transform of C

A B

C D

Distance transform of a binary image is defined by

the distance from every pixel to the nearest non-zero

valued pixel

Examples 2

a: Original image

b: Gradient image of image a

c: Watershed lines obtained

from image b

(oversegmentation)

Each connected region

contains one local

minimum in the

corresponding gradient

image

d: Watershed lines obtained

from smoothed image b

a b

c d

The Use of Markers

Internal markers are used to limit the

number of regions by specifying the

objects of interest

Like seeds in region growing method

Can be assigned manually or automatically

Regions without markers are allowed to be

merged (no dam is to be built)

External markers those pixels we are

confident to belong to the background

Watershed lines are typical external markers

and they belong the same (background)

region

Watershed Based Image

Segmentation

1. Use internal markers to obtain watershed lines of the

gradient of the image to be segmented.

2. Use the obtained watershed lines as external markers

3. Each region defined by the external markers contains a

single internal marker and part of the background

4. The problem is reduced to partitioning each region into

two parts: object (containing internal markers) and a single

background (containing external markers)

Global thresholding, region growing, region splitting and

merging, or watershed transform

MATLAB Example

A: Original image f

B: Direct watershed transform

result using the following

commands

L=watershed(g)

wr = L ==0

g is the gradient image of A

C: shows all of the regional

minima of g using

rm=imregionalmin(g)

D: internal markers obtained by

im = imextendedmin(g,2)

fim = f;

fim(im) = 175;

E: External markers using

Lim = watershed(bwdist(im))

em = Lim ==0

F: Modified gradient image

obtained from internal and

external markers

g2 = imimposemin(g, im | em)

G: Final segmentation result

L2 = watershed(g2)

f2 = f;

f2(L2 == 0) = 255

A B C

D E F

G

- Ada 427003Uploaded byElena
- Reference Independent Moving Object Detection AnUploaded byGopal Krishna
- Digital Image Processing Question BankUploaded bySantosh Sanjeev
- A Survey on Nuclear-To-cytoplasmic Ratio AnalysisUploaded byInternational Journal of Research in Engineering and Technology
- 00949797Uploaded byrahul
- SLIC based Hand Gesture Recognition with Artificial Neural NetworkUploaded byIJSTE
- CON 02Uploaded byFalcão 69
- diff algo for seg.pdfUploaded byMadhuri Roy
- MironeManUploaded byEdu Massana
- International Refereed Journal of Engineering and Science (IRJES)Uploaded bywww.irjes.com
- Mango Variety Recognizer - PCSC - V3Uploaded byWinston M. Tabada
- Person Tracking in UAV VideoUploaded byShen Yin
- 2Uploaded byThanh Lam
- 01577115Uploaded byDaksha Kalyan
- Edge Detection Technique by Fuzzy Logic CLA and Canny Edge Detector Using Fuzzy Image ProcessingUploaded byEditor IJRITCC
- 10.1007%2F978-3-642-10268-4_23Uploaded byMohammed Abdul Rahman
- paper1Uploaded byLakshmi Narayan
- Digital Image ProcessingUploaded bySindhuja Sambu
- image processingUploaded byRamachandra Hegde
- 639Uploaded byAnonymous PkeI8e84Rs
- Retina Basepaper(2)Uploaded bySeekay Alais Karuppaiah C
- pxc3887665.pdfUploaded byHarshal Patil
- icra06Uploaded bytarungoel11
- Text Detection SurveyUploaded byShanti Prasad
- 1031.pdfUploaded bycyrcos
- CV_Agriculture2_2010Uploaded byThuy Nguyen
- Chapter 9Uploaded byOnkar Jaokar
- 14E_GrapeUploaded byEr Nikhil Kakade
- 3289-7712-1-PB.pdfUploaded byThendmaBeta
- IMAGE SEGMENTATION BY USING THRESHOLDING TECHNIQUES FOR MEDICAL IMAGESUploaded bycseij

- Lecturer Plan microprocessor and microcontrollerUploaded byRathan N
- May_2012_Exam_centres.pdfUploaded byRathan N
- taxi billUploaded byRathan N
- AMP BookUploaded byRathan N
- 80C51 Family ArchitectureUploaded byapi-3765346
- Embedded SystemsUploaded byloveamir
- Allmcom&MbaUploaded bybabu2002
- Basic Programming 06Uploaded byTestfirstTestlast
- Simplification Techniques and TricksUploaded bySheikh Aaishan
- lecture_9Uploaded byRathan N
- course file contents new2.docxUploaded byRathan N
- Base CustomizationUploaded by2rusty85
- Database Management SystemUploaded byRathan N
- 1500 Computer Awareness Bits for IBPSUploaded byRathan N

- Use Case Realization DocumentUploaded byLuis Andrés Villavicencio Pérez
- Happy Rhetorical AnalysisUploaded byDaniel Jimenez
- Book Review - The Edgeless CitiesUploaded bykaterhine
- DICTIONARYUploaded bybora
- Microcontrôleurs ARM supportés par LabVIEWUploaded byGregory Chagas
- UAP SRHR & Post-2015 Briefing CardsUploaded byCat Lazaroff
- Cuba’s Unique Way of Overcoming SubalternityUploaded bycarabrina
- Nightmare Before ChristmasUploaded byphantom14
- ToR for the Final ReviewUploaded byucl_hai
- Answering Critique by Truthseeker Regarding Wudu-Abulution versesUploaded byaastana.com
- VP or General Manager or Sales ManagerUploaded byapi-77701128
- 1Uploaded byAnonymous huaIYe1
- 1123_s12_in_22Uploaded byFarah Noreen
- Sandpiper Floc Pump PB14ASvcManUploaded byjadetorres
- GNI Statistics NetherlandsUploaded byF.N. Heinsius
- 302-338Uploaded byPutri Kartini
- Nomadism, Horses and HunsUploaded byFilip_Tesar
- Reporting Tool Tutorial.pdfUploaded bysumegha3sakhreliya3g
- glioma,MAVUploaded bybodeadumitru9261
- [Ielts Share] 101 Ielts Listening TestsUploaded byVY LUONG TRIEU
- 7.Siemens Wireless Evolution in Core and Radio FinalUploaded byphamducnhon
- Modification of Chrome-Tanned Leather Waste Hydrolysate with Epichlorhydrin.pdfUploaded byAgustine Christela Melviana
- The Muscular SystemUploaded bygalaxyduck
- DWM AssignmentUploaded byPhonte Dalitso Chaguluka
- KDIGO Transplant Candidate Guideline Scope_Public ReviewUploaded byRaluca
- heredity and evolution pptUploaded byapi-247350882
- Artificial Neural Network-Based Face RecognitionUploaded byAli Nisar
- Big Band Bass John Clayton 1Uploaded byAdonay C. Ubaldo Ramos
- Prenatal Care VerificationUploaded byRashella DAmico
- SPTGSynexJ3704CUploaded bydoos1