7 - Morphological Image Processing
7 - Morphological Image Processing
Image Processing
Morphological image processing
• Morphology:
A branch of biology that deals with the form and structure of
animals and plants
• Mathematical morphology:
A tool for extracting image components that are useful to
describe region shape, such as boundaries, skeletons and convex hull.
Morphological image processing
• Reflection of a set B
𝐵 𝑧 = 𝑐|𝑐 = 𝑏 + 𝑧, 𝑓𝑜𝑟𝑏 ∈ 𝐵
Examples of Reflection and
Translation
Morphological image processing
• Origin of SE
• The erosion of A by B,
𝐴Θ𝐵 = 𝑧| 𝐵 𝑧 ⊆𝐴
• Erosion of A by B is the set of all points z such that B, translated by z,
is contained in A.
•B has to be contained in A is equivalent to B not sharing any common
elements with the background
Erosion
Erosion
Erosion
𝐴 ∘ 𝐵 = 𝐴Θ𝐵 ⊕ 𝐵
Opening Properties:
• A o B is a subset of A
• If C is a subset of D, then C o B is a subset of D o B
• (A o B) o B = A o B
Closing properties:
• A is a subset of A ● B
• If C is a subset of D, then C ● B is a subset of D ● B
• (A ● B) ● B = A ● B
Closing
Hit-or-Miss Transformation
𝛽(𝐴) = 𝐴 − 𝐴Θ𝐵
Boundary extraction
Boundary extraction
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
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.