Beruflich Dokumente
Kultur Dokumente
Contents
Once segmentation is complete,
morphological operations can be used to
Morphological Image Processing remove imperfections in the segmented
image and provide information on the form
and structure of the image
In this lecture we will consider
– What is morphology?
– Simple morphological operations
– Compound operations
– Morphological algorithms
that images are made up of 0s for • The language of Mathematical Morphology is set theory.
background pixels and 1s for object pixels • Sets in Mathematical Morphology represents objects in an image.
After this it doesn’t matter if 0 is black, white, • Motive is to extract useful features from shape
yellow, green…….
1
6/6/2020
• We do Morphology for shape analysis & shape Morphological operations are typically applied
study. to remove imperfections introduced during
• Shape analysis became easy in case of binary segmentation, and so typically operate on bi-
images. level images
• Pixel Locations describe the shape.
2
6/6/2020
• Union
• Intersection
• Difference
• Complement
• Reflection
•Translation
TRANSLATION REFLECTION
FIGURE 9.1
3
6/6/2020
Set Operations
LOGICAL OPERATIONS
4
6/6/2020
Dilation
Dilation
Dilation of image f by structuring element s is
Dilation expands the connected sets of 1s of a binary image.
given by f s
It can be used for
The structuring element s is positioned with
its origin at (x, y) and the new pixel value is
1. growing regions
determined using the rule:
2. filling holes and gaps
1 if s hits f
g ( x, y)
0 otherwise
19
5
6/6/2020
How It Works?
A structuring element is a shape mask used in
the basic morphological operations. • It is similar to convolution process, that is
They can be any shape and size that is
structuring element is reflected and shifted
digitally representable, and each has an origin. from left to right and from top to bottom, at
each shift; the process will look for any
overlapping similar pixels between the SE and
that of Binary Image.
• If there exists an overlapping then the pixels
box under the centre position of the structuring
hexagon disk
something
element will be turned to 1or black
box(length,width) disk(diameter)
21
Structuring Element
6
6/6/2020
Images taken from Gonzalez & Woods, Digital Image Processing (2002)
Original image Dilation by 3*3 Dilation by 5*5
square structuring square structuring
element element
7
6/6/2020
Erosion Erosion
How It Works?
• Similar to dilation process, the erosion process will
move the SE from left to right and from top to
bottom.
• At the center position, indicated by the center of the
SE, the process will look for any whether there is a • It can be also defined as as
complete overlap with the SE or not.
• If there is no complete overlapping then the center
pixel indicated by the center of the structuring
element will be set to 0 or white
Structuring Element
Watch out: In these examples a 1 refers to a black pixel!
8
6/6/2020
After erosion
Original
with a disc of
image
radius 10
Erosion can split apart
9
6/6/2020
Original
Image
Image
After
Opening
Structuring Element
Images taken from Gonzalez & Woods, Digital Image Processing (2002)
Image
Original shape
After
After dilation After erosion
(closing) Closing
10
6/6/2020
Images taken from Gonzalez & Woods, Digital Image Processing (2002)
Structuring Element
11
6/6/2020
Images taken from Gonzalez & Woods, Digital Image Processing (2002)
boundary extraction using a square 3*3 filling attempts to fill that boundary with
structuring element object pixels (1s)
Images taken from Gonzalez & Woods, Digital Image Processing (2002)
X k ( X k 1 B) Ac k 1,2,3.....
Where X0 is simply the starting point inside
the boundary, B is a simple structuring
element and Ac is the complement of A
This equation is applied repeatedly until Xk
is equal to Xk-1
Finally the result is unioned with the original
boundary
12
6/6/2020
13
6/6/2020
Morphological Operations
Morphological Operations
Thank You
14