EE 583 Lecture10
EE 583 Lecture10
The word morphology refers to the scientific branch that deals the forms and
structures of animals/plants.
The language of the Morphology comes from the set theory, where image
objects can be represented by sets. For example an image object containing
black pixels can be considered a set of black pixels in 2D space of Z2.
a is not an element in A: a A
given sets A and B, A is said to be the subset of B: A B
The union of A and B is denoted by: CA B
The intersection of A and B is denoted by: DA B
Two sets are disjoint/mutually exclusive if A B
The complement of set A is the set of elements not contained in A, Ac A
The difference of two sets: A B A, B A B c
Prepared By: Dr. Hasan Demirel, PhD
EE-583: Digital Image Processing
B b, for b B
The translation of set A by point z=(z1,z2) is defined by:
( A) z a z, for a A
Translation of A by z. Reflection of B
A B z ( B ) z A
^
The dilation of A and B is a set of all displacements, z , such that B and A
overlap by at least one element. The definition can also be written as:
A B z ( B ) z A A
Set B is referred to as the structuring element and used in dilation as well as in
other morphological operations. Dilation expands/dilutes a given image.
B
3x3 structuring
element
A A B
Note that the broken characters are joined.
Prepared By: Dr. Hasan Demirel, PhD
EE-583: Digital Image Processing
B z ( B) z A
defined by:
A
The erosion of A by structuring element B is the set of all points z, such that B,
translated by z, is contained in A.
structuring
element
Note that in erosion the structuring element B erodes the input image A at its boundaries.
Erosion shrinks a given image.
structuring
element
B
13x13 structuring
element
A A B
Erosion of A by B
B
13x13 structuring
element
A B (A B) B
dilation by B
Closing: The process of dilation followed by erosion is called closing. It has the effect of
filling small and thin holes, connecting nearby objects and smoothing the
boundaries/contours of the objects.
Given set A and the structuring element B. Closing of A by structuring element B is defined
by:
A B ( A B) B
A B Bz ( Bz ) A
Outer boundary of A
Origin of B
Circular structuring element Shaded area: complete opening
A B ( Bz ) ( Bz ) A
Outer boundary of A
Possible translations of B on the outer boundaries of A Prepared By: Dr. Hasan Demirel, PhD
EE-583: Digital Image Processing
result of erosion of A by B
result of opening of A by B
result of dilation of A by B
result of closing of A by B
3x3 square
structuring
element
Complement of B1
A
* B ( A B1 ) ( Ac
B2 )
B2
B1
Complement of A
Erosion of A by B1
Erosion of comp of AC by B2
Ex 1: 3x3 Square structuring element is used Ex 2: The same structuring element in Ex1 is used.
for boundary extraction.
Note that thicker boundaries can be obtained by
increasing the size of structuring element.
F ( A) X k A
Result of second iteration Result of last iteration Prepared By: Dr. Hasan Demirel, PhD
EE-583: Digital Image Processing
Input image
(Chicken fillet)
Thresholded image
15 connected
components with
different number of
pixels
After erosion by 5x5
square structuring
element of 1s
A B A (A
* B)
hit-or-miss transform/template matching
The process is to thin A by one pass with B1, then the result with one pass of B2, and
continue until A is thinned with one pass of Bn.
...