9 morphological image processing

34
9 Morphological Image Processing Angela Chih-Wei Tang Department of Communication Engineering National Central University JhongLi, Taiwan 2009 Fall

Upload: others

Post on 10-Feb-2022

24 views

Category:

Documents


0 download

TRANSCRIPT

9 Morphological Image Processing

Angela Chih-Wei Tang

Department of Communication Engineering

National Central University

JhongLi, Taiwan

2009 Fall

Outline

� Preliminaries

� Dilation and erosion

� Opening and closing

� Some basic morphological algorithms

C.E., NCU, Taiwan Angela Chih-Wei Tang, 2009 2

� Some basic morphological algorithms

� Extensions to gray-scale images

Basic Concepts from Set Theory� Sets: objects in an image

� Set theory: the language of mathematical

morphology

C.E., NCU, Taiwan Angela Chih-Wei Tang, 2009 33

4C.E., NCU, Taiwan 4Angela Chih-Wei Tang, 2009

5C.E., NCU, Taiwan 5Angela Chih-Wei Tang, 2009

6C.E., NCU, Taiwan 6Angela Chih-Wei Tang, 2009

7C.E., NCU, Taiwan 7Angela Chih-Wei Tang, 2009

C.E., NCU, Taiwan Angela Chih-Wei Tang, 2009 88

Translation and Reflection

� They are extended from morphology but not

found in basic texts on set theory

C.E., NCU, Taiwan Angela Chih-Wei Tang, 2009 9

Outline

� Preliminaries

� Dilation and erosion

� Opening and closing

Some basic morphological algorithms

C.E., NCU, Taiwan Angela Chih-Wei Tang, 2009 10

� Some basic morphological algorithms

� Extensions to gray-scale images

Reflection

Translation

11C.E., NCU, Taiwan 11Angela Chih-Wei Tang, 2009

Use of Morphological Dilation

for Bridging Gaps

C.E., NCU, Taiwan Angela Chih-Wei Tang, 2009 12

C.E., NCU, Taiwan Angela Chih-Wei Tang, 2009 1313

Use of Morphological Erosion for

Removing Image Components

C.E., NCU, Taiwan Angela Chih-Wei Tang, 2009 14

Outline

� Preliminaries

� Dilation and erosion

� Opening and closing

Some basic morphological algorithms

C.E., NCU, Taiwan Angela Chih-Wei Tang, 2009 15

� Some basic morphological algorithms

� Extensions to gray-scale images

Opening and Closing

� Opening: smooth the contour of an object, breaks narrow isthmuses, and eliminates thin protrusions

� Closing: smooth sections of contours, but it

C.E., NCU, Taiwan Angela Chih-Wei Tang, 2009 16

� Closing: smooth sections of contours, but it generally fuses narrow breaks and long thin gulfs, eliminates small holes, and fills gaps in the contour

Opening

C.E., NCU, Taiwan Angela Chih-Wei Tang, 2009 17

Closing

C.E., NCU, Taiwan Angela Chih-Wei Tang, 2009 18

19

Opening

ClosingC.E., NCU, Taiwan 19Angela Chih-Wei Tang, 2009

Use of Opening and Closing for

Morphological Filtering

20C.E., NCU, Taiwan 20Angela Chih-Wei Tang, 2009

Outline

� Preliminaries

� Dilation and erosion

� Opening and closing

Some basic morphological algorithms

C.E., NCU, Taiwan Angela Chih-Wei Tang, 2009 21

� Some basic morphological algorithms

� Extensions to gray-scale images

Boundary Extraction

StructureElement

Erosion

C.E., NCU, Taiwan Angela Chih-Wei Tang, 2009 22

Example –

Boundary Extraction

C.E., NCU, Taiwan Angela Chih-Wei Tang, 2009 23

Region Filling

C.E., NCU, Taiwan Angela Chih-Wei Tang, 2009 24

Dilation

Complement

Example – Region Filling

C.E., NCU, Taiwan Angela Chih-Wei Tang, 2009 25

Extraction of Connected Components

C.E., NCU, Taiwan Angela Chih-Wei Tang, 2009 26

�Converge!!!

1 If

−==

kkXX

kXY =⇒ Let

Outline

� Preliminaries

� Dilation and erosion

� Opening and closing

Some basic morphological algorithms

C.E., NCU, Taiwan Angela Chih-Wei Tang, 2009 27

� Some basic morphological algorithms

� Extensions to gray-scale images

2-D Dilation

� General effects:

� If all the values of the structuring

C.E., NCU, Taiwan Angela Chih-Wei Tang, 2009 28

� If all the values of the structuring

element are positive, the output image

tends to be brighter than the input

� Dark details either are reduced or

eliminated, depending on how their

values and shapes relate to the

structuring element used for dilation

1-D Dilation

C.E., NCU, Taiwan Angela Chih-Wei Tang, 2009 29

2-D Erosion

� General effects

If all the elements of the structuring

C.E., NCU, Taiwan Angela Chih-Wei Tang, 2009 30

� If all the elements of the structuring

element are positive, the output image

tends to be darker than the input image

� The effect of bright details in the input

image that are smaller in area than the

structuring element is reduced

1-D Erosion

C.E., NCU, Taiwan Angela Chih-Wei Tang, 2009 31

Dilation and Erosion on

A Gray-Scale Image

C.E., NCU, Taiwan Angela Chih-Wei Tang, 2009 32

Opening and Closing

C.E., NCU, Taiwan Angela Chih-Wei Tang, 2009 33

Gray-Scale Opening and Closing

C.E., NCU, Taiwan Angela Chih-Wei Tang, 2009 34