chapter 9
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 PresentationTRANSCRIPT
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
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
Graphical examples (cont.)
AwwAc BwAwwBA ,
Logic operations on binary images
Functionally complete operations AND, OR, NOT
Special set operationsfor morphology
translation
AazaccA z for ,)(
reflection
BbbwwB for ,ˆ
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
Structuring element (SE)
Outline erosion and Dilation Opening and closing Hit-or-miss transformation Some basic morphological algorithms Extensions to gray-scale images
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
Erosion
Erosion
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
Dilation
Application of dilation: bridging gaps in images
Structuringelement
max. gap=2 pixels
Effects: increase size, fill gap
Application of erosion: eliminate irrelevant detail
original image
Squares of size1,3,5,7,9,15 pels
erosion
Erode with13x13 square
dilation
Dilation and erosion are duals
czc ABzBA )( ) (
ccz ABz )(
)( cz ABz
)ˆ( ABzBA z
BAc ˆ
Outline Preliminaries Dilation and erosion Opening and closing Hit-or-miss transformation Some basic morphological algorithms Extensions to gray-scale images
Opening Dilation: expands image w.r.t
structuring elements Erosion: shrink image erosion+dilation = original image ? Opening= erosion + dilation
BBABA ) (
Opening (cont.)
Opening (cont.)
Smooth the contour of an image, breaks narrow isthmuses, eliminates thin protrusions
Find contour Fill in contour
Closing Dilation+erosion = erosion + dilation ? Closing = dilation + erosion
BBABA )(
Closing (cont.)
Find contour Fill in contour
Smooth the object contour, fuse narrow breaks and longthin gulfs, eliminate small holes, and fill in gaps
Closing (cont.)
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)
Noisyimage
openingRemoveouternoise
Removeinnernoise
closing
Outline Preliminaries Dilation and erosion Opening and closing Hit-or-miss transformation Some basic morphological algorithms Extensions to gray-scale images
Hit-or-miss transformation Find the location of certain shape
erosion
Find the set of pixels thatcontain shape X
X
Hit-or-miss transformation
Erosionwith (W-X)
Detect object via background
Hit-or-miss transformation Eliminate un-necessary parts
AND
Hit-or-miss transformation
)]([)( XWAXABA c
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
Boundary extraction
)()( BAAA
Boundary extraction
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
Region filling (cont.)
stop
Application: region filling
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
Extraction of connected components (cont.)
original
thresholding
erosion
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
Convex hull
42
43
Thinning
cBAA
BAABA
)(
)(
44
Thickening
)( BAABA 1. A
2. Ac
3. Thinning Ac4. complement the result in 3
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?
46
SkeletonsK
kk ASAS
0
)()(
BkBAkBAASk )()()(
})(|max{ kBAkK
))((0
kBASA k
K
k
K
kk ASAS
0
)()(
BkBAkBAASk )()()(
})(|max{ kBAkK
Skeletons
Skeleton
50
Pruning
}{1 BAX
AHXX )( 23
314 XXX
H = 3x3 structuring element of 1’s
)( 1
8
12
k
kBXX
51
52
53
54