Suppose we have an image, like so:
and I managed to create its MorphologicalGraph by using
p1 = Binarize[*the image*]; p2 = Thinning[Pruning[Thinning[DeleteSmallComponents[ColorNegate[DeleteSmallComponents[p1, 300]], 300]]]] MorphologicalGraph[p2]
Which gave the result of
If we overlay the two, we can see how most of it lines up. Is there a way to extract the white parts in the image individually? I'm thinking of using
MorphologicalGraph to extract the enclosed spaces, but any method / tip that can achieve extracting the white parts individually is perfect and greatly appreciated.