0% found this document useful (0 votes)
16 views14 pages

Morphology

The document discusses morphological processing in image processing, focusing on the shapes represented in images and the use of local pixel features. It explains various morphological operations such as erosion, dilation, opening, closing, hit-or-miss transformation, border extraction, hole filling, thinning, and thickening, along with their definitions and applications. The document emphasizes the importance of structuring elements and their role in defining these operations.

Uploaded by

fire.smoke.yolo
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views14 pages

Morphology

The document discusses morphological processing in image processing, focusing on the shapes represented in images and the use of local pixel features. It explains various morphological operations such as erosion, dilation, opening, closing, hit-or-miss transformation, border extraction, hole filling, thinning, and thickening, along with their definitions and applications. The document emphasizes the importance of structuring elements and their role in defining these operations.

Uploaded by

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

.

Morphology

Methods for Image Processing

Morphological processing

► The morphology of an image describes the shapes


represented in the image.
► At a low level, the objects are represented as clusters
of pixels, which are distributed in the spatial plane
with a law that depends by the features of the
represented object.
► Morphology based processing techniques exploit
the a-priori knowledge on these
features.
► In particular, they make use of local features
of the neighboring pixels.
► The morphological processes can be
formalized as set operation on set of
points of the plane.
► For sake of simplicity, points
belonging to Z2 are considered, but the
morphological operation can be generalized for other
domains (e.g., Zn , or R2).

1
.

Morphological processing (2)

► They are easily defined on binary images, where


concepts of membership and
complement can be associated to the pixel binary
color, but they can be extended to gray level
images.
► A binary image, f , can be used for describing a set
of points of Z2, B:
► if f (x, y ) is white, (x, y ) ∈ B;
► if f (x, y ) is black, (x, y ) /∈ B.
► B = {(x, y ) | f (x, y ) = 1}
► Note: in the illustrative figures, the considered
sets are depicted in gray, while the
background is white.

Definitio
ns

(a) (b)
(c)

► Let a set, B, and the point origin, the operators reflection


and
translation can be defined.
► The reflection, Bˆ , is defined as: Bˆ = {−b | b ∈ B}.
► The translation of z , (B)z , is
defined as: (B)z = {b + z | b ∈ B}

2
.

Structuring element

► The morphological operations are generally


defined with respect to a particular
set, called structuring element.
► The structuring elements for images are
pixel arrays themselves.
► The structuring elements are defined
relatively an origin.
► Typically, it is the center of gravity.
► Structuring elements are described using the
following convention:
► filled cell: belong to the structuring element;
► void cell: does not belong to the structuring
element;
► cross: don’t care.

Structuring element (2)

3
.

Erosion
Given A and B, the erosion of A through B, A  B, is defined as:

A  B = {z | (B)z ⊆ A}

Equivalently, A eroded B can be defined as:

A  B = {z | (B)z ∩ Ac = ∅}

Erosion (2)
► If A and B are images, the morphological operations
are computed shifting the origin of the
structuring element in each pixel of the image A,
evaluating if the definition of the operation is
satisfied.
► Padding can be required.
► For the erosion:
► the origin of B is translated on a pixel a ∈ A;
► if all the elements of B are covered
by an element of A, the pixel a belong to A  B.

4
.

Morphological
filtering
► The erosion can be
used for
realizing a shape
based filtering
(morphological
filtering).
(a) 486×486 binary
image;
(b) erosion of (a) with
11×11 square
structuring element;
a (c) with 15×15 square;
b (d) and with 45×45
c square.
d ► Erosion cancels the
details smaller
than the
structuring
element.
Dilation

Given the sets A and B,


the dilation of A through B,
A⊕B, is defined as:

A ⊕ B = {z | (Bˆ )z ∩ A /=
∅}

Equivalently, A dilated B
can be defined as:

A ⊕ B = {z | ((Bˆ )z ∩ A)
⊆ A}

5
.

Dilation (example)

► The dilation has effects similar to those of the


lowpass filtering: the details are absorbed.
► In the considered case, the dilation engrosses the
characters, filling the spaces between
the fragments.

Duality
► Erosion and dilation are operations dual with
respect to the complement and reflection:

(A  B)c = Ac ⊕ Bˆ

and
(A ⊕ B)c = Ac  Bˆ
► If the structuring element is symmetric (Bˆ = B), the
erosion of A can be obtained dilating the
background, AC , with the same structuring
element, and complementing the result (vice versa
for the dilation).

6
.

Opening
The opening of a set A through B, A ◦ B, is defined as:

A ◦ B = (A  B) ⊕ B

Closing
The closing of a set A through B, A • B, is defined as:

A • B = (A ⊕ B) B

7
.

Opening and closing

► Opening and closing eliminate the details:


► opening eliminates protrusions and bridges that are too thin;
► closing fill the gulfs and the holes that are too narrow.
► They have a simple geometrical interpretation:
► opening results as the points of A covered by the translation
of
B along the inner border of A;
► closing results adding to A those
points of the background that are not covered by
the translation of B along the outer border of A.

Opening and closing properties

Like dilation and erosion, also the opening and closing


are dual operations with respect to complement and
reflection:
► (A • B)c = Ac ◦ Bˆ
► (A ◦ B)c = Ac • Bˆ

Besides, the following properties hold:


► A◦B⊆A⊆A•B
► (A ◦ B) ◦ B = A ◦ B
► (A • B) • B = A • B
► C⊆D⇒C◦B⊆D◦B
► C⊆D⇒C•B⊆D•B

8
.

Opening and closing: an example

► Opening and closing can be used for noise filtering.


► The fingerprint in A is affected by noise.
► Eroding, the outer noise is eliminated, but inner
noise is improved.
► Following with dilation, the original dimension of
the ridges can be recovered and the inner noise is
canceled.
► erosion + dilation = opening

A B
AB (A  B) ⊕ B = A ◦ B

Opening and closing: an example (2)

► Noise has been removed by the opening, but this


processing stage caused the interruption of some
ridges.
► By dilating, the continuity of the ridges can be
recovered.
► Then erosion can restore the original thickness of
the ridges.
► dilation + erosion = closing

(A ◦ B) ⊕
B
((A ◦ B) ⊕ B)  B = (A ◦ B) • B

9
.

Hit or miss
► The hit-or-miss transformation allows to detect
disjointed shapes.
► The objects have to be separated by
at least one background pixel.
► The processing is based on a structuring element
(shaped as the object to be detected) and its local
background (a window larger than the structuring
element).
► Let A a set constituted of several regions, A = C ∪ D
∪E,B
the shape to be detected and its local background,
B = (D, W − D) = (B1, B2).
► The hit-or-miss transform A ® B is defined as:

A ® B = A  D ∩ (Ac  (W − D))

► Equivalent definitions:

A ® B = A B1 ∩ Ac B 2


A ® B = A  B1 − Ac ⊕ Bˆ 2
Hit or miss (2)

10
.

Border extraction

► The border of A, β(A), can be obtained as:

β(A) = A − (A  B)

► The shape (and the size) of B affects the


thickness of the border.

Hole filling
► A hole is a background region surrounded by a
connected border of foreground elements.
► Let A a set containing 8-connected borders that
enclose a background region (holes), which have to
be filled (i.e., set to 1).
► The sequence X0, . . . , Xk can be constructed, where
X0 is a set containing a point of each hole and Xj
is defined as:

0 1 0 Xj = (X j − 1 ⊕ B) ∩ Ac
1 1 1
0 1 0
for B =

► The algorithm ends for a value of k such that Xk =


X k − 1 , Xk
contains all the filled holes.
► Hence, A ∪ Xk contains A without holes.
► The intersection with Ac constraints the dilation
inside of the region of interest.
11
.

Hole filling (2)

Hole filling: an example

a b c

► The binarized image of metallic spheres contains


inner regions caused by reflection.
► They can be eliminated using a hole filling algorithm:
(a) a starting position have to be selected
(manually or automatically);
(b) the hole filling procedure eliminate the
selected hole;
(c) the procedure can be repeated for each
hole.

12
.

Thinning

► The thinning of a set A through B, A ⊗ B, can be defined as:

A ⊗ B = A − (A ® B) = A ∩ (A ® B)c

► The hit-or-miss transformation here


used does not require the local background.
► Sometimes, defining different structuring elements
for different directions, {B} = {B1, . . . , Bn},
can simplify the procedure. They are applied
in sequence:

A ⊗ {B} = (· · · ((A ⊗ B 1 ) ⊗ B 2 ) · · · ) ⊗ Bn

► Then, the results can be further processed for


avoiding multiple paths (m-connectivity).

Thinning: an example

13
.

Thickening

► The thickening of a set A through B, A ⊗ B, can be


defined as:
A 0 B = A ∪ (A ® B)

► The hit-or-miss transformation


does not require the local background.
► It is the dual transformation of the thinning.
► It can be defined using a sequence of structuring
elements:

A 0 {B} = (· · · ((A 0 B 1 ) 0 B 2 ) · · · ) 0 Bn

where the structuring elements are the complements


of those used for the thinning.

Thickening: an example

► The thickening is often realized by thinning the


background.
► This method can produce disconnected points, which
have to be removed, but the thinned background
limits the thickening and the result is generally
better than that obtained through the
direct application of the thickening algorithm.

14

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