5.1 Introduction
mathematical morphology works on shape
shape: prime carrier of information in machine vision
morphological operations: simplify image data,
preserve essential shape characteristics, eliminate irrelevancies
shape: correlates directly with decomposition of objects, object features,
object surface defects, assembly defects
5.2 Binary Morphology
set theory: language of binary mathematical morphology
sets in mathematical morphology: represent shapes
Euclidean
-space:
discrete Euclidean
-space:
: hexagonal grid, square grid
dilation, erosion: primary morphological operations
opening, closing: composed from dilation, erosion
opening, closing: related to shape representation, decomposition, primitive
extraction
5.2.1 Binary Dilation
dilation: combines two sets by vector addition of set elements
dilation of
by
:
dilation by disk: isotropic swelling or expansion
=====Fig. 5.2=====
dilation by kernel without origin: might not have common pixels
with
translation of dilation: always can contain
=====lena.bin.128=====
=====lena.bin.dil=====
for noise removal
: set of four 4-neighbors of (0,0) but not (0,0)
4-isolated pixels removed
only points in
with at least one of its 4-neighbors remain
: translation of
by the point
addition associative
dilation associative
dilation of translated kernel: translation of dilation
dilating by union of two sets: the union of the dilation
dilation preserves order
5.2.2 Binary Erosion
erosion: morphological dual of dilation
erosion of
by
: set of all
s.t.
for every
erosion: difference of elements
and
dilation: union of translates
erosion: intersection of negative translates
erosion: shrinking of the original image
antiextensive: operated set contained in the original set
erosion antiextensive: if origin contained in kernel
if
then
because:
if
then
for every
, since
thus
eroding
by kernel without origin can have nothing in common with
=====Fig. 5.5=====
possible:
and
e.g.
, then
,
yet
dilating translated set results in a translated dilation
dilation, erosion similar that one does to foreground, the other to background
similarity: duality
dual: negation of one equals to the other on negated variables
DeMorgan's law: duality between set union and intersection
negation of a set in two possible ways in morphology
: reflection about the origin of
complement of erosion: dilation of the complement by reflection
Theorem 5.1: Erosion Dilation Duality
erosion of intersection of two sets: intersection of erosions
chain rule for erosion holds when kernel decomposable through dilation
genus
: number of connected components minus number of holes of
4-connected for object, 8-connected for background
5.2.3 Hit-and-Miss Transform
hit-and-miss: selects corner points, isolated points, border points
hit-and-miss: performs template matching, thinning, thickening, centering
hit-and-miss: intersection of erosions
kernels satisfy
hit-and-miss of set
by
hit-and-miss: locate particular spatial patterns
then
:
set of all 4-isolated pixels
hit-and-miss: to compute genus of a binary image
hit-and-miss: thickening and thinning
hit-and-miss: counting
hit-and-miss: template matching
5.2.4 Dilation and Erosion Summary
=====dilation and erosion summary, p. 173=====
=====Garfield 17:5=====
5.2.5 Opening and Closing
dilation and erosions: usually employed in pairs
: opening of image
by kernel
opening characterization theorem
unlike erosion and dilation: opening invariant to kernel translation
: those pixels covered by sweeping kernel all over inside of
closing: dual of opening
opening idempotent
if
not necessarily follows that
=====Fig. 5.22=====
closing may be used to detect spatial clusters of points
=====Fig. 5.23=====
5.2.6 Morphological Shape Feature Extraction
morphological pattern spectrum: shape-size histogram [Maragos 1987]
5.2.7 Fast Dilations and Erosions
decompose kernels to make dilations and erosions fast
5.3 Connectivity
morphology and connectivity: close relation
5.3.1 Separation Relation
separation if and only if
symmetric, exclusive, hereditary, extensive
5.3.2 Morphological Noise Cleaning and Connectivity
images perturbed by noise can be morphologically filtered to remove some noise
5.3.3 Openings, Holes, and Connectivity
opening can create holes in a connected set that is being opened
=====Fig. 5.25=====
5.3.4 Conditional Dilation
select connected components of image that have nonempty erosion
conditional dilation
, defined iteratively
are points in the regions we want to select
5.4 Generalized Openings and Closings
generalized opening: any increasing, antiextensive, idempotent operation
generalized closing: any increasing, extensive, idempotent operation
=====Oldie 33:18=====
5.5 Gray Scale Morphology
binary dilation, erosion, opening, closing naturally extended to gray scale
extension: uses min or max operation
gray scale dilation: surface of dilation of umbra
gray scale dilation: maximum and a set of addition operations
gray scale erosion: minimum and a set of subtraction operations
5.5.1 Gray Scale Dilation and Erosion
top: top surface of
: denoted by
:
and
, then
gray scale erosion: surface of binary erosions of one umbra by the other umbra
and
, then
5.5.2 Umbra Homomorphism Theorems
surface and umbra operations: inverses of each other, in a certain sense
surface operation: left inverse of umbra operation
5.5.3 Gray Scale Opening and Closing
gray scale opening of
by kernel
: denoted by
gray scale closing of
by kernel
: denoted by
duality of gray scale dilation, erosion
duality of opening,
closing
5.6 Openings, Closings, and Medians
median filter: most common nonlinear noise-smoothing filter
median filter: for each pixel, the new value is the median of a window
median filter: robust to outlier pixel values, leaves edges sharp
median root images: images remain unchanged after median filter
5.7 Bounding Second Derivatives
opening or closing a gray scale image: simplifies the image complexity
5.8 Distance Transform and Recursive Morphology
Fig. 5.39 (b) fire burns from outside but burns only downward and right-ward
=====Fig. 5.39=====
5.9 Generalized Distance Transform
5.10 Medial Axis
medial axis transform: medial axis with distance function
5.10.1 Medial Axis and Morphological Skeleton
morphological skeleton of a set
by kernel
, where
5.11 Morphological Sampling Theorem
5.11.1 Set-Bounding Relationships
5.11.2 Examples
5.11.3 Distance Relationships
=====Garfield 17:7=====
5.12 Summary
morphological operations: shape extraction, noise cleaning, thickening
morphological operations: thinning, skeletonizing