I have a monochrome bitmap and I want to find the fully connected holes in the image. Only holes that are completely connected by black pixels should be included:
0000000000 0001111100 0010000010 0001000110 0000111100 0000000000
has one hole
but
0100000010 0100000110 0011111100 0000000000
would have 0
Razor storm
source share