I have been trying to find a way to separate the various closed paths that can be output by
EdgeDetect. For example, taking the output of:
I'd like to be able to obtain a list like:
I'd really love to show some progress I made on this, but to be honest, I'm stuck at the beginning. I really don't know how to attack this one. The naïve approach might be to take one black pixel, then go around it registering adjacent pixels as part of the same path, while erasing them from the original image. But I don't expect this to be anything other than painfully slow, and there probably are some Mathematica image manipulation functions that I could leverage. So, how would you advise me to start?