Connected Components

A mask tells us which pixels were selected. To count regions, we need a definition of connected and a way to give each reachable group its own label.

13 sections · 4 questions · 2 coding challenges

1 / 13

Following Regions Through a Digital Picture

BOTIE

Rosenfeld and Pfaltz's 1966 work addressed sequential operations on digital pictures, including the organisation of picture regions. A computer needs explicit local relationships where a person might simply see a connected shape.

Modern connected-component routines expose the same essential choice: which neighbouring positions may connect? We will use a simple flood fill so every step is visible. It illustrates the task, rather than reproducing the historical paper's algorithm.

Sources for this history