0% found this document useful (0 votes)
51 views

Morphological Image Processing

Uploaded by

Rithika Indukuri
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
51 views

Morphological Image Processing

Uploaded by

Rithika Indukuri
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 45

Unit-V

Morphological Image Processing


Introduction
► Morphology: a branch of biology that deals with the form and
structure of animals and plants
► In image processing, the mathematical morphology as a tool for
extracting image components that are useful in the representation
and description of region shape, such as boundaries, skeletons,
and the convex hull.
► We are interested also in morphological techniques for pre- or
postprocessing, such as morphological filtering, thinning, and
pruning.
08/12/24 2
Mathematic Morphology
► The language of mathematical morphology is set theory.
► When working with images, sets in mathematical morphology
represent objects in those images.
► In binary images, the sets in question are members of the 2-D
integer space Z2 , where each element of a set is a tuple (2-D
vector) whose coordinates are the coordinates of an object
(typically foreground) pixel in the image.
► set in mathematic morphology represent objects in an image
 Binary image (0 = white, 1 = black) : the element of the set is the
coordinates (x, y) of pixel belong to the object  Z2
08/12/24 3
Mathematic Morphology…
► Grayscale digital images can be represented as sets whose
components are in Z3.
► In this case, two components of each element of the set refer to
the coordinates of a pixel, and the third corresponds to its
discrete intensity value.
► Gray-scaled image : the element of the set is the coordinates (x,
y) of pixel belong to the object and the gray levels  Z3
► Sets in higher dimensional spaces can contain other image
attributes, such as color and time-varying components.
08/12/24 4
Mathematic Morphology…
► Morphological operations are defined in terms of sets.
► In image processing, we use morphology with two types of sets
of pixels: objects and structuring elements (SE’s).
► Typically, objects are defined as sets of foreground pixels.
► Structuring elements can be specified in terms of both
foreground and background pixels.
► In addition, structuring elements sometimes contain so-called
“don’t care” elements, denoted by ×, signifying that the value of
that particular element in the SE does not matter.
08/12/24 5
Mathematic Morphology…
► In this sense, the value can be ignored, or it can be made to fit a
desired value in the evaluation of an expression;
► For example, it might take on the value of a pixel in an image in
applications in which value matching is the objective.
► The structuring elements are used in a form similar to spatial
convolution kernels, and the image border just described is
similar to the padding.
► The operations are different in morphology, but the padding and
sliding operations are the same as in convolution.
08/12/24 6
Mathematic Morphology…
► Structuring elements are defined in the same manner, and the
second row in Fig. 9.1 shows an example.

08/12/24 7
Basic Set Theory
(a) (b) (c)
(d) and (e)

8
Basic Set Theory

9
Preliminaries (1)
► Reflection of set B is defined as

Bˆ  {w | w  b, for b  B}
 That is, if B is a set of points in 2-D, then ˆB is the set of points in B
whose (x, y) coordinates have been replaced by (−x,−y).

► 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}

08/12/24 10
Example: Reflection and Translation

08/12/24 11
Structure elements
► Structure elements (SE):
► Small sets or sub-images used to probe an image under study for properties
of interest
► Figure 9.2 shows several examples of digital sets (structuring elements) and
their reflection. The dot denotes the origin of
► the SE. Note that reflection consists simply of rotating an SE by 180° about
its origin, and that all elements, including the background and don’t care
elements, are rotated.

08/12/24 12
Examples: Structuring Elements (1)

origin

08/12/24 13
Examples: Structuring Elements (2)
Accommodate the
entire structuring
elements when its Origin of B visits
origin is on the every element of A
border of the
original set 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.

08/12/24 14
Structuring Elements, Hits & Fits

B Structuring Element

Fit: All on pixels in the


structuring element cover on
pixels in the image
A Hit: Any on pixel in the
C structuring element covers an
on pixel in the image

All morphological processing operations are based on these


simple ideas

08/12/24 15
Basic morphological operations
► Erosion

► Dilation

keep general shape but


► combine to smooth with respect to

 Opening object
 Closing background

16
Erosion

 Erosion of a set A by structuring element B: all z in A such


that B is in A when origin of B=z

08/12/24 17
Example of Erosion

08/12/24 18
Erosion Example
Original Image Processed Image With Eroded Pixels

08/12/24 Structuring Element 19


Erosion Example
Original Image Processed Image

08/12/24 Structuring Element 20


Erosion-Example

08/12/24 21
Erosion Example

Original image Erosion by 3*3 Erosion by 5*5


square structuring square structuring
element element

Watch out: In these examples a 1 refers to a black pixel!

08/12/24 22
Erosion Example

After erosion
Original
with a disc of
image
radius 10

After erosion After erosion


with a disc of with a disc of
radius 5 radius 20

08/12/24 23
Dilation

2
With A and B as sets in Z , the dilation of A by B,
denoted A  B, is defined as

 
 A
A  B= z | B
z

 and A
The set of all displacements z, the translated B
overlap by at least one element.

 
A  B  z |  B

  A  A
z  
08/12/24 24
Examples of Dilation

08/12/24 25
Dilation Example
Original Image Processed Image

08/12/24 Structuring Element 26


Dilation Example
Original Image Processed Image With Dilated Pixels

08/12/24 Structuring Element 27


Dilation

08/12/24 28
Dilation Example

Original image Dilation by 3*3 Dilation by 5*5


square structuring square structuring
element element

08/12/24 29

Watch out: In these examples a 1 refers to a black pixel!


Examples of Dilation

08/12/24 30
Duality
► Erosion and dilation are duals of each other with respect to
set complementation and reflection

 A  B
c 
 A B
c

and
 A  B
c 
 Ac  B

08/12/24 31
Duality

► Erosion and dilation are duals of each other with respect to


set complementation and reflection

 A  B  z |  B Z  A
c c

 z |  B Z  A  
c c

 z |  B Z  Ac  

 Ac  B

08/12/24 32
Duality

► Erosion and dilation are duals of each other with respect to


set complementation and reflection

    A  
c
 A  B
c 
 z| B
Z

 z |  B 
 A 
c

Z


 Ac  B

08/12/24 33
08/12/24 34
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

08/12/24 35
Opening and Closing

The opening of set A by structuring element B,


denoted A  B, is defined as
A B   A  B  B

The closing of set A by structuring element B,


denoted AB, is defined as
AB   A  B   B

08/12/24 36
Opening

The opening of set A by structuring element B,


denoted A  B, is defined as
A  B   B Z |  B Z  A

08/12/24 37
Opening Example

Original
Image

Image
After
Opening
08/12/24 38
Closing Example

Original
Image

Image
After
Closing
08/12/24 39
Useful: Opening & Closing

08/12/24 40
08/12/24 43
Duality of Opening and Closing

► Opening and closing are duals of each other with respect to set
complementation and reflection

ˆ
( A  B)  ( A  B) c c

08/12/24 44
The Properties of Opening and Closing

► Properties of Opening
(a) A  B is a subset (subimage) of A
(b) if C is a subset of D, then C  B is a subset of D  B
(c) ( A  B)  B  A  B
► Properties of Closing

(a) A is subset (subimage) of AB


(b) If C is a subset of D, then C B is a subset of DB
(c) ( AB)B  AB
08/12/24 45
08/12/24 46
The Hit-or-Miss
Transformation

if B denotes the set composed of


D and its background,the match
(or set of matches) of B in A,
denoted A  B,
A * B   A  D    Ac  W  D 

B   B1 , B2 
B1 : object
B2 : background
A  B   A  B1   ( Ac  B2 )
08/12/24 47

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy