Chapter 9: Morphological Image Processing
9.1 Preliminaries
- Morphology studies the shape and structure of objects.
- Operates on binary and grayscale images using set theory.
- Structuring Element (SE): A predefined shape used for probing the image.
Basic Operations:
- Erosion (A - B): Shrinks objects; removes boundary pixels.
- Dilation (A + B): Expands objects; adds pixels to boundaries.
- Opening (A open B): Erosion followed by dilation; removes small objects.
- Closing (A close B): Dilation followed by erosion; fills small holes.
9.2 Erosion and Dilation
Erosion:
A - B = {z | Bz A}
- Reduces object size, disconnects thin objects.
Dilation:
A + B = {z | (B)z INTERSECT A != }
- Expands objects, connects close components.
9.3 Opening and Closing
Opening: A open B = (A - B) + B
- Removes small objects and smoothes contours.
Closing: A close B = (A + B) - B
- Fills small holes, connects nearby objects.
9.4 Hit-or-Miss Transformation
A H-M (B1, B2) = (A - B1) INTERSECT (A_complement - B2)
- Detects specific configurations of pixels.
- Used in shape detection and template matching.
9.5 Some Basic Morphological Algorithms
9.5.1 Boundary Extraction:
Boundary(A) = A - (A - B)
- Extracts outer boundary of objects.
9.5.2 Hole Filling:
X_k = (X_{k-1} + B) INTERSECT A_complement
- Fills holes using seed points and iteration.
9.5.3 Connected Components:
X_k = (X_{k-1} + B) INTERSECT A
- Isolates connected regions from seed.
9.5.4 Convex Hull:
- Uses directional SEs iteratively to generate convex envelope.
9.5.5 Thinning:
Reduces objects to lines while preserving shape and connectivity.
9.5.6 Thickening:
Opposite of thinning; adds pixels to grow object structures.
9.5.7 Skeletons:
S(A) = UNION (A - kB) - [(A - kB) open B]
- Extracts object skeletons.
9.5.8 Pruning:
- Removes small spurs from skeletons for simplification.
9.5.9 Morphological Reconstruction:
F_k = (F_{k-1} + B) INTERSECT G
- Reconstructs image from a marker constrained by a mask.
9.5.10 Summary Table:
- Erosion: Shrinks objects
- Dilation: Grows objects
- Opening: Removes small noise
- Closing: Fills holes
- Hit-or-Miss: Pattern detection
- Thinning: Skeletonization
- Reconstruction: Shape recovery