I have a region, created with threshold on the H channel of a image. Now i have a new Region, and reduced its domain to have a new image.
On this new image, I need to count the holes. By holes I mean areas where there are no pixels.
For example, if I have a red board with blue squares on it, and select the reds, I would get a new image filled with square holes where the blue squares were.
How can I get the number of those holes?
I have done it like this, but there must be a better way:
threshold(ImageHGreenReduced, RegionHGreenReduced, 0 ,255)
connect_and_holes(RegionHGreenReduced, NumConnected, NumberCrateWindows)