[Numpy-discussion] finding connected areas?

Alexandre Fayolle alexandre.fayolle at logilab.fr
Mon Jun 19 04:02:34 EDT 2006

I'm bringing back the discussion on list. 

On Mon, Jun 19, 2006 at 12:01:27AM +0100, stephen emslie wrote:
> >
> >You will get this in numarray.nd_image, the function is
> >called label. It is also available in recent versions of scipy, in
> >module scipy.ndimage.
> Thanks for pointing me in the right direction. I've been playing around with
> this and I'm getting along with my problem, which is to find the areas of
> the connected components in the binary image. ndimage.label has been a great
> help in identifying and locating each shape in my image, but I am not quite
> sure how to interpret the results. I would like to be able to calculate the
> area of each slice returned by ndimage.labels. Is there a simple way to do
> this?

Yes, you will get an example in
> Also, being very new to scipy I dont fully understand how the slice objects
> returned by label actually work. Is there some documentation on this module
> that I could look at?


Alexandre Fayolle                              LOGILAB, Paris (France)
Formations Python, Zope, Plone, Debian:  http://www.logilab.fr/formations
Développement logiciel sur mesure:       http://www.logilab.fr/services
Informatique scientifique:               http://www.logilab.fr/science
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 481 bytes
Desc: Digital signature
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20060619/72eb78f0/attachment-0001.sig>

More information about the NumPy-Discussion mailing list