Morphological Image Processing: DR Avdhesh Gupta, IMS Engineering College, Ghaziabad

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 49

Morphological

Image Processing
Dr Avdhesh Gupta,
IMS Engineering College, Ghaziabad
Morphological
Image Processing
Dr Avdhesh Gupta,
IMS Engineering College, Ghaziabad
Erosion and Dilation Example 1

1
0 0 0 0 0 0 1
0 1 1 0 0 0
0 1 1 1 1 0
1 0 1 1 0 0
0 1 1 1 0 0
0 0 0 1 0 0

Erosion Dilation
0 0 0 0 0 0 0 1 1 0 0 0

0 0 0 0 0 0 0 1 1 1 1 0

0 0 1 0 0 0 1 1 1 1 1 0

0 0 1 1 0 0 1 1 1 1 1 0

0 0 0 1 0 0 1 1 1 1 1 0

0 0 0 1 0 0 0 1 1 1 0 0
Morphological
Image Processing
Dr Avdhesh Gupta,
IMS Engineering College, Ghaziabad
Ques: Suppose two discrete one dimensional functions are
represented by the sequences:
f = {5,7,11,8,2,6,8,9,7,4,3}
h= {1,2,1}
Compute: f dilation h, f erosion h, f opening h, f closing h
f 5 7 11 8 2 6 8 9 7 4 3
h 1 2 1
1 2 1
1 2 1
1 2 1
1 2 1
1 2 1
1 2 1
1 2 1
1 2 1
1 2 1
1 2 1
Dilation: add and take max FH: {8,12,13,12,9,9,10,11,10,8,5}
Erosion: subtract and min F FH: {3,4,6,1,0,1,5,6,3,2,1}
Ques: Suppose two discrete one dimensional functions are
represented by the sequences:
Eroded image = {8,12,13,12,9,9,10,11,10,8,5}
h= {1,2,1}
Compute: f opening h, f closing h
f 8 12 13 12 9 9 10 11 10 8 5
h 1 2 1
1 2 1
1 2 1
1 2 1
1 2 1
1 2 1
1 2 1
1 2 1
1 2 1
1 2 1
1 2 1

Opening: FoH: erosion then dilation {5, 7, 8, 7, 2, 6, 7, 8, 7, 4, 3}


Closing F H: dilation then erosion : {6, 7, 11, 8, 7, 7, 8, 9, 7, 3, 3}
Opening Example 1

1
0 0 0 0 0 0 1
0 1 1 0 0 0
0 1 1 1 1 0
1 0 1 1 0 0
0 1 1 1 0 0
0 0 0 1 0 0

0 0 0 0 0 0 0 0 0 0 0 0

0 0 0 0 0 0 0 0 1 0 0 0

0 0 1 0 0 0 0 0 1 1 0 0

0 0 1 1 0 0 0 0 1 1 0 0

0 0 0 1 0 0 0 0 1 1 0 0

0 0 0 1 0 0 0 0 0 1 0 0
Closing Example 1

1
0 0 0 0 0 0 1
0 1 1 0 0 0
0 1 1 1 1 0
1 0 1 1 0 0
0 1 1 1 0 0
0 0 0 1 0 0

0 1 1 0 0 0 0 1 1 0 0 0

0 1 1 1 1 0 0 1 1 0 0 0

1 1 1 1 1 0 0 1 1 1 1 0

1 1 1 1 1 0 1 1 1 1 1 0

1 1 1 1 1 0 0 1 1 1 0 0

0 1 1 1 0 0 0 1 1 1 0 0
Hit and Miss transform

0 0 0 1 0 0 x 1 0

1 1 X x 1 0 1 1 0

X 1 0 1 0 x 0 x 0

You might also like