This site is devoted to mathematics and its applications. Created and run by Peter Saveliev.

How do you count holes in a binary image?

From Intelligent Perception

Jump to: navigation, search

Question: How do you count holes in a binary image?

One can simply invert the image and then count the objects in the negative.

You can still count the objects in the original image. The problem is that you can't easily associate an object and its holes. For that consider the algorithm here.