
31 Jul
2013
31 Jul
'13
3:55 p.m.
Hello all,
Based on the discussion here: https://groups.google.com/forum/#!topic/pythonvision/AVrnueiKKYI
It seems like this label function should be faster than the scipy version. However, I find it to be much slower:
from skimage import morphology from scipy import ndarray as nd
k = np.zeros((4000,4000),dtype=int) k[100,100] = 1 strel = np.ones((3,3))
%timeit morphology.label(k)
1 loops, best of 3: 1.46 s per loop
%timeit nd.label(k,strel)
1 loops, best of 3: 355 ms per loop
If you have any insight, I would be very grateful. I am using version 0.8.2 on the versions of python/numpy/cython, etc. included in the most recent edition of Enthought/Canopy.
Thanks,
Evan Daugharthy
3785
Age (days ago)
3785
Last active (days ago)
0 comments
1 participants
participants (1)
-
Evan Daugharthy