A. Introduction To Morphological Operators
A. Introduction To Morphological Operators
Morphological
Operators
Feb 26, 2017 1
About this lecture
In this lecture we introduce INFORMALLY
the most important operations based on
morphology, just to give you the intuitive
feeling.
In next lectures we will introduce more
formalism and more examples.
02/26/17 2
EROSION
02/26/17 3
What We Do Today. 2nd Part
Introduction to Morphological Operators
Used generally on binary images, e.g., background
subtraction results!
Used on gray value images, if viewed as a stack to
binary images.
Good for, e.g.,
Noise removal in background
Removal of holes in foreground / background
Check: www.cee.hw.ac.uk/hipr
A first Example: Erosion
Erosion is an important morphological
operation
Structuring Element 1 1 1
Output Image 0
Structuring Element 1 1 1
Output Image 0 0
Structuring Element 1 1 1
Output Image 0 0 0
Structuring Element 1 1 1
Output Image 0 0 0 0
Structuring Element 1 1 1
Output Image 0 0 0 0 1
Structuring Element 1 1 1
Output Image 0 0 0 0 1 0
Structuring Element 1 1 1
Output Image 0 0 0 0 1 0 0
Structuring Element 1 1 1
Output Image 0 0 0 0 1 0 0 0
Box
Disc
02/26/17 22
Example: Dilation
Dilation is an important morphological
operation
Structuring Element 1 1 1
Output Image 1
Structuring Element 1 1 1
Output Image 1 0
Structuring Element 1 1 1
Output Image 1 0 1
Structuring Element 1 1 1
Output Image 1 0 1 1
Structuring Element 1 1 1
Output Image 1 0 1 1 1
Structuring Element 1 1 1
Output Image 1 0 1 1 1 1
Structuring Element 1 1 1
Output Image 1 0 1 1 1 1 1
Structuring Element 1 1 1
Output Image 1 0 1 1 1 1 1 1
02/26/17 38
Opening
Similar to Erosion
Spot and noise removal
Less destructive
Erosion next dilation
the same structuring element for both operations.
Input:
Binary Image
Structuring Element, containing only 1s!
3*9
9*3
02/26/17 46
Closing
Similar to Dilation
Removal of holes
Tends to enlarge regions, shrink background
Closing is defined as a Dilatation, followed by an
Erosion using the same structuring element for both
operations.
Dilation next erosion!
Input:
Binary Image
Structuring Element, containing only 1s!
Feb 26, 2017 47
Closing
Take the structuring element (SE) and slide it
around outside each foreground region.
All background pixels which can be covered by the SE
with the SE being entirely within the background
region will be preserved.
All background pixels which can not be reached by the
structuring element without lapping over the edge of
the foreground object will be turned into a foreground.
Opening is idempotent: Repeated application has
no further effects!
thin I , K I HitAndMiss I , K
with 0-1=0!!
If foreground and background fit the structuring element
exactly, then the pixel at the origin of the SE is set to 0
thicken I , K I HitAndMiss I , K
with 1+1=1
If foreground and background match exactly the
SE, then set the pixel at its origin to 1!
Note that the value of the SE at the origin is 0 or
dont care!
Feb 26, 2017 67
Example Thickening
02/26/17 69
Problems
1. Consider the images on slide 17! Why are the images getting
darker under erosion? Explain!