y6120 y6088 presen watershed

28
WATERSHED IMAGE SEGMENTATION Presented By : Ashish Verma(Y6120) Vishal Annapurve(Y6088)

Upload: -

Post on 01-Dec-2014

12 views

Category:

Documents


3 download

TRANSCRIPT

Page 1: Y6120 Y6088 Presen Watershed

WATERSHED IMAGE SEGMENTATION

Presented By :

Ashish Verma(Y6120)

Vishal Annapurve(Y6088)

Page 2: Y6120 Y6088 Presen Watershed

INTRODUCTION

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

Page 3: Y6120 Y6088 Presen Watershed

BASIC CONCEPTS

Image is visualized in 3-dimensions 2 spatial dimensions grey levels

Any grey tone image can be considered as a topological surface

Page 4: Y6120 Y6088 Presen Watershed

CONTINUED….

Topographical interpretation consist of three points Points belonging to regional minimum Catchment Basin or watershed Divide lines or watershed lines

Main aim of the segmentation algorithm based on this concept is to find watershed lines

Page 5: Y6120 Y6088 Presen Watershed

VISUALISATION

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

Page 6: Y6120 Y6088 Presen Watershed

DIFFERENT LEVELS OF FLOODING

Page 7: Y6120 Y6088 Presen Watershed

CONTD….

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

Page 8: Y6120 Y6088 Presen Watershed

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].

Page 9: Y6120 Y6088 Presen Watershed

CONTD….

Page 10: Y6120 Y6088 Presen Watershed

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

Page 11: Y6120 Y6088 Presen Watershed

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

Page 12: Y6120 Y6088 Presen Watershed

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

Page 13: Y6120 Y6088 Presen Watershed

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 =>

=>

Page 14: Y6120 Y6088 Presen Watershed

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:

Page 15: Y6120 Y6088 Presen Watershed

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.

Page 16: Y6120 Y6088 Presen Watershed

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.

Page 17: Y6120 Y6088 Presen Watershed

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.

Page 18: Y6120 Y6088 Presen Watershed

RESULTS WITH THE IMAGE GRADIENT

Page 19: Y6120 Y6088 Presen Watershed

USE OF MARKERS

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.

This can render the result to be virtually useless.

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.

Page 20: Y6120 Y6088 Presen Watershed

OVER-SEGMENTATION

Page 21: Y6120 Y6088 Presen Watershed

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.

Page 22: Y6120 Y6088 Presen Watershed

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.

Page 23: Y6120 Y6088 Presen Watershed

SEGMENTATION PARADIGM

Page 24: Y6120 Y6088 Presen Watershed

ROAD SEGMENTATION

Page 25: Y6120 Y6088 Presen Watershed

COFFEE BEANS SEPERATION

Page 26: Y6120 Y6088 Presen Watershed

CLEAVAGE FRACTURE IN STEEL

Page 27: Y6120 Y6088 Presen Watershed

REFERENCES

Digital Image Processing by R.Gonzalez http://cmm.ensmp.fr/~beucher/wtshed.html

Page 28: Y6120 Y6088 Presen Watershed

THANK YOU