binary_fill_holes, but creating separate regions inside each other

Robin Wilson r.t.wilson.bak at googlemail.com
Sat Sep 21 05:12:49 EDT 2013


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/scikit-image/attachments/20130921/d1ac9ef8/attachment.html>


More information about the scikit-image mailing list