Structural processing of images
From ~1960s
- Erosion: shrinks objects
- Dilation: expands objects
- Open: erode then dilate
- Smooths images, removing small spurs, lines and noise
- Close: dilate then erode
- Fills gaps and holes while preserving thin lines
Extracting quantitative descriptions of image components:
- Boundaries
- Skeletons
- Convex hulls
Pixels are either object or non-object pixels.
Structuring element: smaller matrix applied to the image
Binary erode:
-
- Structuring element placed centered around every pixel: remove if any pixel of the structuring element overlaps with a non-object pixel
Binary dilation:
-
- Keep any pixels covered by the structuring element when placed at at least one location
Greyscale erode:
- Replace set operation with
operation -
Greyscale dilate:
Distance transform:
- Minimum distance of each pixel to non-object pixel
- Simple but inefficient: repeat erosion operation until all pixels gone; distance is the number of erosion operations required before the pixel disappeared
- Structuring element:
- Chessboard: pixels sharing corners or edges are both have a distance of 1. 3 by 3 square structuring element
- Manhattan: 3 by 3 cross structuring element
Skeleton transform:
- Reduces regions to one-pixel line thick borders
- Methods:
- Distance transform: create by finding pixels with a distance of 1
- Thinning: repeatedly thin image, retaining end points/connections
Convex hull:
- Follow outlines of object, except concavities