MATHEMATICAL MORPHOLOGY
I. INTRODUCTION
II. BINARY MORPHOLOGY
III. GREY-LEVEL MORPHOLOGY
INTRODUCTION
Mathematical morphology
• Self-sufficient framework for image processing and analysis, created at the École des Mines (Fontainebleau) in 70’s by Jean Serra, Georges Mathéron, from studies in science materials
• Conceptually simple operations combined to define others more and more complex and powerful
• Simple because operations often have geometrical meaning
• Powerful for image analysis
INTRODUCTION
• Binary and grey-level images seen as sets
X
Xc
f (x,y)
X = { (x, y, z) , z f (x,y) }
• Operations defined as interaction of images with a special set, the structuring element
INTRODUCTION
MATHEMATICAL MORPHOLOGY
I. INTRODUCTION
II. BINARY MORPHOLOGY
III. GREY-LEVEL MORPHOLOGY
BINARY MORPHOLOGY
1. Erosion and dilation
2. Common structuring elements
3. Opening, closing
4. Properties
5. Hit-or-miss
6. Thinning, thickenning
7. Other useful transforms :
i. Contour
ii. Convex-hull
iii. Skeleton
iv. Geodesic influence zones
X
B
BINARY MORPHOLOGY
No necessarily compactnor filled
A special set :the structuring element
-2 -1 0 1 2
-2 -1 0 1 2
Origin at center in this case, but not necessarily centered nor symmetric
Notation
x
y
Dilation : x = (x1,x2) such that if we center B on them, then the so translated B intersects X.
X
B
difference
BINARY MORPHOLOGY
BINARY MORPHOLOGY
Dilation : x = (x1,x2) such that if we center B on them, then the so translated B intersects X.
How to formulate this definition ?
1) Literal translation
2) Better : from Minkowski’s sum of sets
BINARY MORPHOLOGY
Minkowski’s sum of sets :
l
l
BINARY MORPHOLOGY
Dilation :
l
Dilation
l
BINARY MORPHOLOGY
Dilation is not the Minkowski’s sum
l
l
bbbb l
BINARY MORPHOLOGY
Dilation with other structuring elements
BINARY MORPHOLOGY
BINARY MORPHOLOGY
Dilation with other structuring elements
Erosion : x = (x1,x2) such that if we center B on them, then the so translated B is contained in X.
BINARY MORPHOLOGY
difference
BINARY MORPHOLOGY
2) Better : from Minkowski’s substraction of sets
Erosion : x = (x1,x2) such that if we center B on them, then the so translated B is contained in X.
How to formulate this definition ?
1) Literal translation
BINARY MORPHOLOGY
Erosion with other structuring elements
BINARY MORPHOLOGY
Did not belong to X
BINARY MORPHOLOGY
Erosion with other structuring elements
BINARY MORPHOLOGY
Common structuring elements shapes= origin
x
y
Note :
circledisk
segments 1 pixel wide
points
BINARY MORPHOLOGY
Problem :
BINARY MORPHOLOGY
Problem :
BINARY MORPHOLOGY
d/2
d
<d/2
BINARY MORPHOLOGY
Implementation : very low computational cost
0
1 (or >0)
Logical or
0
1
BINARY MORPHOLOGY
Implementation : very low computational cost
Logical and
Opening :
BINARY MORPHOLOGY
Supresses :• small islands• ithsmus (narrow unions)• narrow caps
difference
also
Opening with other structuring elements
BINARY MORPHOLOGY
Closing :
BINARY MORPHOLOGY
Supresses :• small lakes (holes)• channels (narrow separations)• narrow bays
also
BINARY MORPHOLOGY
Closing with other structuring elements
BINARY MORPHOLOGY
Application : shape smoothing and noise filtering
BINARY MORPHOLOGY
Application : segmentation of microstructures (Matlab Help)
original
negated
threshold
disk radius 6
closing
opening
and withthreshold
BINARY MORPHOLOGY
Properties
• all of them are increasing :
• opening and closing are idempotent :
• dilation and closing are extensive erosion and opening are anti-extensive :
BINARY MORPHOLOGY
BINARY MORPHOLOGY
• duality of erosion-dilation, opening-closing,...
• structuring elements decomposition
BINARY MORPHOLOGY
operations with big structuring elements can be doneby a succession of operations with small s.e’s
Hit-or-miss :
BINARY MORPHOLOGY
“Hit” part(white)
“Miss” part(black)
Bi-phase structuring element
Looks for pixel configurations :
BINARY MORPHOLOGY
doesn’t matter
background
foreground
BINARY MORPHOLOGY
isolated points at4 connectivity
Thinning :
BINARY MORPHOLOGY
Thickenning :
Depending on the structuring elements (actually, seriesof them), very different results can be achieved :
• Prunning• Skeletons• Zone of influence• Convex hull• ...
Prunning at 4 connectivity : remove end points by a sequence of thinnings
BINARY MORPHOLOGY
1 iteration =
BINARY MORPHOLOGY
1st iteration
2nd iteration 3rd iteration: idempotence
BINARY MORPHOLOGY
doesn’t matter
background
foreground
What does the following sequence ?
BINARY MORPHOLOGY
1. Erosion and dilation
2. Common structuring elements
3. Opening, closing
4. Properties
5. Hit-or-miss
6. Thinning, thickenning
7. Other useful transforms :
i. Contour
ii. Convex-hull
iii. Skeleton
iv. Geodesic influence zones
i. Contours of binary regions :
BINARY MORPHOLOGY
BINARY MORPHOLOGY
4-connectivity
8-connectivitycontour
8-connectivity
4-connectivitycontour
Important for perimeter computation.
ii. Convex hull : union of thickenings, each up to idempotence
BINARY MORPHOLOGY
BINARY MORPHOLOGY
iii. Skeleton :
BINARY MORPHOLOGY
Maximal disk : disk centered at x, Dx, such that Dx X and no other Dy contains it .
Skeleton : union of centers of maximal disks.
BINARY MORPHOLOGY
Problems :
• Instability : infinitessimal variations in the border of X cause large deviations of the skeleton
• not necessarily connex even though X connex
• good approximations provided by thinning with special series of structuring elements
BINARY MORPHOLOGY
1stiteration
BINARY MORPHOLOGY
result of1st iteration
2nd iteration reachesidempotence
BINARY MORPHOLOGY
20 iterationsthinning
40 iterationsthickening
BINARY MORPHOLOGY
Application : skeletonization for OCR by graph matching
Application : skeletonization for OCR by graph matching
BINARY MORPHOLOGY
and 3 rotations
Hit-or-Miss
iv. Geodesic zones of influence :
BINARY MORPHOLOGY
X set of n connex components {Xi}, i=1..n .The zone of influence of Xi , Z(Xi) , is the set ofpoints closer to some point of Xi than to a point ofany other component. Also, Voronoi partition.Dual to skeleton.
BINARY MORPHOLOGY
thr erosion7x7
GZI opening5x5
and
BINARY MORPHOLOGY
BINARY MORPHOLOGY
BINARY MORPHOLOGY
BINARY MORPHOLOGY
BINARY MORPHOLOGY
BINARY MORPHOLOGY
thr erosion7x7
dist