Hi,
I am currently using various skimage functions to perform a customised edge-based image segmentation. Once I've got the outlines of my segments, I am using binary_fill_holes to fill them so I get a binary 'blobs' image, which I can then label, and use for processing.
However, when I have an image like this
0 0 0 0 0 0 0 0 0
0 1 1 1 1 1 1 1 1
0 1 0 0 0 0 0 0 1
0 1 0 1 1 1 1 0 1
0 1 0 1 0 0 1 0 1
0 1 0 1 0 0 1 0 1
0 1 0 1 0 0 1 0 1
0 1 0 1 1 1 1 0 1
0 1 0 0 0 0 0 0 1
0 1 1 1 1 1 1 1 1
binary_fill_holes simply fills the entire, outer shape - and thus the shape in the middle gets lost.
Is there any simple way to do a fill so that I get two regions: the outer ('donut-shaped') region and the inner region? Or will I have to develop and implement my own algorithm to do this?
Any advice would be great,
Thanks,
Robin