For each pixel I (i, j) do
If I (i, j) has not already been processed
Then Save (i, j), Growth (i, j),
Increment Region
end for
Growth (i, j)
For any Pixel (k, l) adjacent to I (i, j)
% For all 8-pixels If (Pixel (k, l) not already processed)
AND (Criterion (Pixel (k, l)) = Criterion (I (i, j))
Then Growth (k, l)
end for