Chapter 7
Chapter 7
Processing
Translation
The translation of a set B by point z ( z1 , z2 ), denoted ( B ) Z ,
is defined as
( B) Z {c | c b z, for b B}
Example: Reflection and
Translation
Binary image
Binary image
bi-valued function of x and y
Morphological theory views
◦ binary image as a set of its foreground (1-
valued) pixels
◦ elements of Z2 1
1 1
1 1
1 1
Logic Operations Between Binary
Images
Basic Components in
Morphology
Every Operation has two elements.
1. Input Image
2. Structuring element
The results of the operation mainly depends upon
the structuring element chosen.
Origin is not a
member of the
structuring element
origin
Fundamental Operations
Fundamentally morphological image
processing is very like spatial filtering
The structuring element is moved across every
pixel in the original image to give a pixel in a
new processed image
The value of this new pixel depends on the
operation performed
There are two basic morphological operations:
dilation and erosion.
Dilation
Dilation is an operation that grows or thickens
objects in a binary image.
The specific manner of this thickening is
controlled by a shape referred to as a
structuring element.
The structuring element is translated
throughout the domain of the image to see
where it overlaps with 1-valued pixels. The
output image is 1 at each location of the origin
s.t. the structuring element overlaps at least
one 1-valued pixel in the input image.
Dilation …
With A and B as sets in Z 2 , the dilation of A by B,
denoted A B, is defined as
ˆ
A B= z | B
z
A
Structuring Element
Dilation Example
Original Image Processed Image With Dilated Pixels
Structuring Element
Dilation: Example
Dilation process
Dilation: Example …
A A B
Examples of Dilation
(1)
Dilation: By A Rectangular Structuring
Element
A A B
Examples of Dilation
(2)
Dilation: By A Structuring Element
Whose Reflection Is Not Itself
B̂ A A B
Examples of Dilation
(3)
Examples of Dilation
Examples of Dilation
Moving object
detection using
background
subtraction in
complex wavelet
domain a) current
frame b) computed
reference frame c)
background
subtraction without
morphological
processing d) results
after morphological
processing
Dilation: Another Definition
Dilation combines two sets using vector
addition
(a, b) + (c, d) = (a+c, b+d)
Image B
Structuring
Image A
Properties of Dilation
Dilation is commutative
Dilation is associative
A B z | ( B) Z Ac
Structuring Element
Erosion Example
Original Image Processed Image
Structuring Element
Erosion: Example
Erosion process
Erosion: Example …
A
AB
Example of Erosion
(1)
Erosion: By A Rectangular Structuring
Element
A
AB
Example of Erosion
(2)
Erosion: By A Structuring Element
Whose Reflection Is Not Itself
B̂ A
A B
After
Original
erosion with
image
a disc of
radius 10
After After
erosion with erosion with
a disc of a disc of
radius 5 radius 20
What Is Erosion For?
Erosion can split apart joined objects
Image B
Image A Structuring
element
Problems
1 1 1 1
1
B
1 1 1
1
1 1
1
A B
Dilation & Erosion are duals of each other
wrt set complementation & reflection
Proof:
Thus,
Remember???
Combining Dilation and
Erosion
Dilation & Erosion are not
inverse transformations
Opening
Generally smoothes the contours of an object
Breaks narrow isthmuses
Eliminates thin protrusions
It is less destructive than the Erosion
Opening Example …
Original
Image
Image
After
Opening
Opening Example
Original Image Processed Image
Structuring Element
Opening Example
Original Image Processed Image
Structuring Element
Opening Example …
Closing
Also tends to smooth sections of the contours
Generally fuses narrow breaks & long thin gulfs
Eliminates small holes & fills gaps in the contour
Closing Example
Original
Image
Image
After
Closing
Closing Example
Original Image Processed Image
Structuring Element
Closing Example
Original Image Processed Image
Structuring Element
Closing Example …