![](https://secure.gravatar.com/avatar/b8db648ce5b0b58a7dda6eab71e5a98f.jpg?s=120&d=mm&r=g)
May 6, 2012
4:49 a.m.
(http://luispedro.org/software/pymorph#see-also):
"mahotas is another Python image processing package, but most of its functions are in C++. It is, therefore, much faster for the operations it supports."
Skeletonization with "pymorph" is indeed very very slow I found very nice example how to do this just with "ndimage" and in a blink of a second time: ======================================== def sk(i, r): x = ndimage.distance_transform_edt(i) y = ndimage.morphological_laplace(x, (r, r)) return y < y.min()/2 ======================================== For example in pylab mode: In [1]: from scipy import ndimage In [2]: im = imread('clip.png')[:,:,0] In [3]: imshow(sk(im, 5), cmap='binary', interpolation='nearest')