SlideShare a Scribd company logo
Lecture 5. Morphological Image
Processing
4/30/2021 2
Introduction
► Morphology: a branch of biology that deals with the form
and structure of animals and plants
► Morphological image processing is used to extract image
components for representation and description of region
shape, such as boundaries, skeletons, and the convex hull
4/30/2021 3
Preliminaries (1)
► Reflection
► Translation
The reflection of a set , denoted , is defined as
{ | ,for }
B B
B w w b b B
   
1 2
The translation of a set by point ( , ), denoted ( ) ,
is defined as
( ) { | ,for }
Z
Z
B z z z B
B c c b z b B

   
4/30/2021 4
Example: Reflection and Translation
4/30/2021 5
Preliminaries (2)
► Structure elements (SE)
Small sets or sub-images used to probe an image under study for
properties of interest
4/30/2021 6
Examples: Structuring Elements (1)
origin
4/30/2021 7
Examples: Structuring Elements (2)
Accommodate the
entire structuring
elements when its
origin is on the
border of the
original set A
Origin of B visits
every element of A
At each location of
the origin of B, if B
is completely
contained in A,
then the location is
a member of the
new set, otherwise
it is not a member
of the new set.
4/30/2021 8
Erosion
 
2
With and as sets in , the erosion of by , denoted ,
defined
| ( )Z
A B Z A B A B
A B z B A
 
The set of all points such that , translated by , is contained by .
z B z A
 
| ( ) c
Z
A B z B A
   
4/30/2021 9
Example
of
Erosion
(1)
4/30/2021 10
Example
of
Erosion
(2)
4/30/2021 11
Dilation
 
 
2
With and as sets in , the dilation of by ,
denoted , is defined as
A B= |
z
A B Z A B
A B
z B A

   
The set of all displacements , the translated and
overlap by at least one element.
z B A
 
 
|
z
A B z B A A
 
   
 
 
4/30/2021 12
Examples of Dilation (1)
4/30/2021 13
Examples of Dilation (2)
4/30/2021 14
Duality
► Erosion and dilation are duals of each other with respect to
set complementation and reflection
 
 
c c
c c
A B A B
and
A B A B
  
  
4/30/2021 15
Duality
► Erosion and dilation are duals of each other with respect to
set complementation and reflection
   
 
 
 
 
 
|
|
|
c
c
Z
c
c
Z
c
Z
c
A B z B A
z B A
z B A
A B
  
   
   
 
4/30/2021 16
Duality
► Erosion and dilation are duals of each other with respect to
set complementation and reflection
   
 
 
 
|
|
c
c
Z
c
Z
c
A B z B A
z B A
A B
    
   
 
4/30/2021 17
Opening and Closing
► Opening generally smoothes the contour of an object,
breaks narrow isthmuses, and eliminates thin protrusions
► Closing tends to smooth sections of contours but it
generates fuses narrow breaks and long thin gulfs,
eliminates small holes, and fills gaps in the contour
4/30/2021 18
Opening and Closing
 
The opening of set by structuring element ,
denoted , is defined as
A B
A B
A B A B B
  
 
The closing of set by structuring element ,
denoted , is defined as
A B
A B
A B A B B
  
4/30/2021 19
Opening
   
 
The opening of set by structuring element ,
denoted , is defined as
|
Z Z
A B
A B
A B B B A
 
4/30/2021 20
Example: Opening
4/30/2021 21
Example: Closing
4/30/2021 22
4/30/2021 23
Duality of Opening and Closing
► Opening and closing are duals of each other with respect
to set complementation and reflection
  ( )
c c
A B A B

  ( )
c c
A B A B

4/30/2021 24
The Properties of Opening and Closing
► Properties of Opening
► Properties of Closing
(a) is a subset (subimage) of
(b) if is a subset of , then is a subset of
(c) ( )
A B A
C D C B D B
A B B A B

(a) is subset (subimage) of
(b) If is a subset of , then is a subset of
(c) ( )
A A B
C D C B D B
A B B A B

4/30/2021 25
4/30/2021 26
The Hit-or-Miss
Transformation
   
if denotes the set composed of
and its background,the match
(or set of matches) of in ,
denoted ,
* c
B
D
B A
A B
A B A D A W D

 
    
 
 
 
1 2
1
2
1 2
,
:object
: background
( )
c
B B B
B
B
A B A B A B

    
4/30/2021 27
Some Basic Morphological Algorithms (1)
► Boundary Extraction
The boundary of a set A, can be obtained by first eroding A
by B and then performing the set difference between A
and its erosion.
 
( )
A A A B
   
4/30/2021 28
Example 1
4/30/2021 29
Example 2
4/30/2021 30
Some Basic Morphological Algorithms (2)
► Hole Filling
A hole may be defined as a background region surrounded
by a connected border of foreground pixels.
Let A denote a set whose elements are 8-connected
boundaries, each boundary enclosing a background region
(i.e., a hole). Given a point in each hole, the objective is to
fill all the holes with 1s.
4/30/2021 31
Some Basic Morphological Algorithms (2)
► Hole Filling
1. Forming an array X0 of 0s (the same size as the array
containing A), except the locations in X0 corresponding to
the given point in each hole, which we set to 1.
2. Xk = (Xk-1 + B) Ac k=1,2,3,…
Stop the iteration if Xk = Xk-1

4/30/2021 32
Example
4/30/2021 33
4/30/2021 34
Some Basic Morphological Algorithms (3)
► Extraction of Connected Components
Central to many automated image analysis applications.
Let A be a set containing one or more connected
components, and form an array X0 (of the same size as the
array containing A) whose elements are 0s, except at each
location known to correspond to a point in each connected
component in A, which is set to 1.
4/30/2021 35
Some Basic Morphological Algorithms (3)
► Extraction of Connected Components
Central to many automated image analysis applications.
1
-1
( )
:structuring element
until
k k
k k
X X B A
B
X X

  

4/30/2021 36
4/30/2021 37
4/30/2021 38
Some Basic Morphological Algorithms (4)
► Convex Hull
A set A is said to be convex if the straight line segment
joining any two points in A lies entirely within A.
The convex hull H or of an arbitrary set S is the smallest
convex set containing S.
4/30/2021 39
Some Basic Morphological Algorithms (4)
► Convex Hull
1
Let , 1, 2, 3, 4, represent the four structuring elements.
The procedure consists of implementing the equation:
( * )
1,2,3,4 and 1,
i
i i
k k
B i
X X B A
i k


 
 
0
1
4
1
2,3,...
with .
When the procedure converges, or ,let ,
the convex hull of A is
( )
i
i i i i
k k k
i
i
X A
X X D X
C A D



 
 
4/30/2021 40
4/30/2021 41
4/30/2021 42
Some Basic Morphological Algorithms (5)
► Thinning
The thinning of a set A by a structuring element B, defined
( * )
( * )c
A B A A B
A A B
  
 
4/30/2021 43
Some Basic Morphological Algorithms (5)
► A more useful expression for thinning A symmetrically is
based on a sequence of structuring elements:
   
1 2 3
-1
, , ,...,
where is a rotated version of
n
i i
B B B B B
B B

1 2
The thinning of by a sequence of structuring element { }
{ } ((...(( ) )...) )
n
A B
A B A B B B
    
4/30/2021 44
4/30/2021 45
Some Basic Morphological Algorithms (6)
► Thickening:
 
The thickening is defined by the expression
*
A B A A B
 
1 2
The thickening of by a sequence of structuring element { }
{ } ((...(( ) )...) )
n
A B
A B A B B B

In practice, the usual procedure is to thin the background of the set
and then complement the result.
4/30/2021 46
Some Basic Morphological Algorithms (6)
4/30/2021 47
Some Basic Morphological Algorithms (7)
► Skeletons
A skeleton, ( ) of a set has the following properties
a. if is a point of ( ) and ( ) is the largest disk
centered at and contained in , one cannot find a
larger disk containing ( )
z
z
S A A
z S A D
z A
D and included in .
The disk ( ) is called a maximum disk.
b. The disk ( ) touches the boundary of at two or
more different places.
z
z
A
D
D A
4/30/2021 48
Some Basic Morphological Algorithms (7)
4/30/2021 49
Some Basic Morphological Algorithms (7)
0
The skeleton of A can be expressed in terms of
erosion and openings.
( ) ( )
with max{ | };
( ) ( ) ( )
where is a structuring element, and
K
k
k
k
S A S A
K k A kB
S A A kB A kB B
B


 
  
   
( ) ((..(( ) ) ...) )
successive erosions of A.
A kB A B B B
k
     
4/30/2021 50
4/30/2021 51
4/30/2021 52
Some Basic Morphological Algorithms (7)
0
A can be reconstructed from the subsets by using
( ( ) )
where ( ) denotes successive dilations of A.
( ( ) ) ((...(( ( ) ) )... )
K
k
k
k
k k
A S A kB
S A kB k
S A kB S A B B B

  

    
4/30/2021 53
4/30/2021 54
Some Basic Morphological Algorithms (8)
► Pruning
a. Thinning and skeletonizing tend to leave parasitic components
b. Pruning methods are essential complement to thinning and
skeletonizing procedures
4/30/2021 55
Pruning:
Example
1 { }
X A B
 
4/30/2021 56
Pruning:
Example
 
8
2 1
1
* k
k
X X B

 
4/30/2021 57
Pruning:
Example
 
3 2
:3 3 structuring element
X X H A
H
  

4/30/2021 58
Pruning:
Example
4 1 3
X X X
 
4/30/2021 59
Pruning:
Example
4/30/2021 60
Some Basic Morphological Algorithms (9)
► Morphological Reconstruction
It involves two images and a structuring element
a. One image contains the starting points for the
transformation (The image is called marker)
b. Another image (mask) constrains the transformation
c. The structuring element is used to define connectivity
4/30/2021 61
Morphological Reconstruction: Geodesic
Dilation
 
(1)
(1)
Let denote the marker image and the mask image,
. The geodesic dilation of size 1 of the marker image
with respect to the mask, denoted by ( ), is defined as
( ) G
G
G
F G
F G
D F
D F F B

  
( )
( ) (1) ( 1)
(0)
The geodesic dilation of size of the marker image
with respect to , denoted by ( ), is defined as
( ) ( ) ( )
with ( ) .
n
G
n n
G G G
G
n F
G D F
D F D F D F
D F F

 
  

4/30/2021 62
4/30/2021 63
Morphological Reconstruction: Geodesic
Erosion
 
(1)
(1)
Let denote the marker image and the mask image.
The geodesic erosion of size 1 of the marker image with
respect to the mask, denoted by ( ), is defined as
( ) G
G
G
F G
E F
E F F B
  
( )
( ) (1) ( 1)
(0)
The geodesic erosion of size of the marker image
with respect to , denoted by ( ), is defined as
( ) ( ) ( )
with ( ) .
n
G
n n
G G G
G
n F
G E F
E F E F E F
E F F

 
  

4/30/2021 64
4/30/2021 65
Morphological Reconstruction by Dilation
Morphological reconstruction by dialtion of a mask image
from a marker image , denoted ( ), is defined as
the geodesic dilation of with respect to , iterated until
stability is achieved; that
D
G
G F R F
F G
( )
( ) ( 1)
is,
( ) ( )
with such that ( ) ( ).
D k
G G
k k
G G
R F D F
k D F D F



4/30/2021 66
4/30/2021 67
Morphological Reconstruction by Erosion
Morphological reconstruction by erosion of a mask image
from a marker image , denoted ( ), is defined as
the geodesic erosion of with respect to , iterated until
stability is achieved; that i
E
G
G F R F
F G
( )
( ) ( 1)
s,
( ) ( )
with such that ( ) ( ).
E k
G G
k k
G G
R F E F
k E F E F



4/30/2021 68
Opening by Reconstruction
 
 
( )
The opening by reconstruction of size of an image is
defined as the reconstruction by dilation of from the
erosion of size of ; that is
( )
where
n D
R F
n F
F
n F
O F R F nB
F nB
 
 
 
 indicates erosions of by .
n F B
4/30/2021 69
4/30/2021 70
Filling Holes
Let ( , ) denote a binary image and suppose that we
form a marker image that is 0 everywhere, except at
the image border, where it is set to 1- ; that is
1 ( , ) if ( , ) is on the bor
( , )
I x y
F
I
I x y x y
F x y


der of
0 otherwise
then
( )
c
c
D
I
I
H R F



 
  
4/30/2021 71
SE:3 3 1s.

4/30/2021 72
( )
c
c
D
I
H R F
 
  
4/30/2021 73
Border Clearing
It can be used to screen images so that only complete objects
remain for further processing; it can be used as a singal that
partial objects are present in the field of view.
The original image is used as the mask and the following
marker image:
( , ) if ( , ) is on the border of
( , )
0 otherwise
I x y x y I
F x y
X I R

 

  ( )
D
I F
4/30/2021 74
4/30/2021 75
Summary (1)
4/30/2021 76
Summary (2)
4/30/2021 77
4/30/2021 78
4/30/2021 79
Gray-Scale Morphology
( , ) : gray-scale image
( , ): structuring element
f x y
b x y
4/30/2021 80
Gray-Scale Morphology: Erosion and Dilation
by Flat Structuring
   
   
( , )
( , )
( , ) min ( , )
( , ) max ( , )
s t b
s t b
f b x y f x s y t
f b x y f x s y t


   
   
4/30/2021 81
4/30/2021 82
Gray-Scale Morphology: Erosion and Dilation
by Nonflat Structuring
   
   
( , )
( , )
( , ) min ( , ) ( , )
( , ) max ( , ) ( , )
N N
s t b
N N
s t b
f b x y f x s y t b s t
f b x y f x s y t b s t


    
    
4/30/2021 83
Duality: Erosion and Dilation
 
 
( , ) ( , )
where ( , ) and ( , )
c c
c
c c
f b x y f b x y
f f x y b b x y
f b f b



 
  
 
 
    
 
  
 
 
  ( )
c c
f b f b

  
4/30/2021 84
Opening and Closing
 
 
f b f b b
f b f b b
  
   
 
 
c c
c c
f b f b f b
f b f b f b
 
 
  
  
4/30/2021 85
4/30/2021 86
Properties of Gray-scale Opening
   
 
1 2 1 2
( )
( ) if , then
( )
where denotes is a subset of and also
( , ) ( , ).
a f b f
b f f f b f b
c f b b f b
e r e r
e x y r x y

 



4/30/2021 87
Properties of Gray-scale Closing
   
 
1 2 1 2
( )
( ) if , then
( )
a f f b
b f f f b f b
c f b b f b

 

4/30/2021 88
4/30/2021 89
Morphological Smoothing
► Opening suppresses bright details smaller than the
specified SE, and closing suppresses dark details.
► Opening and closing are used often in combination as
morphological filters for image smoothing and noise
removal.
4/30/2021 90
Morphological Smoothing
4/30/2021 91
Morphological Gradient
► Dilation and erosion can be used in combination with
image subtraction to obtain the morphological gradient of
an image, denoted by g,
► The edges are enhanced and the contribution of the
homogeneous areas are suppressed, thus producing a
“derivative-like” (gradient) effect.
( ) ( )
g f b f b
   
4/30/2021 92
Morphological Gradient
4/30/2021 93
Top-hat and Bottom-hat Transformations
► The top-hat transformation of a grayscale image f is
defined as f minus its opening:
► The bottom-hat transformation of a grayscale image f is
defined as its closing minus f:
( ) ( )
hat
T f f f b
 
( ) ( )
hat
B f f b f
  
4/30/2021 94
Top-hat and Bottom-hat Transformations
► One of the principal applications of these transformations
is in removing objects from an image by using structuring
element in the opening or closing operation
4/30/2021 95
Example of Using Top-hat Transformation in
Segmentation
4/30/2021 96
Granulometry
► Granulometry deals with determining the size of
distribution of particles in an image
► Opening operations of a particular size should have the
most effect on regions of the input image that contain
particles of similar size
► For each opening, the sum (surface area) of the pixel
values in the opening is computed
4/30/2021 97
Example
4/30/2021 98
4/30/2021 99
Textual Segmentation
► Segmentation: the process of subdividing an image into
regions.
4/30/2021 100
Textual Segmentation
4/30/2021 101
Gray-Scale Morphological Reconstruction (1)
► Let f and g denote the marker and mask image with the
same size, respectively and f ≤ g.
The geodesic dilation of size 1 of f with respect to g is
defined as
The geodesic dilation of size n of f with respect to g is
defined as
 
(1)
( )
where denotes the point-wise minimum operator.
g
D f f g g
  

( ) (1) ( 1) (0)
( ) ( ) with ( )
n n
g g g g
D f D D f D f f

 
 
 
4/30/2021 102
Gray-Scale Morphological Reconstruction (2)
► The geodesic erosion of size 1 of f with respect to g is
defined as
The geodesic erosion of size n of f with respect to g is
defined as
 
(1)
( )
where denotes the point-wise maximum operator.
g
E f f g g
  

( ) (1) ( 1) (0)
( ) ( ) with ( )
n n
g g g g
E f E E f E f f

 
 
 
4/30/2021 103
Gray-Scale Morphological Reconstruction (3)
► The morphological reconstruction by dilation of a gray-
scale mask image g by a gray-scale marker image f, is
defined as the geodesic dilation of f with respect to g,
iterated until stability is reached, that is,
The morphological reconstruction by erosion of g by f is
defined as
 
   
( )
( ) ( 1)
( )
with k such that
D k
g g
k k
g g
R f D f
D f D f



 
   
( )
( ) ( 1)
( )
with k such that
E k
g g
k k
g g
R f E f
E f E f



4/30/2021 104
Gray-Scale Morphological Reconstruction (4)
► The opening by reconstruction of size n of an image f is
defined as the reconstruction by dilation of f from the
erosion of size n of f; that is,
The closing by reconstruction of size n of an image f is
defined as the reconstruction by erosion of f from the
dilation of size n of f; that is,
 
( )
( )
n D
R f
O f R f nb
 
 
( )
( )
n E
R f
C f R f nb
 
4/30/2021 105
4/30/2021 106
Steps in the Example
1. Opening by reconstruction of the original image using a horizontal
line of size 1x71 pixels in the erosion operation
2. Subtract the opening by reconstruction from original image
3. Opening by reconstruction of the f’ using a vertical line of size 11x1
pixels
4. Dilate f1 with a line SE of size 1x21, get f2.
 
( )
( )
n D
R f
O f R f nb
 
( )
' ( )
n
R
f f O f
 
 
( )
1 ( ') ' '
n D
R f
f O f R f nb
  
4/30/2021 107
Steps in the Example
5. Calculate the minimum between the dilated image f2
and and f’, get f3.
6. By using f3 as a marker and the dilated image f2 as
the mask,
 
   
( )
2 2
( ) ( 1)
2 2
( 3) 3
with k such that 3 3
D k
f f
k k
f f
R f D f
D f D f




More Related Content

What's hot

Bit plane coding
Bit plane codingBit plane coding
Bit plane coding
priyadharshini murugan
 
Unit3 dip
Unit3 dipUnit3 dip
Unit3 dip
Imran Khan
 
Sharpening spatial filters
Sharpening spatial filtersSharpening spatial filters
Smoothing Filters in Spatial Domain
Smoothing Filters in Spatial DomainSmoothing Filters in Spatial Domain
Smoothing Filters in Spatial Domain
Madhu Bala
 
Digital Image Processing
Digital Image ProcessingDigital Image Processing
Digital Image Processing
lalithambiga kamaraj
 
Image Smoothing using Frequency Domain Filters
Image Smoothing using Frequency Domain FiltersImage Smoothing using Frequency Domain Filters
Image Smoothing using Frequency Domain Filters
Suhaila Afzana
 
Chapter 9 morphological image processing
Chapter 9   morphological image processingChapter 9   morphological image processing
Chapter 9 morphological image processing
Ahmed Daoud
 
Lecture 16 KL Transform in Image Processing
Lecture 16 KL Transform in Image ProcessingLecture 16 KL Transform in Image Processing
Lecture 16 KL Transform in Image Processing
VARUN KUMAR
 
Morphological Image Processing
Morphological Image ProcessingMorphological Image Processing
Morphological Image Processing
kumari36
 
Chapter 8 image compression
Chapter 8 image compressionChapter 8 image compression
Chapter 8 image compression
asodariyabhavesh
 
Learning sets of rules, Sequential Learning Algorithm,FOIL
Learning sets of rules, Sequential Learning Algorithm,FOILLearning sets of rules, Sequential Learning Algorithm,FOIL
Learning sets of rules, Sequential Learning Algorithm,FOIL
Pavithra Thippanaik
 
Image enhancement
Image enhancementImage enhancement
Image enhancement
Dr INBAMALAR T M
 
Fundamentals and image compression models
Fundamentals and image compression modelsFundamentals and image compression models
Fundamentals and image compression models
lavanya marichamy
 
Context free grammar
Context free grammar Context free grammar
Context free grammar
Mohammad Ilyas Malik
 
Chapter 6 color image processing
Chapter 6 color image processingChapter 6 color image processing
Chapter 6 color image processing
asodariyabhavesh
 
Digital Image Processing: Image Restoration
Digital Image Processing: Image RestorationDigital Image Processing: Image Restoration
Digital Image Processing: Image Restoration
Mostafa G. M. Mostafa
 
Deterministic Finite Automata (DFA)
Deterministic Finite Automata (DFA)Deterministic Finite Automata (DFA)
Deterministic Finite Automata (DFA)
Animesh Chaturvedi
 
Enhancement in frequency domain
Enhancement in frequency domainEnhancement in frequency domain
Enhancement in frequency domain
Ashish Kumar
 
Intensity Transformation and Spatial filtering
Intensity Transformation and Spatial filteringIntensity Transformation and Spatial filtering
Intensity Transformation and Spatial filtering
Shajun Nisha
 
Fuzzy Sets Introduction With Example
Fuzzy Sets Introduction With ExampleFuzzy Sets Introduction With Example
Fuzzy Sets Introduction With Example
raisnasir
 

What's hot (20)

Bit plane coding
Bit plane codingBit plane coding
Bit plane coding
 
Unit3 dip
Unit3 dipUnit3 dip
Unit3 dip
 
Sharpening spatial filters
Sharpening spatial filtersSharpening spatial filters
Sharpening spatial filters
 
Smoothing Filters in Spatial Domain
Smoothing Filters in Spatial DomainSmoothing Filters in Spatial Domain
Smoothing Filters in Spatial Domain
 
Digital Image Processing
Digital Image ProcessingDigital Image Processing
Digital Image Processing
 
Image Smoothing using Frequency Domain Filters
Image Smoothing using Frequency Domain FiltersImage Smoothing using Frequency Domain Filters
Image Smoothing using Frequency Domain Filters
 
Chapter 9 morphological image processing
Chapter 9   morphological image processingChapter 9   morphological image processing
Chapter 9 morphological image processing
 
Lecture 16 KL Transform in Image Processing
Lecture 16 KL Transform in Image ProcessingLecture 16 KL Transform in Image Processing
Lecture 16 KL Transform in Image Processing
 
Morphological Image Processing
Morphological Image ProcessingMorphological Image Processing
Morphological Image Processing
 
Chapter 8 image compression
Chapter 8 image compressionChapter 8 image compression
Chapter 8 image compression
 
Learning sets of rules, Sequential Learning Algorithm,FOIL
Learning sets of rules, Sequential Learning Algorithm,FOILLearning sets of rules, Sequential Learning Algorithm,FOIL
Learning sets of rules, Sequential Learning Algorithm,FOIL
 
Image enhancement
Image enhancementImage enhancement
Image enhancement
 
Fundamentals and image compression models
Fundamentals and image compression modelsFundamentals and image compression models
Fundamentals and image compression models
 
Context free grammar
Context free grammar Context free grammar
Context free grammar
 
Chapter 6 color image processing
Chapter 6 color image processingChapter 6 color image processing
Chapter 6 color image processing
 
Digital Image Processing: Image Restoration
Digital Image Processing: Image RestorationDigital Image Processing: Image Restoration
Digital Image Processing: Image Restoration
 
Deterministic Finite Automata (DFA)
Deterministic Finite Automata (DFA)Deterministic Finite Automata (DFA)
Deterministic Finite Automata (DFA)
 
Enhancement in frequency domain
Enhancement in frequency domainEnhancement in frequency domain
Enhancement in frequency domain
 
Intensity Transformation and Spatial filtering
Intensity Transformation and Spatial filteringIntensity Transformation and Spatial filtering
Intensity Transformation and Spatial filtering
 
Fuzzy Sets Introduction With Example
Fuzzy Sets Introduction With ExampleFuzzy Sets Introduction With Example
Fuzzy Sets Introduction With Example
 

Similar to Morphology gonzalez-woods

Lec07-CH9-MORPHOL [Recovered].ppt
Lec07-CH9-MORPHOL [Recovered].pptLec07-CH9-MORPHOL [Recovered].ppt
Lec07-CH9-MORPHOL [Recovered].ppt
AyeleNugusie
 
DIP_14_54_boundary extraction in dip .ppt
DIP_14_54_boundary extraction in dip .pptDIP_14_54_boundary extraction in dip .ppt
DIP_14_54_boundary extraction in dip .ppt
itzkingpuneet
 
Chapter 9 newer
Chapter 9   newerChapter 9   newer
Chapter 9 newer
Sonam Maurya
 
Image segmentation 3 morphology
Image segmentation 3 morphologyImage segmentation 3 morphology
Image segmentation 3 morphology
Rumah Belajar
 
morphological image processing
morphological image processingmorphological image processing
morphological image processing
John Williams
 
Integration
IntegrationIntegration
Integration
suefee
 
1 centroids
1 centroids1 centroids
1 centroids
ELIMENG
 
dokumen.tips_computer-graphics-image-processing-chapter-9-computer-graphics-i...
dokumen.tips_computer-graphics-image-processing-chapter-9-computer-graphics-i...dokumen.tips_computer-graphics-image-processing-chapter-9-computer-graphics-i...
dokumen.tips_computer-graphics-image-processing-chapter-9-computer-graphics-i...
YogeshNeelappa2
 
Morphological.pdf
Morphological.pdfMorphological.pdf
Morphological.pdf
pawankamal3
 
Morphological image processing.pdf
Morphological image processing.pdfMorphological image processing.pdf
Morphological image processing.pdf
Erwin512140
 
Robotics_BK_Chap_01.pdf
Robotics_BK_Chap_01.pdfRobotics_BK_Chap_01.pdf
Robotics_BK_Chap_01.pdf
Nhựt Nguyễn Minh
 
Beam.pdf
Beam.pdfBeam.pdf
Beam.pdf
ssusere1ee8b
 
Deformation of structures
Deformation of structuresDeformation of structures
Deformation of structures
Ahmed zubydan
 
Predictive model of moment of resistance for rectangular reinforced concrete ...
Predictive model of moment of resistance for rectangular reinforced concrete ...Predictive model of moment of resistance for rectangular reinforced concrete ...
Predictive model of moment of resistance for rectangular reinforced concrete ...
Alexander Decker
 
History of group technology, role of G.T in CAD/CAM integration, part families,
History of group technology, role of G.T in CAD/CAM integration, part families,History of group technology, role of G.T in CAD/CAM integration, part families,
History of group technology, role of G.T in CAD/CAM integration, part families,
Shiva krishna gupta
 
FMS_MCQ_QUESTION_BANK.pdf
FMS_MCQ_QUESTION_BANK.pdfFMS_MCQ_QUESTION_BANK.pdf
FMS_MCQ_QUESTION_BANK.pdf
SureshK256753
 
Finite Maths Problems
Finite Maths ProblemsFinite Maths Problems
Finite Maths Problems
Abhishek Bansal
 
Section_2_3.ppt
Section_2_3.pptSection_2_3.ppt
Section_2_3.ppt
elle155401
 
Deflection
DeflectionDeflection
Deflection
Shivendra Nandan
 
Line integral.ppt
Line integral.pptLine integral.ppt
Line integral.ppt
MichaelTegegn
 

Similar to Morphology gonzalez-woods (20)

Lec07-CH9-MORPHOL [Recovered].ppt
Lec07-CH9-MORPHOL [Recovered].pptLec07-CH9-MORPHOL [Recovered].ppt
Lec07-CH9-MORPHOL [Recovered].ppt
 
DIP_14_54_boundary extraction in dip .ppt
DIP_14_54_boundary extraction in dip .pptDIP_14_54_boundary extraction in dip .ppt
DIP_14_54_boundary extraction in dip .ppt
 
Chapter 9 newer
Chapter 9   newerChapter 9   newer
Chapter 9 newer
 
Image segmentation 3 morphology
Image segmentation 3 morphologyImage segmentation 3 morphology
Image segmentation 3 morphology
 
morphological image processing
morphological image processingmorphological image processing
morphological image processing
 
Integration
IntegrationIntegration
Integration
 
1 centroids
1 centroids1 centroids
1 centroids
 
dokumen.tips_computer-graphics-image-processing-chapter-9-computer-graphics-i...
dokumen.tips_computer-graphics-image-processing-chapter-9-computer-graphics-i...dokumen.tips_computer-graphics-image-processing-chapter-9-computer-graphics-i...
dokumen.tips_computer-graphics-image-processing-chapter-9-computer-graphics-i...
 
Morphological.pdf
Morphological.pdfMorphological.pdf
Morphological.pdf
 
Morphological image processing.pdf
Morphological image processing.pdfMorphological image processing.pdf
Morphological image processing.pdf
 
Robotics_BK_Chap_01.pdf
Robotics_BK_Chap_01.pdfRobotics_BK_Chap_01.pdf
Robotics_BK_Chap_01.pdf
 
Beam.pdf
Beam.pdfBeam.pdf
Beam.pdf
 
Deformation of structures
Deformation of structuresDeformation of structures
Deformation of structures
 
Predictive model of moment of resistance for rectangular reinforced concrete ...
Predictive model of moment of resistance for rectangular reinforced concrete ...Predictive model of moment of resistance for rectangular reinforced concrete ...
Predictive model of moment of resistance for rectangular reinforced concrete ...
 
History of group technology, role of G.T in CAD/CAM integration, part families,
History of group technology, role of G.T in CAD/CAM integration, part families,History of group technology, role of G.T in CAD/CAM integration, part families,
History of group technology, role of G.T in CAD/CAM integration, part families,
 
FMS_MCQ_QUESTION_BANK.pdf
FMS_MCQ_QUESTION_BANK.pdfFMS_MCQ_QUESTION_BANK.pdf
FMS_MCQ_QUESTION_BANK.pdf
 
Finite Maths Problems
Finite Maths ProblemsFinite Maths Problems
Finite Maths Problems
 
Section_2_3.ppt
Section_2_3.pptSection_2_3.ppt
Section_2_3.ppt
 
Deflection
DeflectionDeflection
Deflection
 
Line integral.ppt
Line integral.pptLine integral.ppt
Line integral.ppt
 

Recently uploaded

Transformers design and coooling methods
Transformers design and coooling methodsTransformers design and coooling methods
Transformers design and coooling methods
Roger Rozario
 
一比一原版(USF毕业证)旧金山大学毕业证如何办理
一比一原版(USF毕业证)旧金山大学毕业证如何办理一比一原版(USF毕业证)旧金山大学毕业证如何办理
一比一原版(USF毕业证)旧金山大学毕业证如何办理
uqyfuc
 
5G Radio Network Througput Problem Analysis HCIA.pdf
5G Radio Network Througput Problem Analysis HCIA.pdf5G Radio Network Througput Problem Analysis HCIA.pdf
5G Radio Network Througput Problem Analysis HCIA.pdf
AlvianRamadhani5
 
一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理
一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理
一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理
ecqow
 
Object Oriented Analysis and Design - OOAD
Object Oriented Analysis and Design - OOADObject Oriented Analysis and Design - OOAD
Object Oriented Analysis and Design - OOAD
PreethaV16
 
SCALING OF MOS CIRCUITS m .pptx
SCALING OF MOS CIRCUITS m                 .pptxSCALING OF MOS CIRCUITS m                 .pptx
SCALING OF MOS CIRCUITS m .pptx
harshapolam10
 
Use PyCharm for remote debugging of WSL on a Windo cf5c162d672e4e58b4dde5d797...
Use PyCharm for remote debugging of WSL on a Windo cf5c162d672e4e58b4dde5d797...Use PyCharm for remote debugging of WSL on a Windo cf5c162d672e4e58b4dde5d797...
Use PyCharm for remote debugging of WSL on a Windo cf5c162d672e4e58b4dde5d797...
shadow0702a
 
AI-Based Home Security System : Home security
AI-Based Home Security System : Home securityAI-Based Home Security System : Home security
AI-Based Home Security System : Home security
AIRCC Publishing Corporation
 
Software Engineering and Project Management - Introduction, Modeling Concepts...
Software Engineering and Project Management - Introduction, Modeling Concepts...Software Engineering and Project Management - Introduction, Modeling Concepts...
Software Engineering and Project Management - Introduction, Modeling Concepts...
Prakhyath Rai
 
Null Bangalore | Pentesters Approach to AWS IAM
Null Bangalore | Pentesters Approach to AWS IAMNull Bangalore | Pentesters Approach to AWS IAM
Null Bangalore | Pentesters Approach to AWS IAM
Divyanshu
 
一比一原版(uofo毕业证书)美国俄勒冈大学毕业证如何办理
一比一原版(uofo毕业证书)美国俄勒冈大学毕业证如何办理一比一原版(uofo毕业证书)美国俄勒冈大学毕业证如何办理
一比一原版(uofo毕业证书)美国俄勒冈大学毕业证如何办理
upoux
 
TIME TABLE MANAGEMENT SYSTEM testing.pptx
TIME TABLE MANAGEMENT SYSTEM testing.pptxTIME TABLE MANAGEMENT SYSTEM testing.pptx
TIME TABLE MANAGEMENT SYSTEM testing.pptx
CVCSOfficial
 
AI + Data Community Tour - Build the Next Generation of Apps with the Einstei...
AI + Data Community Tour - Build the Next Generation of Apps with the Einstei...AI + Data Community Tour - Build the Next Generation of Apps with the Einstei...
AI + Data Community Tour - Build the Next Generation of Apps with the Einstei...
Paris Salesforce Developer Group
 
smart pill dispenser is designed to improve medication adherence and safety f...
smart pill dispenser is designed to improve medication adherence and safety f...smart pill dispenser is designed to improve medication adherence and safety f...
smart pill dispenser is designed to improve medication adherence and safety f...
um7474492
 
Zener Diode and its V-I Characteristics and Applications
Zener Diode and its V-I Characteristics and ApplicationsZener Diode and its V-I Characteristics and Applications
Zener Diode and its V-I Characteristics and Applications
Shiny Christobel
 
4. Mosca vol I -Fisica-Tipler-5ta-Edicion-Vol-1.pdf
4. Mosca vol I -Fisica-Tipler-5ta-Edicion-Vol-1.pdf4. Mosca vol I -Fisica-Tipler-5ta-Edicion-Vol-1.pdf
4. Mosca vol I -Fisica-Tipler-5ta-Edicion-Vol-1.pdf
Gino153088
 
ITSM Integration with MuleSoft.pptx
ITSM  Integration with MuleSoft.pptxITSM  Integration with MuleSoft.pptx
ITSM Integration with MuleSoft.pptx
VANDANAMOHANGOUDA
 
Open Channel Flow: fluid flow with a free surface
Open Channel Flow: fluid flow with a free surfaceOpen Channel Flow: fluid flow with a free surface
Open Channel Flow: fluid flow with a free surface
Indrajeet sahu
 
LLM Fine Tuning with QLoRA Cassandra Lunch 4, presented by Anant
LLM Fine Tuning with QLoRA Cassandra Lunch 4, presented by AnantLLM Fine Tuning with QLoRA Cassandra Lunch 4, presented by Anant
LLM Fine Tuning with QLoRA Cassandra Lunch 4, presented by Anant
Anant Corporation
 
Tools & Techniques for Commissioning and Maintaining PV Systems W-Animations ...
Tools & Techniques for Commissioning and Maintaining PV Systems W-Animations ...Tools & Techniques for Commissioning and Maintaining PV Systems W-Animations ...
Tools & Techniques for Commissioning and Maintaining PV Systems W-Animations ...
Transcat
 

Recently uploaded (20)

Transformers design and coooling methods
Transformers design and coooling methodsTransformers design and coooling methods
Transformers design and coooling methods
 
一比一原版(USF毕业证)旧金山大学毕业证如何办理
一比一原版(USF毕业证)旧金山大学毕业证如何办理一比一原版(USF毕业证)旧金山大学毕业证如何办理
一比一原版(USF毕业证)旧金山大学毕业证如何办理
 
5G Radio Network Througput Problem Analysis HCIA.pdf
5G Radio Network Througput Problem Analysis HCIA.pdf5G Radio Network Througput Problem Analysis HCIA.pdf
5G Radio Network Througput Problem Analysis HCIA.pdf
 
一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理
一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理
一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理
 
Object Oriented Analysis and Design - OOAD
Object Oriented Analysis and Design - OOADObject Oriented Analysis and Design - OOAD
Object Oriented Analysis and Design - OOAD
 
SCALING OF MOS CIRCUITS m .pptx
SCALING OF MOS CIRCUITS m                 .pptxSCALING OF MOS CIRCUITS m                 .pptx
SCALING OF MOS CIRCUITS m .pptx
 
Use PyCharm for remote debugging of WSL on a Windo cf5c162d672e4e58b4dde5d797...
Use PyCharm for remote debugging of WSL on a Windo cf5c162d672e4e58b4dde5d797...Use PyCharm for remote debugging of WSL on a Windo cf5c162d672e4e58b4dde5d797...
Use PyCharm for remote debugging of WSL on a Windo cf5c162d672e4e58b4dde5d797...
 
AI-Based Home Security System : Home security
AI-Based Home Security System : Home securityAI-Based Home Security System : Home security
AI-Based Home Security System : Home security
 
Software Engineering and Project Management - Introduction, Modeling Concepts...
Software Engineering and Project Management - Introduction, Modeling Concepts...Software Engineering and Project Management - Introduction, Modeling Concepts...
Software Engineering and Project Management - Introduction, Modeling Concepts...
 
Null Bangalore | Pentesters Approach to AWS IAM
Null Bangalore | Pentesters Approach to AWS IAMNull Bangalore | Pentesters Approach to AWS IAM
Null Bangalore | Pentesters Approach to AWS IAM
 
一比一原版(uofo毕业证书)美国俄勒冈大学毕业证如何办理
一比一原版(uofo毕业证书)美国俄勒冈大学毕业证如何办理一比一原版(uofo毕业证书)美国俄勒冈大学毕业证如何办理
一比一原版(uofo毕业证书)美国俄勒冈大学毕业证如何办理
 
TIME TABLE MANAGEMENT SYSTEM testing.pptx
TIME TABLE MANAGEMENT SYSTEM testing.pptxTIME TABLE MANAGEMENT SYSTEM testing.pptx
TIME TABLE MANAGEMENT SYSTEM testing.pptx
 
AI + Data Community Tour - Build the Next Generation of Apps with the Einstei...
AI + Data Community Tour - Build the Next Generation of Apps with the Einstei...AI + Data Community Tour - Build the Next Generation of Apps with the Einstei...
AI + Data Community Tour - Build the Next Generation of Apps with the Einstei...
 
smart pill dispenser is designed to improve medication adherence and safety f...
smart pill dispenser is designed to improve medication adherence and safety f...smart pill dispenser is designed to improve medication adherence and safety f...
smart pill dispenser is designed to improve medication adherence and safety f...
 
Zener Diode and its V-I Characteristics and Applications
Zener Diode and its V-I Characteristics and ApplicationsZener Diode and its V-I Characteristics and Applications
Zener Diode and its V-I Characteristics and Applications
 
4. Mosca vol I -Fisica-Tipler-5ta-Edicion-Vol-1.pdf
4. Mosca vol I -Fisica-Tipler-5ta-Edicion-Vol-1.pdf4. Mosca vol I -Fisica-Tipler-5ta-Edicion-Vol-1.pdf
4. Mosca vol I -Fisica-Tipler-5ta-Edicion-Vol-1.pdf
 
ITSM Integration with MuleSoft.pptx
ITSM  Integration with MuleSoft.pptxITSM  Integration with MuleSoft.pptx
ITSM Integration with MuleSoft.pptx
 
Open Channel Flow: fluid flow with a free surface
Open Channel Flow: fluid flow with a free surfaceOpen Channel Flow: fluid flow with a free surface
Open Channel Flow: fluid flow with a free surface
 
LLM Fine Tuning with QLoRA Cassandra Lunch 4, presented by Anant
LLM Fine Tuning with QLoRA Cassandra Lunch 4, presented by AnantLLM Fine Tuning with QLoRA Cassandra Lunch 4, presented by Anant
LLM Fine Tuning with QLoRA Cassandra Lunch 4, presented by Anant
 
Tools & Techniques for Commissioning and Maintaining PV Systems W-Animations ...
Tools & Techniques for Commissioning and Maintaining PV Systems W-Animations ...Tools & Techniques for Commissioning and Maintaining PV Systems W-Animations ...
Tools & Techniques for Commissioning and Maintaining PV Systems W-Animations ...
 

Morphology gonzalez-woods

  • 1. Lecture 5. Morphological Image Processing
  • 2. 4/30/2021 2 Introduction ► Morphology: a branch of biology that deals with the form and structure of animals and plants ► Morphological image processing is used to extract image components for representation and description of region shape, such as boundaries, skeletons, and the convex hull
  • 3. 4/30/2021 3 Preliminaries (1) ► Reflection ► Translation The reflection of a set , denoted , is defined as { | ,for } B B B w w b b B     1 2 The translation of a set by point ( , ), denoted ( ) , is defined as ( ) { | ,for } Z Z B z z z B B c c b z b B     
  • 5. 4/30/2021 5 Preliminaries (2) ► Structure elements (SE) Small sets or sub-images used to probe an image under study for properties of interest
  • 6. 4/30/2021 6 Examples: Structuring Elements (1) origin
  • 7. 4/30/2021 7 Examples: Structuring Elements (2) Accommodate the entire structuring elements when its origin is on the border of the original set A Origin of B visits every element of A At each location of the origin of B, if B is completely contained in A, then the location is a member of the new set, otherwise it is not a member of the new set.
  • 8. 4/30/2021 8 Erosion   2 With and as sets in , the erosion of by , denoted , defined | ( )Z A B Z A B A B A B z B A   The set of all points such that , translated by , is contained by . z B z A   | ( ) c Z A B z B A    
  • 11. 4/30/2021 11 Dilation     2 With and as sets in , the dilation of by , denoted , is defined as A B= | z A B Z A B A B z B A      The set of all displacements , the translated and overlap by at least one element. z B A     | z A B z B A A          
  • 12. 4/30/2021 12 Examples of Dilation (1)
  • 13. 4/30/2021 13 Examples of Dilation (2)
  • 14. 4/30/2021 14 Duality ► Erosion and dilation are duals of each other with respect to set complementation and reflection     c c c c A B A B and A B A B      
  • 15. 4/30/2021 15 Duality ► Erosion and dilation are duals of each other with respect to set complementation and reflection               | | | c c Z c c Z c Z c A B z B A z B A z B A A B             
  • 16. 4/30/2021 16 Duality ► Erosion and dilation are duals of each other with respect to set complementation and reflection           | | c c Z c Z c A B z B A z B A A B           
  • 17. 4/30/2021 17 Opening and Closing ► Opening generally smoothes the contour of an object, breaks narrow isthmuses, and eliminates thin protrusions ► Closing tends to smooth sections of contours but it generates fuses narrow breaks and long thin gulfs, eliminates small holes, and fills gaps in the contour
  • 18. 4/30/2021 18 Opening and Closing   The opening of set by structuring element , denoted , is defined as A B A B A B A B B      The closing of set by structuring element , denoted , is defined as A B A B A B A B B   
  • 19. 4/30/2021 19 Opening       The opening of set by structuring element , denoted , is defined as | Z Z A B A B A B B B A  
  • 23. 4/30/2021 23 Duality of Opening and Closing ► Opening and closing are duals of each other with respect to set complementation and reflection   ( ) c c A B A B    ( ) c c A B A B 
  • 24. 4/30/2021 24 The Properties of Opening and Closing ► Properties of Opening ► Properties of Closing (a) is a subset (subimage) of (b) if is a subset of , then is a subset of (c) ( ) A B A C D C B D B A B B A B  (a) is subset (subimage) of (b) If is a subset of , then is a subset of (c) ( ) A A B C D C B D B A B B A B 
  • 26. 4/30/2021 26 The Hit-or-Miss Transformation     if denotes the set composed of and its background,the match (or set of matches) of in , denoted , * c B D B A A B A B A D A W D               1 2 1 2 1 2 , :object : background ( ) c B B B B B A B A B A B      
  • 27. 4/30/2021 27 Some Basic Morphological Algorithms (1) ► Boundary Extraction The boundary of a set A, can be obtained by first eroding A by B and then performing the set difference between A and its erosion.   ( ) A A A B    
  • 30. 4/30/2021 30 Some Basic Morphological Algorithms (2) ► Hole Filling A hole may be defined as a background region surrounded by a connected border of foreground pixels. Let A denote a set whose elements are 8-connected boundaries, each boundary enclosing a background region (i.e., a hole). Given a point in each hole, the objective is to fill all the holes with 1s.
  • 31. 4/30/2021 31 Some Basic Morphological Algorithms (2) ► Hole Filling 1. Forming an array X0 of 0s (the same size as the array containing A), except the locations in X0 corresponding to the given point in each hole, which we set to 1. 2. Xk = (Xk-1 + B) Ac k=1,2,3,… Stop the iteration if Xk = Xk-1 
  • 34. 4/30/2021 34 Some Basic Morphological Algorithms (3) ► Extraction of Connected Components Central to many automated image analysis applications. Let A be a set containing one or more connected components, and form an array X0 (of the same size as the array containing A) whose elements are 0s, except at each location known to correspond to a point in each connected component in A, which is set to 1.
  • 35. 4/30/2021 35 Some Basic Morphological Algorithms (3) ► Extraction of Connected Components Central to many automated image analysis applications. 1 -1 ( ) :structuring element until k k k k X X B A B X X     
  • 38. 4/30/2021 38 Some Basic Morphological Algorithms (4) ► Convex Hull A set A is said to be convex if the straight line segment joining any two points in A lies entirely within A. The convex hull H or of an arbitrary set S is the smallest convex set containing S.
  • 39. 4/30/2021 39 Some Basic Morphological Algorithms (4) ► Convex Hull 1 Let , 1, 2, 3, 4, represent the four structuring elements. The procedure consists of implementing the equation: ( * ) 1,2,3,4 and 1, i i i k k B i X X B A i k       0 1 4 1 2,3,... with . When the procedure converges, or ,let , the convex hull of A is ( ) i i i i i k k k i i X A X X D X C A D       
  • 42. 4/30/2021 42 Some Basic Morphological Algorithms (5) ► Thinning The thinning of a set A by a structuring element B, defined ( * ) ( * )c A B A A B A A B     
  • 43. 4/30/2021 43 Some Basic Morphological Algorithms (5) ► A more useful expression for thinning A symmetrically is based on a sequence of structuring elements:     1 2 3 -1 , , ,..., where is a rotated version of n i i B B B B B B B  1 2 The thinning of by a sequence of structuring element { } { } ((...(( ) )...) ) n A B A B A B B B     
  • 45. 4/30/2021 45 Some Basic Morphological Algorithms (6) ► Thickening:   The thickening is defined by the expression * A B A A B   1 2 The thickening of by a sequence of structuring element { } { } ((...(( ) )...) ) n A B A B A B B B  In practice, the usual procedure is to thin the background of the set and then complement the result.
  • 46. 4/30/2021 46 Some Basic Morphological Algorithms (6)
  • 47. 4/30/2021 47 Some Basic Morphological Algorithms (7) ► Skeletons A skeleton, ( ) of a set has the following properties a. if is a point of ( ) and ( ) is the largest disk centered at and contained in , one cannot find a larger disk containing ( ) z z S A A z S A D z A D and included in . The disk ( ) is called a maximum disk. b. The disk ( ) touches the boundary of at two or more different places. z z A D D A
  • 48. 4/30/2021 48 Some Basic Morphological Algorithms (7)
  • 49. 4/30/2021 49 Some Basic Morphological Algorithms (7) 0 The skeleton of A can be expressed in terms of erosion and openings. ( ) ( ) with max{ | }; ( ) ( ) ( ) where is a structuring element, and K k k k S A S A K k A kB S A A kB A kB B B            ( ) ((..(( ) ) ...) ) successive erosions of A. A kB A B B B k      
  • 52. 4/30/2021 52 Some Basic Morphological Algorithms (7) 0 A can be reconstructed from the subsets by using ( ( ) ) where ( ) denotes successive dilations of A. ( ( ) ) ((...(( ( ) ) )... ) K k k k k k A S A kB S A kB k S A kB S A B B B          
  • 54. 4/30/2021 54 Some Basic Morphological Algorithms (8) ► Pruning a. Thinning and skeletonizing tend to leave parasitic components b. Pruning methods are essential complement to thinning and skeletonizing procedures
  • 56. 4/30/2021 56 Pruning: Example   8 2 1 1 * k k X X B   
  • 57. 4/30/2021 57 Pruning: Example   3 2 :3 3 structuring element X X H A H    
  • 60. 4/30/2021 60 Some Basic Morphological Algorithms (9) ► Morphological Reconstruction It involves two images and a structuring element a. One image contains the starting points for the transformation (The image is called marker) b. Another image (mask) constrains the transformation c. The structuring element is used to define connectivity
  • 61. 4/30/2021 61 Morphological Reconstruction: Geodesic Dilation   (1) (1) Let denote the marker image and the mask image, . The geodesic dilation of size 1 of the marker image with respect to the mask, denoted by ( ), is defined as ( ) G G G F G F G D F D F F B     ( ) ( ) (1) ( 1) (0) The geodesic dilation of size of the marker image with respect to , denoted by ( ), is defined as ( ) ( ) ( ) with ( ) . n G n n G G G G n F G D F D F D F D F D F F       
  • 63. 4/30/2021 63 Morphological Reconstruction: Geodesic Erosion   (1) (1) Let denote the marker image and the mask image. The geodesic erosion of size 1 of the marker image with respect to the mask, denoted by ( ), is defined as ( ) G G G F G E F E F F B    ( ) ( ) (1) ( 1) (0) The geodesic erosion of size of the marker image with respect to , denoted by ( ), is defined as ( ) ( ) ( ) with ( ) . n G n n G G G G n F G E F E F E F E F E F F       
  • 65. 4/30/2021 65 Morphological Reconstruction by Dilation Morphological reconstruction by dialtion of a mask image from a marker image , denoted ( ), is defined as the geodesic dilation of with respect to , iterated until stability is achieved; that D G G F R F F G ( ) ( ) ( 1) is, ( ) ( ) with such that ( ) ( ). D k G G k k G G R F D F k D F D F   
  • 67. 4/30/2021 67 Morphological Reconstruction by Erosion Morphological reconstruction by erosion of a mask image from a marker image , denoted ( ), is defined as the geodesic erosion of with respect to , iterated until stability is achieved; that i E G G F R F F G ( ) ( ) ( 1) s, ( ) ( ) with such that ( ) ( ). E k G G k k G G R F E F k E F E F   
  • 68. 4/30/2021 68 Opening by Reconstruction     ( ) The opening by reconstruction of size of an image is defined as the reconstruction by dilation of from the erosion of size of ; that is ( ) where n D R F n F F n F O F R F nB F nB        indicates erosions of by . n F B
  • 70. 4/30/2021 70 Filling Holes Let ( , ) denote a binary image and suppose that we form a marker image that is 0 everywhere, except at the image border, where it is set to 1- ; that is 1 ( , ) if ( , ) is on the bor ( , ) I x y F I I x y x y F x y   der of 0 otherwise then ( ) c c D I I H R F        
  • 72. 4/30/2021 72 ( ) c c D I H R F     
  • 73. 4/30/2021 73 Border Clearing It can be used to screen images so that only complete objects remain for further processing; it can be used as a singal that partial objects are present in the field of view. The original image is used as the mask and the following marker image: ( , ) if ( , ) is on the border of ( , ) 0 otherwise I x y x y I F x y X I R       ( ) D I F
  • 79. 4/30/2021 79 Gray-Scale Morphology ( , ) : gray-scale image ( , ): structuring element f x y b x y
  • 80. 4/30/2021 80 Gray-Scale Morphology: Erosion and Dilation by Flat Structuring         ( , ) ( , ) ( , ) min ( , ) ( , ) max ( , ) s t b s t b f b x y f x s y t f b x y f x s y t          
  • 82. 4/30/2021 82 Gray-Scale Morphology: Erosion and Dilation by Nonflat Structuring         ( , ) ( , ) ( , ) min ( , ) ( , ) ( , ) max ( , ) ( , ) N N s t b N N s t b f b x y f x s y t b s t f b x y f x s y t b s t            
  • 83. 4/30/2021 83 Duality: Erosion and Dilation     ( , ) ( , ) where ( , ) and ( , ) c c c c c f b x y f b x y f f x y b b x y f b f b                             ( ) c c f b f b    
  • 84. 4/30/2021 84 Opening and Closing     f b f b b f b f b b            c c c c f b f b f b f b f b f b          
  • 86. 4/30/2021 86 Properties of Gray-scale Opening       1 2 1 2 ( ) ( ) if , then ( ) where denotes is a subset of and also ( , ) ( , ). a f b f b f f f b f b c f b b f b e r e r e x y r x y      
  • 87. 4/30/2021 87 Properties of Gray-scale Closing       1 2 1 2 ( ) ( ) if , then ( ) a f f b b f f f b f b c f b b f b    
  • 89. 4/30/2021 89 Morphological Smoothing ► Opening suppresses bright details smaller than the specified SE, and closing suppresses dark details. ► Opening and closing are used often in combination as morphological filters for image smoothing and noise removal.
  • 91. 4/30/2021 91 Morphological Gradient ► Dilation and erosion can be used in combination with image subtraction to obtain the morphological gradient of an image, denoted by g, ► The edges are enhanced and the contribution of the homogeneous areas are suppressed, thus producing a “derivative-like” (gradient) effect. ( ) ( ) g f b f b    
  • 93. 4/30/2021 93 Top-hat and Bottom-hat Transformations ► The top-hat transformation of a grayscale image f is defined as f minus its opening: ► The bottom-hat transformation of a grayscale image f is defined as its closing minus f: ( ) ( ) hat T f f f b   ( ) ( ) hat B f f b f   
  • 94. 4/30/2021 94 Top-hat and Bottom-hat Transformations ► One of the principal applications of these transformations is in removing objects from an image by using structuring element in the opening or closing operation
  • 95. 4/30/2021 95 Example of Using Top-hat Transformation in Segmentation
  • 96. 4/30/2021 96 Granulometry ► Granulometry deals with determining the size of distribution of particles in an image ► Opening operations of a particular size should have the most effect on regions of the input image that contain particles of similar size ► For each opening, the sum (surface area) of the pixel values in the opening is computed
  • 99. 4/30/2021 99 Textual Segmentation ► Segmentation: the process of subdividing an image into regions.
  • 101. 4/30/2021 101 Gray-Scale Morphological Reconstruction (1) ► Let f and g denote the marker and mask image with the same size, respectively and f ≤ g. The geodesic dilation of size 1 of f with respect to g is defined as The geodesic dilation of size n of f with respect to g is defined as   (1) ( ) where denotes the point-wise minimum operator. g D f f g g     ( ) (1) ( 1) (0) ( ) ( ) with ( ) n n g g g g D f D D f D f f       
  • 102. 4/30/2021 102 Gray-Scale Morphological Reconstruction (2) ► The geodesic erosion of size 1 of f with respect to g is defined as The geodesic erosion of size n of f with respect to g is defined as   (1) ( ) where denotes the point-wise maximum operator. g E f f g g     ( ) (1) ( 1) (0) ( ) ( ) with ( ) n n g g g g E f E E f E f f       
  • 103. 4/30/2021 103 Gray-Scale Morphological Reconstruction (3) ► The morphological reconstruction by dilation of a gray- scale mask image g by a gray-scale marker image f, is defined as the geodesic dilation of f with respect to g, iterated until stability is reached, that is, The morphological reconstruction by erosion of g by f is defined as       ( ) ( ) ( 1) ( ) with k such that D k g g k k g g R f D f D f D f          ( ) ( ) ( 1) ( ) with k such that E k g g k k g g R f E f E f E f   
  • 104. 4/30/2021 104 Gray-Scale Morphological Reconstruction (4) ► The opening by reconstruction of size n of an image f is defined as the reconstruction by dilation of f from the erosion of size n of f; that is, The closing by reconstruction of size n of an image f is defined as the reconstruction by erosion of f from the dilation of size n of f; that is,   ( ) ( ) n D R f O f R f nb     ( ) ( ) n E R f C f R f nb  
  • 106. 4/30/2021 106 Steps in the Example 1. Opening by reconstruction of the original image using a horizontal line of size 1x71 pixels in the erosion operation 2. Subtract the opening by reconstruction from original image 3. Opening by reconstruction of the f’ using a vertical line of size 11x1 pixels 4. Dilate f1 with a line SE of size 1x21, get f2.   ( ) ( ) n D R f O f R f nb   ( ) ' ( ) n R f f O f     ( ) 1 ( ') ' ' n D R f f O f R f nb   
  • 107. 4/30/2021 107 Steps in the Example 5. Calculate the minimum between the dilated image f2 and and f’, get f3. 6. By using f3 as a marker and the dilated image f2 as the mask,       ( ) 2 2 ( ) ( 1) 2 2 ( 3) 3 with k such that 3 3 D k f f k k f f R f D f D f D f   