morphology.is_local_maximum --> feature.peak_local_max
Sigmund
siggin at gmail.com
Fri Sep 6 04:39:06 EDT 2013
I'm using the Enthough Canopy 2.7.3 distribution.
>>> import skimage
>>> skimage.version.version
'0.8.2'
>>>
*the is_local_maximum function*
>>> import numpy as np
>>> from skimage.morphology import is_local_maximum
>>> a = np.zeros(5)
>>> a[2] = 2
>>> is_local_maximum(a)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File
"c:\users\neher\appdata\local\enthought\canopy\user\lib\site-packages\skimage\_shared\utils.py",
line 41, in wrapped
return func(*args, **kwargs)
File
"c:\users\neher\appdata\local\enthought\canopy\user\lib\site-packages\skimage\morphology\watershed.py",
line 297, in is_local_maximum
indices=False, exclude_border=False)
File
"c:\users\neher\appdata\local\enthought\canopy\user\lib\site-packages\skimage\feature\peak.py",
line 153, in peak_local_max
out[coordinates[:, 0], coordinates[:, 1]] = True
IndexError: index 1 is out of bounds for axis 1 with size 1
>>>
*the peak_local_max function*
>>> import numpy as np
>>> from skimage.feature import peak_local_max
>>> a = np.zeros(5)
>>> a[2]= 2
>>>
>>> a
array([ 0., 0., 2., 0., 0.])
>>> peak_local_max(a)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File
"c:\users\neher\appdata\local\enthought\canopy\user\lib\site-packages\skimage\feature\peak.py",
line 136, in peak_local_max
image[:, :min_distance] = 0
IndexError: too many indices
>>>
Thank you for your help!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/scikit-image/attachments/20130906/89096f34/attachment.html>
More information about the scikit-image
mailing list