Transcript Chapter 4

Chapter 9
Morphological Image Processing
Preview
Morphology: denotes a branch of
biology that deals with the form and
structure of animals and plants.
Mathematical morphology: tool for
extracting image components that are
useful in the representation and
description of region shapes.
Filtering, thinning, pruning.
Scope
Will focus on binary images.
Applicable to other situations. (Higherdimensional space)
Set Theory
Empty set
Subset
Union
Intersection
Disjoint sets
Complement
Difference
Reflection of set B: Bˆ  {w | w  b for b  B}
Translation of set A by point
z=(z1,z2): ( A)z  {c | c  a  z, for a  A}
Logic Operations
AND
OR
NOT
Dilation
With A and B as sets in Z2, the dilation of A
by B is defined as:
A  B  {z | ( Bˆ ) z  A  }
Or, equivalently, A  B  {z | [(Bˆ ) z  A]  A}
B is commonly known as the structuring
element.
Illustration
Example
Erosion
With A and B as sets in Z2, the erosion of A
by B is defined as:
AB  {z | ( B) z  A}
Dilation and erosion are duals:
( AB)  A  Bˆ
c
c
Illustration
Example: Removing image
components
Opening and Closing
Opening of set A by structuring element B:
A  B  ( AB)  B
Erosion followed by dilation
Closing of set A by structuring element B:
A  B  ( A  B)B
Dilation followed by erosion
Opening
Opening generally smoothes the contour of
an object, breaks narrow isthmuses,
eliminate thin protrusions.
Closing
Closing tends to smooth contours, fuse
narrow breaks and long thin gulfs, eliminate
small holes, fill gaps in the contour.
Illustration
Example
Hit-or-Miss Transform
Shape detection tool
A  B  ( AX )  [ Ac(W  X )]
Boundary Extraction
Definition:  ( A)  A  ( AB)
Region Filling
Beginning with a point p inside the boundary,
repeat:
X k  ( X k 1  B)  Ac
with X0=p
Until Xk=Xk-1
Conditional dilation
Example
Extraction of Connected
Component
Beginning with a point p of the connected
component, repeat:
X k  ( X k 1  B)  A
with X0=p
Until Xk=Xk-1
The connected component Y=Xk
Illustration
Example
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 of an arbitrary set S
is the smallest convex set containing S.
H-S is called the convex deficiency of S.
C(A): convex hull of a set A.
Algorithm
Four structuring elements: Bi, i=1,2,3,4
Repeat X ki  ( X k 1  Bi )  A
with X0i =A until Xki=Xk-1i to obtain Di
4
The convex hull of A is: C ( A)   Di
i 1
Illustration
Thinning
The thinning of a set A by a structuring
element B is defined as:
A  B  A  ( A  B)  A  ( A  B)c
Illustration
Thickening
A  B  A  ( A  B)
Skeleton
Skeleton: Definition
K
S ( A)   Sk ( A)
k 0
Sk ( A)  ( AkB)  ( AkB)  B
( AkB)  (...(AB)B)...)B k times
K  max{k | ( AkB)  }
Illustration
Pruning
Extension to Gray-Scale Images
Dilation Max
Erosion Min
Illustration
Opening and Closing
Smoothing and Gradient