chapter 9

54
Chapter 9 Morphological Image Processing

Upload: zinnia

Post on 07-Jan-2016

24 views

Category:

Documents


0 download

DESCRIPTION

Chapter 9. Morphological Image Processing. Preview. Morphology About the form and structure of animals and plants Mathematical morphology Using set theory Extract image component Representation and description of region shape. Z 2 and Z 3. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Chapter 9

Chapter 9

Morphological Image Processing

Page 2: Chapter 9

Preview Morphology

About the form and structure of animals and plants

Mathematical morphology Using set theory Extract image component Representation and description of region

shape

Page 3: Chapter 9

3

Z2 and Z3

set in mathematic morphology represent objects in an image binary image (0 = white, 1 = black) : the

element of the set is the coordinates (x,y) of pixel belong to the object Z2

gray-scaled image : the element of the set is the coordinates (x,y) of pixel belong to the object and the gray levels Z3

Page 4: Chapter 9

Graphical examples (cont.)

AwwAc BwAwwBA ,

Page 5: Chapter 9

Logic operations on binary images

Functionally complete operations AND, OR, NOT

Page 6: Chapter 9

Special set operationsfor morphology

translation

AazaccA z for ,)(

reflection

BbbwwB for ,ˆ

Page 7: Chapter 9

Structuring element (SE)

7

small set to probe the image under study for each SE, define origin. shape and size must be adapted to geometricproperties for the objects

Page 8: Chapter 9

Structuring element (SE)

Page 9: Chapter 9

Outline erosion and Dilation Opening and closing Hit-or-miss transformation Some basic morphological algorithms Extensions to gray-scale images

Page 10: Chapter 9

Erosion

Does the structuring element fit the set?

erosion of a set A by structuring element B: all z in A such that B is in A when origin of B=z

shrink the object

10

}{ Az|(B)BA z

Page 11: Chapter 9

Erosion

Page 12: Chapter 9

Erosion

Page 13: Chapter 9

Dilation

Does the structuring element hit the set?

dilation of a set A by structuring element B: all z in A such that B hits A when origin of B=z

grow the object13

}ˆ{ ΦA)Bz|(BA z

Page 14: Chapter 9

Dilation

Page 15: Chapter 9

Application of dilation: bridging gaps in images

Structuringelement

max. gap=2 pixels

Effects: increase size, fill gap

Page 16: Chapter 9

Application of erosion: eliminate irrelevant detail

original image

Squares of size1,3,5,7,9,15 pels

erosion

Erode with13x13 square

dilation

Page 17: Chapter 9

Dilation and erosion are duals

czc ABzBA )( ) (

ccz ABz )(

)( cz ABz

)ˆ( ABzBA z

BAc ˆ

Page 18: Chapter 9

Outline Preliminaries Dilation and erosion Opening and closing Hit-or-miss transformation Some basic morphological algorithms Extensions to gray-scale images

Page 19: Chapter 9

Opening Dilation: expands image w.r.t

structuring elements Erosion: shrink image erosion+dilation = original image ? Opening= erosion + dilation

BBABA ) (

Page 20: Chapter 9

Opening (cont.)

Page 21: Chapter 9

Opening (cont.)

Smooth the contour of an image, breaks narrow isthmuses, eliminates thin protrusions

Find contour Fill in contour

Page 22: Chapter 9

Closing Dilation+erosion = erosion + dilation ? Closing = dilation + erosion

BBABA )(

Page 23: Chapter 9

Closing (cont.)

Find contour Fill in contour

Smooth the object contour, fuse narrow breaks and longthin gulfs, eliminate small holes, and fill in gaps

Page 24: Chapter 9

Closing (cont.)

Page 25: Chapter 9

Properties of opening and closing

Opening

Closing

ABA of (subimage)subset a is (i) BDBCC ofsubset a is then D,ofsubset a is If (ii)

BABBA )( (iii)

BAA of (subimage)subset a is (i)

BDBCC ofsubset a is then D,ofsubset a is If (ii)BABBA )( (iii)

Page 26: Chapter 9

Noisyimage

openingRemoveouternoise

Removeinnernoise

closing

Page 27: Chapter 9

Outline Preliminaries Dilation and erosion Opening and closing Hit-or-miss transformation Some basic morphological algorithms Extensions to gray-scale images

Page 28: Chapter 9

Hit-or-miss transformation Find the location of certain shape

erosion

Find the set of pixels thatcontain shape X

X

Page 29: Chapter 9

Hit-or-miss transformation

Erosionwith (W-X)

Detect object via background

Page 30: Chapter 9

Hit-or-miss transformation Eliminate un-necessary parts

AND

Page 31: Chapter 9

Hit-or-miss transformation

)]([)( XWAXABA c

Page 32: Chapter 9

Basic morphological algorithms

Extract image components that are useful in the representation and description of shape

Boundary extraction Region filling Extract of connected components Convex hull Thinning Thickening Skeleton Pruning

Page 33: Chapter 9

Boundary extraction

)()( BAAA

Page 34: Chapter 9

Boundary extraction

Page 35: Chapter 9

Region filling How? Idea: place a point inside the region,

then dilate that point iteratively

,...3,2,1,)( 1 kABXX ckk

pX 0

Until 1 kk XX

Bound the growth

Page 36: Chapter 9

Region filling (cont.)

stop

Page 37: Chapter 9

Application: region filling

Page 38: Chapter 9

Extraction of connected components

Idea: start from a point in the connected component, and dilate it iteratively

,...3,2,1 ,)( 1 kABXX kk

pX 0

Until 1 kk XX

Page 39: Chapter 9

Extraction of connected components (cont.)

Page 40: Chapter 9

original

thresholding

erosion

Page 41: Chapter 9

Convex hull

A set A is said to be convex if the straight line segment joining any two points in A lies entirely within A.

The convex hull of a set A is the smallest convex set containing A.

i

iDAC

4

1)(

,...3,2,1 and 4,3,2,1 )( kiABXX iik

ik

41

Page 42: Chapter 9

Convex hull

42

Page 43: Chapter 9

43

Thinning

cBAA

BAABA

)(

)(

Page 44: Chapter 9

44

Thickening

)( BAABA 1. A

2. Ac

3. Thinning Ac4. complement the result in 3

Page 45: Chapter 9

Skeletons

Set A Maximum disk

1. The largest disk Centered at a pixel2. Touch the boundaryof A at two or more places

Recall: Balls of erosion!

How to define a Skeletons?

Page 46: Chapter 9

46

SkeletonsK

kk ASAS

0

)()(

BkBAkBAASk )()()(

})(|max{ kBAkK

))((0

kBASA k

K

k

K

kk ASAS

0

)()(

BkBAkBAASk )()()(

})(|max{ kBAkK

Page 47: Chapter 9

Skeletons

Page 48: Chapter 9

Skeleton

Page 49: Chapter 9
Page 50: Chapter 9

50

Pruning

}{1 BAX

AHXX )( 23

314 XXX

H = 3x3 structuring element of 1’s

)( 1

8

12

k

kBXX

Page 51: Chapter 9

51

Page 52: Chapter 9

52

Page 53: Chapter 9

53

Page 54: Chapter 9

54