8-way Connected Components
The Levialdi morphological operator is the basis for a simple program to find 8-way connected components
- Assume an array of binary pixels
- Define connectedness 8-ways
- Reduce each component to the lower right corner of its bounding box using morphology:
- When an isolated pixel is removed, count it