I have a monochrome bitmap image, and I wish to find fully bound holes in the image. Only holes that are fully bound by black pixels should be included:
0000000000
0001111100
0010000010
0001000110
0000111100
0000000000
has one hole
but
0100000010
0100000110
0011111100
0000000000
would have 0
This is somewhat similar to CCL (Connected Component Labelling). If you invert the bitmap then you are just looking for 4-connected blobs which do not touch the edge of the image frame.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With