mathematical morphology - iit bombayavikb/gnr401/dip/dip_401_lecture_5.pdf · mathematical...
TRANSCRIPT
Introduction
Mathematical morphology (MM) is the study of image processing methods based on the shape or form of objects
MM provides the ability to probe images using likely shapes of objects expected in
the image manipulate images using these probes
An approach for processing digital image based on its shape
A mathematical tool for investigating geometric structurein image
The language of morphology is set theory
2
NR401 Dr. A. Bhattacharya
Goal of morphological operations
Simplify image data, preserve essential shape characteristics and eliminate noise
Permits the underlying shape to be identified and optimally reconstructed from their distorted, noisy forms
3
NR401 Dr. A. Bhattacharya
Shape Processing and Analysis
Identification of objects, object features and assembly defects correlate directly with shape
Shape is a prime carrier of information in machine vision
4
NR401 Dr. A. Bhattacharya
Binary Mathematical Morphology
NR401 Dr. A. Bhattacharya
5
USED FOR :
Image pre-processing noise filtering, shape smoothing, ...
Extraction of object structure skeleton, convex hull...
Quantitative object description Object area, perimeter, ...
Presence or absence of objects Hit/Miss transform
Mathematical Tools for Binary Morphology
NR401 Dr. A. Bhattacharya
6
Based on set theoretic operations
Union
Intersection
Complement
Negation
Translation etc.
Set theoretic Principles
NR401 Dr. A. Bhattacharya
7
If a=(x,y) is an element in A: aA
If a=(x,y) is not an element in A: aA
Subset:every element in A is also in B (subset): AB
Let A be a set in Z2
Structuring element (SE)
NR401 Dr. A. Bhattacharya
9
Small set to probe the image under study for each SE, define origin
Shape and size must be adapted to geometric properties for the objects
Morphological Operations
NR401 Dr. A. Bhattacharya
10
The primary morphological operations are dilation and erosion
More complicated morphological operators can be designed by means of combining erosions and dilations
Dilation
NR401 Dr. A. Bhattacharya
11
Dilation is the operation that combines two sets using vector addition of set elements.
Let A and B are subsets in 2-D space. A: image undergoing analysis, B: Structuring element, denotes dilation
},{ 2 BbAasomeforbacZcBA
Dilation
NR401 Dr. A. Bhattacharya
13
Let A be a Subset of and . The translation of A by x is defined as
The dilation of A by B can be computed as the union of translation of A by the elements of B
2Z 2Zx
},{)( 2 AasomeforxacZcA x
Aa
aBb
b BABA
)()(
Dilation
NR401 Dr. A. Bhattacharya
16
SE=
Used with permission of Dr. Lucia Ballerini
Properties of Dilation
NR401 Dr. A. Bhattacharya
18
Commutative
Associative
Extensivity
Dilation is increasing
BAABif ,0
DBDAimpliesBA
ABBA
CBACBA )()(
Properties of Dilation
NR401 Dr. A. Bhattacharya
19
Translation Invariance
Linearity
Containment
Decomposition of structuring element
xx BABA )()(
)()()( CBCACBA
)()()( CBCACBA
)()()( CABACBA
Erosion
NR401 Dr. A. Bhattacharya
20
Erosion is the morphological dual to dilation. It combines two sets using the vector subtraction of set elements.
Let denotes the erosion of A by BBA
){
}..,{2
2
BbeveryforAbxZx
baxtsAaanexistBbeveryforZxBA
Erosion
NR401 Dr. A. Bhattacharya
22
Erosion can also be defined in terms of translation
In terms of intersection
))({ 2 ABZxBA x
Bb
bABA
)(
Properties of Erosion
NR401 Dr. A. Bhattacharya
26
Erosion is not commutative!
Extensivity
Dilation is increasing
Chain rule
ABBA
ABABif ,0
)...)(...()...( 11 kk BBABBA
CABAimpliesCBBCBAimpliesCA ,
Properties of Erosion
NR401 Dr. A. Bhattacharya
27
Translation Invariance
Linearity
Containment
Decomposition of structuring element
)()()( CBCACBA
)()()( CBCACBA
)()()( CABACBA
xxxx BABABABA )(,)(
Duality Relationship
NR401 Dr. A. Bhattacharya
28
Dilation and Erosion transformation bear a marked similarity, in that what one does to image foreground and the other does for the image background.
, the reflection of B, is defined as
Erosion and Dilation Duality Theorem
2ZB B
},{ bxBbsomeforxB
BABA cc )(
Duality Relationship
NR401 Dr. A. Bhattacharya
29
Erosion and dilation are dual with respect to complementation and reflection
Erosion and dilation are not duals with respect to each other!
(A ⊝ B)c = Ac ⊕ B
Duality
NR401 Dr. A. Bhattacharya
30
Opening and Closing are dual with respect to complementation and reflection
BABA CC ˆImportant: If origin is included in the structuring element B,
A⊝B ⊆ A ○ B ⊆ A ⊆ A ● B ⊆ A ⊕ B
Opening and Closing
NR401 Dr. A. Bhattacharya
31
Opening and closing are iteratively applied dilation and erosion
• Opening•eliminates protrusions• breaks thin joints• smoothes contour
• Closing• smooth contour• fuse narrow breaks and long thin gulfs• eliminate small holes• fill gaps in the contour
BBABA )(
BBABA )(
Closing
NR401 Dr. A. Bhattacharya
32
Closing by 3x3 Box SE
AΘB A BCopyright Dr. Lucia Ballerini [email protected]
Closing
NR401 Dr. A. Bhattacharya
33
Closing by 3x3 Plus SE
A A⊕B A BCopyright Dr. Lucia Ballerini [email protected]
Physical Meaning of Closing
NR401 Dr. A. Bhattacharya
34
See B as a ”rolling ball”
Boundary of AB = points in B that reach farthestinto A when B is rolled outside A
Opening and Closing
NR401 Dr. A. Bhattacharya
37
They are idempotent. Their reapplication has not further effects to the previously transformed result
BBABA )(
BBABA )(
Opening and Closing
NR401 Dr. A. Bhattacharya
38
Translation invariance
Anti-extensivity of opening
Extensivity of closing
Duality
BABA x )( BABA x )(
ABA
BAA
BABA cc )(
Opening
NR401 Dr. A. Bhattacharya
39
Opening by Box SE 3x3 A⊖B A∘B
Copyright Dr. Lucia Ballerini [email protected]
Opening
NR401 Dr. A. Bhattacharya
40
Opening by Plus SE 3x3A⊖B A∘BCopyright Dr. Lucia Ballerini [email protected]
Physical Meaning of Opening
NR401 Dr. A. Bhattacharya
41
Treat the structuring element as a rolling ball
Boundary of A∘B = points in B that reach farthestinto A when B is rolled inside A