Digital Image Processing (Chapter 9)
Digital Image Processing (Chapter 9)
• Translations
origin
Structuring Elements
• The background border is made large enough accommodate the to
entire structuring element when its origin is on the border of the
original set (Padding)
• SE is of size 3×3 with the origin in the center, so as a one-element
border that encompasses the entire set is sufficient
Erosion
• With A and B as sets in Z2 , the erosion of A by B is
defined as
A B z | (B) Z A
• Erosion of A by B is the set of all points z such that B,
translated by z, is contained in A.
A B z | (B) Z Ac
A Bc
Ac
Bµ
Opening and Closing
• Opening of set A by SE B is defined
Aͦ B A B B
• Thus, opening A by B is the erosion of A by B,
followed by a dilation of the result by B
• Closing of set A by SE B is defined
A·B A B B
• Closing of set A by B is simply the dilation of A
by B, followed by the erosion of the result by B
Opening and Closing
• Opening smoothens the contour of an object, breaks
narrow isthmuses, and eliminates thin protrusions
• Closing also tends to smooth sections of contours
but, as opposed to opening, it generally fuses
narrow breaks and long thin gulfs, eliminates small
holes, and fills gaps in the contour
Examples: Opening
AgB A B B
Examples: Closing
AgB A B B
Duality
• Opening and closing are duals of each other with
respect to set complementation and reflections
A·B c
( A ͦ Bµ)
c
A ͦ B c
(A ·Bµ)
c
Opening and Closing
• Opening Properties:
– A ͦ B is a subset of A
– If C is a subset of D, then C ͦ B is a subset of D ͦ B
– (A ͦ B) ͦ B = A ͦ B
• Closing properties:
– A is a subset of A·B
– If C is a subset of D, then C·B is a subset of D·B
– (A·B)·B = A·B
Opening and Closing