computer and robot vision i

138
Digital Camera and Computer Vision Laboratory Department of Computer Science and Information Engineering National Taiwan University, Taipei, Taiwan, R.O.C. Computer and Robot Vision I Chapter 5 Mathematical Morph ology Presented by: 傅傅傅 & 傅傅傅 0917533843 [email protected] 傅傅傅傅 : 傅傅傅 傅傅

Upload: terentia-avis

Post on 01-Jan-2016

50 views

Category:

Documents


3 download

DESCRIPTION

Computer and Robot Vision I. Chapter 5 Mathematical Morphology Presented by: 傅楸善 & 王林農 0917533843 [email protected] 指導教授 : 傅楸善 博士. 5.1 Introduction. mathematical morphology works on shape shape: prime carrier of information in machine vision - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Computer and Robot Vision I

Digital Camera and Computer Vision LaboratoryDepartment of Computer Science and Information Engineering

National Taiwan University, Taipei, Taiwan, R.O.C.

Computer and Robot Vision I

Chapter 5 Mathematical MorphologyPresented by: 傅楸善 & 王林農

[email protected]指導教授 : 傅楸善 博士

Page 2: Computer and Robot Vision I

DC & CV Lab.DC & CV Lab.CSIE NTU

5.1 Introduction

mathematical morphology works on shape shape: prime carrier of information in machine

vision morphological operations: simplify image data,

preserve essential shape characteristics, eliminateirrelevancies

shape: correlates directly with decomposition ofobject, object features, object surface defects, assembly defects

Page 3: Computer and Robot Vision I

DC & CV Lab.DC & CV Lab.CSIE NTU

5.2 Binary Morphology

set theory: language of binary mathematical morphology

sets in mathematical morphology: represent shapes

Euclidean N-space: EN

discrete Euclidean N-space: ZN

N=2: hexagonal grid, square grid

Page 4: Computer and Robot Vision I

DC & CV Lab.DC & CV Lab.CSIE NTU

5.2 Binary Morphology (cont’)

dilation, erosion: primary morphological operations

opening, closing: composed from dilation, erosion

opening, closing: related to shape representation, decomposition, primitive extraction

Page 5: Computer and Robot Vision I

DC & CV Lab.DC & CV Lab.CSIE NTU

5.2.1 Binary Dilation

dilation: combines two sets by vector addition of set elements

dilation of A by B:

addition commutative dilation commutative:

binary dilation: Minkowski addition

BA

ABBA

} and somefor |{ BbAabacEcB A N

Page 6: Computer and Robot Vision I

DC & CV Lab.DC & CV Lab.CSIE NTU

5.2.1 Binary Dilation (cont’)

Page 7: Computer and Robot Vision I

DC & CV Lab.DC & CV Lab.CSIE NTU

5.2.1 Binary Dilation (cont’)

A: referred as set, image B: structuring element: kernel dilation by disk: isotropic swelling or expansion

Page 8: Computer and Robot Vision I

DC & CV Lab.DC & CV Lab.CSIE NTU

5.2.1 Binary Dilation (cont’)

Page 9: Computer and Robot Vision I

DC & CV Lab.DC & CV Lab.CSIE NTU

5.2.1 Binary Dilation (cont’)

dilation by kernel without origin: might not have common pixels with A

translation of dilation: always can contain A

Page 10: Computer and Robot Vision I

DC & CV Lab.DC & CV Lab.CSIE NTU

5.2.1 Binary Dilation (cont’)

=lena.bin.128=

Page 11: Computer and Robot Vision I

DC & CV Lab.DC & CV Lab.CSIE NTU

5.2.1 Binary Dilation (cont’)

=lena.bin.dil= By structuring

element :

Page 12: Computer and Robot Vision I

DC & CV Lab.DC & CV Lab.CSIE NTU

5.2.1 Binary Dilation (cont’)

N4: set of four 4-neighbors of (0,0) but not (0,0,) 4-isolated pixels removed only points in I with at least one of its 4-neighbors r

emain At: translation of A by the point t

removal noisefor )( N IJJ 4 I

Page 13: Computer and Robot Vision I

DC & CV Lab.DC & CV Lab.CSIE NTU

5.2.1 Binary Dilation (cont’)

dilation: union of translates of kernel

addition associative dilation associative

associativity of dilation: chain rule: iterative rule dilation of translated kernel: translation of dilation

Page 14: Computer and Robot Vision I

DC & CV Lab.DC & CV Lab.CSIE NTU

5.2.1 Binary Dilation (cont’)

dilation distributes over union

dilating by union of two sets: the union of the dilation

Page 15: Computer and Robot Vision I

DC & CV Lab.DC & CV Lab.CSIE NTU

5.2.1 Binary Dilation (cont’)

dilating A by kernel with origin guaranteed to contain A

extensive: operators whose output contains input dilation extensive when kernel contains origin

dilation preserves order

increasing: preserves order

Page 16: Computer and Robot Vision I

DC & CV Lab.DC & CV Lab.CSIE NTU

5.2.2 Binary Erosion

erosion: morphological dual of dilation erosion of A by B: set of all x s.t.

erosion: shrink: reduce:

BbAb x every for

Page 17: Computer and Robot Vision I

DC & CV Lab.DC & CV Lab.CSIE NTU

5.2.2 Binary Erosion (cont’)

Page 18: Computer and Robot Vision I

DC & CV Lab.DC & CV Lab.CSIE NTU

5.2.2 Binary Erosion (cont’)

=Lena.bin.ero=

Page 19: Computer and Robot Vision I

DC & CV Lab.DC & CV Lab.CSIE NTU

5.2.2 Binary Erosion (cont’)

erosion of A by B: set of all x for which B translated to x contained in A

if B translated to x contained in A then x in A B erosion: difference of elements a and b

Page 20: Computer and Robot Vision I

DC & CV Lab.DC & CV Lab.CSIE NTU

5.2.2 Binary Erosion (cont’)

dilation: union of translates erosion: intersection of negative translates

Page 21: Computer and Robot Vision I

DC & CV Lab.DC & CV Lab.CSIE NTU

5.2.2 Binary Erosion (cont’)

Page 22: Computer and Robot Vision I

DC & CV Lab.DC & CV Lab.CSIE NTU

5.2.2 Binary Erosion (cont’)

Minkowski subtraction: close relative to erosion

Minkowski subtraction: erosion: shrinking of the original image antiextensive: operated set contained in the o

riginal set erosion antiextensive: if origin contained in ke

rnel

Page 23: Computer and Robot Vision I

DC & CV Lab.DC & CV Lab.CSIE NTU

5.2.2 Binary Erosion (cont’)

if then because

eroding A by kernel without origin can have nothing in common with A

Page 24: Computer and Robot Vision I

DC & CV Lab.DC & CV Lab.CSIE NTU

5.2.2 Binary Erosion (cont’)

Page 25: Computer and Robot Vision I

DC & CV Lab.DC & CV Lab.CSIE NTU

5.2.2 Binary Erosion (cont’)

•dilating translated set results in a translated dilation

•eroding by translated kernel results in negatively translated erosion

•dilation, erosion: increasing

Page 26: Computer and Robot Vision I

DC & CV Lab.DC & CV Lab.CSIE NTU

5.2.2 Binary Erosion (cont’)

eroding by larger kernel produces smaller result

Dilation, erosion similar that one does to foreground, the other to background

similarity: duality dual: negation of one equals to the other on negated

variables DeMorgan’s law: duality between set union and inter

section

Page 27: Computer and Robot Vision I

DC & CV Lab.DC & CV Lab.CSIE NTU

5.2.2 Binary Erosion (cont’)

negation of a set: complement

negation of a set in two possible ways in morphology logical sense: set complement geometric sense: reflection: reversing of set orientation

Page 28: Computer and Robot Vision I

DC & CV Lab.DC & CV Lab.CSIE NTU

5.2.2 Binary Erosion (cont’)

complement of erosion: dilation of the complement by reflection

Theorem 5.1: Erosion Dilation Duality

Page 29: Computer and Robot Vision I

DC & CV Lab.DC & CV Lab.CSIE NTU

5.2.2 Binary Erosion (cont’)

Page 30: Computer and Robot Vision I

DC & CV Lab.DC & CV Lab.CSIE NTU

5.2.2 Binary Erosion (cont’)

Corollary 5.1: erosion of intersection of two sets: intersectio

n of erosions

Page 31: Computer and Robot Vision I

DC & CV Lab.DC & CV Lab.CSIE NTU

5.2.2 Binary Erosion (cont’)

Page 32: Computer and Robot Vision I

DC & CV Lab.DC & CV Lab.CSIE NTU

5.2.2 Binary Erosion (cont’)

erosion of a kernel of union of two sets: intersection of erosions

erosion of kernel of intersection of two sets: contains union of erosions

no stronger

Page 33: Computer and Robot Vision I

DC & CV Lab.DC & CV Lab.CSIE NTU

Page 34: Computer and Robot Vision I

DC & CV Lab.DC & CV Lab.CSIE NTU

5.2.2 Binary Erosion (cont’)

chain rule for erosion holds when kernel decomposable through dilation

duality does not imply cancellation on morphological equalities

containment relationship holds

Page 35: Computer and Robot Vision I

DC & CV Lab.DC & CV Lab.CSIE NTU

5.2.2 Binary Erosion (cont’)

genus g(I): number of connected components minus number of holes of I 4-connected for object, 8-connected for background

8-connected for object, 4-connected for background

Page 36: Computer and Robot Vision I

DC & CV Lab.DC & CV Lab.CSIE NTU

5.2.2 Binary Erosion (cont’)

Page 37: Computer and Robot Vision I

DC & CV Lab.DC & CV Lab.CSIE NTU

5.2.2 Binary Erosion (cont’)

Page 38: Computer and Robot Vision I

DC & CV Lab.DC & CV Lab.CSIE NTU

Joke

Page 39: Computer and Robot Vision I

DC & CV Lab.DC & CV Lab.CSIE NTU

5.2.3 Hit-and-Miss Transform

hit-and-miss: selects corner points, isolated points, border points

hit-and-miss: performs template matching, thinning, thickening, centering

hit-and-miss: intersection of erosions J,K kernels satisfy hit-and-miss of set A by (J,K)

hit-and-miss: to find upper right-hand corner

Page 40: Computer and Robot Vision I

DC & CV Lab.DC & CV Lab.CSIE NTU

5.2.3 Hit-and-Miss Transform (cont’)

Page 41: Computer and Robot Vision I

DC & CV Lab.DC & CV Lab.CSIE NTU

Page 42: Computer and Robot Vision I

DC & CV Lab.DC & CV Lab.CSIE NTU

5.2.3 Hit-and-Miss Transform (cont’)

J locates all pixels with south, west neighbors part of A

K locates all pixels of Ac with south, west neighbors in Ac

J and K displaced from one another Hit-and-miss: locate particular spatial pattern

s

Page 43: Computer and Robot Vision I

DC & CV Lab.DC & CV Lab.CSIE NTU

5.2.3 Hit-and-Miss Transform (cont’)

hit-and-miss: to compute genus of a binary image

Page 44: Computer and Robot Vision I

DC & CV Lab.DC & CV Lab.CSIE NTU

5.2.3 Hit-and-Miss Transform (cont’)

Page 45: Computer and Robot Vision I

DC & CV Lab.DC & CV Lab.CSIE NTU

5.2.3 Hit-and-Miss Transform (cont’)

hit-and-miss: thickening and thinning hit-and-miss: counting hit-and-miss: template matching

Page 46: Computer and Robot Vision I

DC & CV Lab.DC & CV Lab.CSIE NTU

5.2.4 Dilation and Erosion Summary

Page 47: Computer and Robot Vision I

DC & CV Lab.DC & CV Lab.CSIE NTU

5.2.4 Dilation and Erosion Summary (cont’)

Page 48: Computer and Robot Vision I

DC & CV Lab.DC & CV Lab.CSIE NTU

5.2.5 Opening and Closing

dilation and erosions: usually employed in pairs B K: opening of image B by kernel K

B K closing of image B by kernel K

B open under K: B open w.r.t. K: B= B K B open under K: B open w.r.t. K: B= B K

Page 49: Computer and Robot Vision I

DC & CV Lab.DC & CV Lab.CSIE NTU

5.2.5 Opening and Closing (cont’)

=lena.bin.open=

Page 50: Computer and Robot Vision I

DC & CV Lab.DC & CV Lab.CSIE NTU

5.2.5 Opening and Closing (cont’)

morphological opening, closing: no relation to topologically open, closed sets

opening characterization theorem

A K: selects points covered by some translation of K, entirely contained in A

Page 51: Computer and Robot Vision I

DC & CV Lab.DC & CV Lab.CSIE NTU

5.2.5 Opening and Closing (cont’)

opening with disk kernel: smoothes contours, breaks narrow isthmuses

opening with disk kernel: eliminates small islands, sharp peaks, capes

closing by disk kernel; smoothes contours, fuses narrow breaks, long, thin gulfs

closing with disk kernel: eliminates small holes, fill gaps on the contours

Page 52: Computer and Robot Vision I

DC & CV Lab.DC & CV Lab.CSIE NTU

5.2.5 Opening and Closing (cont’)

=lena.bin.close=

Page 53: Computer and Robot Vision I

DC & CV Lab.DC & CV Lab.CSIE NTU

5.2.5 Opening and Closing (cont’)

unlike erosion and dilation: opening invariant to kernel translation

opening antiextensive like erosion and dilation: opening increasing

Page 54: Computer and Robot Vision I

DC & CV Lab.DC & CV Lab.CSIE NTU

5.2.5 Opening and Closing (cont’)

A K: those pixels covered by sweeping kernel all over inside of A

F: shape with body and handle L: small disk structuring element with radius just lar

ger than handle width extraction of the body and handle by opening and taking the residue

Page 55: Computer and Robot Vision I

DC & CV Lab.DC & CV Lab.CSIE NTU

5.2.5 Opening and Closing (cont’)

Page 56: Computer and Robot Vision I

DC & CV Lab.DC & CV Lab.CSIE NTU

5.2.5 Opening and Closing (cont’)

Page 57: Computer and Robot Vision I

DC & CV Lab.DC & CV Lab.CSIE NTU

5.2.5 Opening and Closing (cont’)

extraction of trunk and arms with vertical and horizontal kernels

Page 58: Computer and Robot Vision I

DC & CV Lab.DC & CV Lab.CSIE NTU

Page 59: Computer and Robot Vision I

DC & CV Lab.DC & CV Lab.CSIE NTU

5.2.5 Opening and Closing (cont’)

Page 60: Computer and Robot Vision I

DC & CV Lab.DC & CV Lab.CSIE NTU

5.2.5 Opening and Closing (cont’)

extraction of base trunk horizontal and vertical areas

Page 61: Computer and Robot Vision I

DC & CV Lab.DC & CV Lab.CSIE NTU

5.2.5 Opening and Closing (cont’)

Page 62: Computer and Robot Vision I

DC & CV Lab.DC & CV Lab.CSIE NTU

5.2.5 Opening and Closing (cont’)

noisy background line segment removal

Page 63: Computer and Robot Vision I

DC & CV Lab.DC & CV Lab.CSIE NTU

Page 64: Computer and Robot Vision I

DC & CV Lab.DC & CV Lab.CSIE NTU

5.2.5 Opening and Closing (cont’)

Page 65: Computer and Robot Vision I

DC & CV Lab.DC & CV Lab.CSIE NTU

Page 66: Computer and Robot Vision I

DC & CV Lab.DC & CV Lab.CSIE NTU

5.2.5 Opening and Closing (cont’)

Page 67: Computer and Robot Vision I

DC & CV Lab.DC & CV Lab.CSIE NTU

5.2.5 Opening and Closing (cont’)

decomposition into parts

Page 68: Computer and Robot Vision I

DC & CV Lab.DC & CV Lab.CSIE NTU

5.2.5 Opening and Closing (cont’)

closing: dual of opening

like opening: closing invariant to kernel translation

closing extensive like dilation, erosion, opening: closing

increasing

Page 69: Computer and Robot Vision I

DC & CV Lab.DC & CV Lab.CSIE NTU

5.2.5 Opening and Closing (cont’)

opening idempotent

closing idempotent

if L K not necessarily follows that

Page 70: Computer and Robot Vision I

DC & CV Lab.DC & CV Lab.CSIE NTU

5.2.5 Opening and Closing (cont’)

Page 71: Computer and Robot Vision I

DC & CV Lab.DC & CV Lab.CSIE NTU

5.2.5 Opening and Closing (cont’)

Page 72: Computer and Robot Vision I

DC & CV Lab.DC & CV Lab.CSIE NTU

5.2.5 Opening and Closing (cont’)

Page 73: Computer and Robot Vision I

DC & CV Lab.DC & CV Lab.CSIE NTU

5.2.5 Opening and Closing (cont’)

closing may be used to detect spatial clusters of points

Page 74: Computer and Robot Vision I

DC & CV Lab.DC & CV Lab.CSIE NTU

Joke

Page 75: Computer and Robot Vision I

DC & CV Lab.DC & CV Lab.CSIE NTU

5.2.6 Morphological Shape Feature Extraction

morphological pattern spectrum: shape-size histogram [Maragos 1987]

Page 76: Computer and Robot Vision I

DC & CV Lab.DC & CV Lab.CSIE NTU

5.27 Fast Dilations and Erosions

decompose kernels to make dilations and erosions fast

Page 77: Computer and Robot Vision I

DC & CV Lab.DC & CV Lab.CSIE NTU

5.3 Connectivity

morphology and connectivity: close relation

Page 78: Computer and Robot Vision I

DC & CV Lab.DC & CV Lab.CSIE NTU

5.3.1 Separation Relation

S separation if and only if S symmetric, exclusive, hereditary, extensive

Page 79: Computer and Robot Vision I

DC & CV Lab.DC & CV Lab.CSIE NTU

5.3.2 Morphological Noise Cleaning and Connectivity

images perturbed by noise can be morphologically filtered to remove some noise

Page 80: Computer and Robot Vision I

DC & CV Lab.DC & CV Lab.CSIE NTU

5.3.3 Openings Holes and Connectivity

opening can create holes in a connected set that is being opened

Page 81: Computer and Robot Vision I

DC & CV Lab.DC & CV Lab.CSIE NTU

5.3.4 Conditional Dilation

select connected components of image that have nonempty erosion conditional dilation J ,

defined iteratively J0 = J J are points in the regions we want to select

conditional dilation J =Jm

where m is the smallest index Jm=Jm-1

DI|

DI|

Page 82: Computer and Robot Vision I

DC & CV Lab.DC & CV Lab.CSIE NTU

Page 83: Computer and Robot Vision I

DC & CV Lab.DC & CV Lab.CSIE NTU

5.4 Generalized Openings and Closings

generalized opening: any increasing, antiextensive, idempotent operation

generalized closing: any increasing. extensive, idempotent operation

Page 84: Computer and Robot Vision I

DC & CV Lab.DC & CV Lab.CSIE NTU

Joke

End

Page 85: Computer and Robot Vision I

DC & CV Lab.DC & CV Lab.CSIE NTU

Hit and Miss (cont’)

hit-and-miss: thickening and thinning

hit-and-miss: template matching

Page 86: Computer and Robot Vision I

DC & CV Lab.DC & CV Lab.CSIE NTU

Hit and Miss (cont’)

hit-and-miss: thickening

)),(...)},(),((...{[ 8822111 KJKJKJAA nn

),(),( KJAAKJA

Page 87: Computer and Robot Vision I

DC & CV Lab.DC & CV Lab.CSIE NTU

Hit and Miss (cont’)

Page 88: Computer and Robot Vision I

DC & CV Lab.DC & CV Lab.CSIE NTU

Hit and Miss (cont’)

hit-and-miss: thinning

)),(...)},(),((...{[ 8822111 KJKJKJAA nn

),(),( KJAAKJA

Page 89: Computer and Robot Vision I

DC & CV Lab.DC & CV Lab.CSIE NTU

Hit and Miss (cont’)

Page 90: Computer and Robot Vision I

DC & CV Lab.DC & CV Lab.CSIE NTU

Hit and Miss (cont’)

hit-and-miss: template matching

cxx ITWandIT )(

})()(|{ cx

cxx IWKTandIKTx

)](,[ KTWKTI

Page 91: Computer and Robot Vision I

DC & CV Lab.DC & CV Lab.CSIE NTU

Hit and Miss (cont’)

Page 92: Computer and Robot Vision I

DC & CV Lab.DC & CV Lab.CSIE NTU

5.5 Gray Scale Morphology

binary dilation, erosion, opening, closing naturally extended to gray scale

extension: uses min or max operation gray scale dilation: surface of dilation of

umbra gray scale dilation: maximum and a set of

addition operations gray scale erosion: minimum and a set of

subtraction operations

Page 93: Computer and Robot Vision I

DC & CV Lab.DC & CV Lab.CSIE NTU

5.5.1Gray Scale Dilation and Erosion

top: top surface of A: denoted by

umbra of f: denoted by

Page 94: Computer and Robot Vision I

DC & CV Lab.DC & CV Lab.CSIE NTU

5.5.1Gray Scale Dilation and Erosion (cont’)

Page 95: Computer and Robot Vision I

DC & CV Lab.DC & CV Lab.CSIE NTU

5.5.1Gray Scale Dilation and Erosion (cont’)

gray scale dilation: surface of dilation of umbras

dilation of f by k: denoted by

Page 96: Computer and Robot Vision I

DC & CV Lab.DC & CV Lab.CSIE NTU

5.5.1Gray Scale Dilation and Erosion (cont’)

Page 97: Computer and Robot Vision I

DC & CV Lab.DC & CV Lab.CSIE NTU

5.5.1Gray Scale Dilation and Erosion (cont’)

Page 98: Computer and Robot Vision I

DC & CV Lab.DC & CV Lab.CSIE NTU

5.5.1Gray Scale Dilation and Erosion (cont’)

-36

0

36

-40

-30

-20

-10

0

10

20

30

40

-1.5 -1 -0.5 0 0.5 1 1.5

K

Page 99: Computer and Robot Vision I

DC & CV Lab.DC & CV Lab.CSIE NTU

5.5.1Gray Scale Dilation and Erosion (cont’)

1923

9

29

-12-15

-10

-5

0

5

10

15

20

25

30

35

0 1 2 3 4 5 6 7 8 9

F

Page 100: Computer and Robot Vision I

DC & CV Lab.DC & CV Lab.CSIE NTU

5.5.1Gray Scale Dilation and Erosion (cont’)

Page 101: Computer and Robot Vision I

DC & CV Lab.DC & CV Lab.CSIE NTU

Page 102: Computer and Robot Vision I

DC & CV Lab.DC & CV Lab.CSIE NTU

5.5.1Gray Scale Dilation and Erosion (cont’)

Page 103: Computer and Robot Vision I

DC & CV Lab.DC & CV Lab.CSIE NTU

5.5.1Gray Scale Dilation and Erosion (cont’)

-17

19

55 59

45

65

24

-30

-20

-10

0

10

20

30

40

50

60

70

0 1 2 3 4 5 6 7 8 9 10

f dilation by k

Page 104: Computer and Robot Vision I

DC & CV Lab.DC & CV Lab.CSIE NTU

5.5.1Gray Scale Dilation and Erosion (cont’)

gray scale erosion: surface of binary erosions of one umbra by the other umbra

Page 105: Computer and Robot Vision I

DC & CV Lab.DC & CV Lab.CSIE NTU

5.5.1Gray Scale Dilation and Erosion (cont’)

=lena.im=

Page 106: Computer and Robot Vision I

DC & CV Lab.DC & CV Lab.CSIE NTU

5.5.1Gray Scale Dilation and Erosion (cont’)

=lena.im.dil=

Page 107: Computer and Robot Vision I

DC & CV Lab.DC & CV Lab.CSIE NTU

5.5.1Gray Scale Dilation and Erosion (cont’)

Structuring Elements:

Value=0

* * ** * * * ** * * * ** * * * *

* * *

Page 108: Computer and Robot Vision I

DC & CV Lab.DC & CV Lab.CSIE NTU

5.5.1Gray Scale Dilation and Erosion (cont’)

Page 109: Computer and Robot Vision I

DC & CV Lab.DC & CV Lab.CSIE NTU

5.5.1Gray Scale Dilation and Erosion (cont’)

Page 110: Computer and Robot Vision I

DC & CV Lab.DC & CV Lab.CSIE NTU

5.5.1Gray Scale Dilation and Erosion (cont’)

-36

0

36

-40-35-30-25-20-15-10-505

10152025303540

-1.5 -1 -0.5 0 0.5 1 1.5

K

Page 111: Computer and Robot Vision I

DC & CV Lab.DC & CV Lab.CSIE NTU

5.5.1Gray Scale Dilation and Erosion (cont’)

-12

31

55 5945

7

-48-60-50-40-30-20-10

010203040506070

0 1 2 3 4 5 6 7 8 9 10

F

Page 112: Computer and Robot Vision I

DC & CV Lab.DC & CV Lab.CSIE NTU

5.5.1Gray Scale Dilation and Erosion (cont’)

Page 113: Computer and Robot Vision I

DC & CV Lab.DC & CV Lab.CSIE NTU

5.5.1Gray Scale Dilation and Erosion (cont’)

19 23

9

-29

-48

-60

-50

-40

-30

-20

-10

0

10

20

30

0 1 2 3 4 5 6 7 8 9

F eorsion by K

Page 114: Computer and Robot Vision I

DC & CV Lab.DC & CV Lab.CSIE NTU

5.5.1Gray Scale Dilation and Erosion (cont’)

=lena.im.ero=

Page 115: Computer and Robot Vision I

DC & CV Lab.DC & CV Lab.CSIE NTU

5.5.1Gray Scale Dilation and Erosion (cont’)

Page 116: Computer and Robot Vision I

DC & CV Lab.DC & CV Lab.CSIE NTU

5.5.1Gray Scale Dilation and Erosion (cont’)

Page 117: Computer and Robot Vision I

DC & CV Lab.DC & CV Lab.CSIE NTU

5.5.2 Umbra Homomorphism Theorems

surface and umbra operations: inverses of each other, in a certain sense

surface operation: left inverse of umbra operation

Page 118: Computer and Robot Vision I

DC & CV Lab.DC & CV Lab.CSIE NTU

5.5.2 Umbra Homomorphism Theorems

Proposition 5.1

Proposition 5.2

Proposition 5.3

Page 119: Computer and Robot Vision I

DC & CV Lab.DC & CV Lab.CSIE NTU

5.5.3 Gray Scale Opening and Closing

gray scale opening of f by kernel k denoted by f k

gray scale closing of f by kernel k denoted by f k

Page 120: Computer and Robot Vision I

DC & CV Lab.DC & CV Lab.CSIE NTU

5.5.3 Gray Scale Opening and Closing (cont’)

=lena.im.open=

Page 121: Computer and Robot Vision I

DC & CV Lab.DC & CV Lab.CSIE NTU

5.5.3 Gray Scale Opening and Closing (cont’)

=lena.im.close=

Page 122: Computer and Robot Vision I

DC & CV Lab.DC & CV Lab.CSIE NTU

5.5.3 Gray Scale Opening and Closing (cont’)

duality of gray scale, dilation erosion duality of opening, closing

Page 123: Computer and Robot Vision I

DC & CV Lab.DC & CV Lab.CSIE NTU

5.5.3 Gray Scale Opening and Closing (cont’)

Page 124: Computer and Robot Vision I

DC & CV Lab.DC & CV Lab.CSIE NTU

joke

Page 125: Computer and Robot Vision I

DC & CV Lab.DC & CV Lab.CSIE NTU

5.6 Openings Closings and Medians

median filter: most common nonlinear noise-smoothing filter

median filter: for each pixel, the new value is the median of a window

median filter: robust to outlier pixel values leaves, edges sharp

median root images: images remain unchanged after median filter

Page 126: Computer and Robot Vision I

DC & CV Lab.DC & CV Lab.CSIE NTU

5.7 Bounding Second Derivatives

opening or closing a gray scale image simplifies the image complexity

Page 127: Computer and Robot Vision I

DC & CV Lab.DC & CV Lab.CSIE NTU

5.8 Distance Transform and Recursive Morphology

Page 128: Computer and Robot Vision I

DC & CV Lab.DC & CV Lab.CSIE NTU

5.8 Distance Transform and Recursive Morphology (cont’)

Fig 5.39 (b) fire burns from outside but burns only downward and right-ward

Page 129: Computer and Robot Vision I

DC & CV Lab.DC & CV Lab.CSIE NTU

5.9 Generalized Distance Transform

Page 130: Computer and Robot Vision I

DC & CV Lab.DC & CV Lab.CSIE NTU

5.10 Medial Axis

medial axis transform medial axis with distance function

Page 131: Computer and Robot Vision I

DC & CV Lab.DC & CV Lab.CSIE NTU

5.10.1 Medial Axis and Morphological Skeleton

morphological skeleton of a set A by kernel K ,where

Page 132: Computer and Robot Vision I

DC & CV Lab.DC & CV Lab.CSIE NTU

5.10.1 Medial Axis and Morphological Skeleton (cont’)

Page 133: Computer and Robot Vision I

DC & CV Lab.DC & CV Lab.CSIE NTU

5.10.1 Medial Axis and Morphological Skeleton (cont’)

Page 134: Computer and Robot Vision I

DC & CV Lab.DC & CV Lab.CSIE NTU

5.10.1 Medial Axis and Morphological Skeleton (cont’)

Page 135: Computer and Robot Vision I

DC & CV Lab.DC & CV Lab.CSIE NTU

5.11 Morphological Sampling Theorem

Before sets are sampled for morphological processing, they must be morphologically simplified by an opening or a closing .

Such sampled sets can be reconstructed in two ways: by either a closing or a dilation.

Page 136: Computer and Robot Vision I

DC & CV Lab.DC & CV Lab.CSIE NTU

=========== Joke===========

Page 137: Computer and Robot Vision I

DC & CV Lab.DC & CV Lab.CSIE NTU

5.12 Summary

morphological operations: shape extraction, noise cleaning, thickening

morphological operations: thinning, skeletonizing

Page 138: Computer and Robot Vision I

DC & CV Lab.DC & CV Lab.CSIE NTU

Homework

Write programs which do binary morphological dilation, erosion, opening, closing, and hit-and-miss transform on a binary image (Due Nov. 1)

Write programs which do gray scale morphological dilation, erosion, opening, and closing on a gray scale image (Due Nov. 15)