Hello all, actually, local_maxima should be equivalent to h-maxima, with h=1 h-maxima (and also local_maxima) give non ponctual locations. There might be a need for a function of ultimate erosion. Does it exist somewhere ? I totally agree with you, the official watershed demo should be modified. Yann GAVET Assistant Professor - Ecole des Mines de Saint-Etienne 158 Cours Fauriel, 42023 Saint-Etienne cedex 2, FRANCE Tel: (33) - 4 7742 0170 On 04/12/2018 09:08 AM, imagepy@sina.com wrote:
Hi,everyone
I think we should not use peak_local_max for find watershed's seeds. why not use h_maxima? which can give a h tolerance. I think if we should replace it in the official demo? It would cause a misunderstanding.
And scikit-image's h_maxima, h_minima is very slow. here I implements one with numba, https://github.com/Image-Py/imagepy/blob/master/imagepy/ipyalg/hydrology/fin.... you can see if it is useful.
yxdragon ----- 原始邮件 ----- 发件人:Stefan van der Walt <stefanv@berkeley.edu> 收件人:"Mailing list for scikit-image (http://scikit-image.org)" <scikit-image@python.org> 主题:Re: [scikit-image] local maxima improvements 日期:2018年04月12日 03点08分
On Wed, 11 Apr 2018 12:44:45 +1000, Juan Nunez-Iglesias wrote:
In [7]: image Out[7]: array([[ 0., 0., 0., 0., 0., 0.], [ 0., 1., 0., 0., 0., 0.], [ 0., 0., 0., 0., 0., 0.], [ 2., 2., 2., 4., 4., 2.], [ 2., 2., 2., 4., 4., 2.], [ 2., 2., 2., 2., 2., 2.]])
In [15]: feature.peak_local_max(image) In [17]: image_peak[tuple(feature.peak_local_max(image).T)] = 1
In [18]: image_peak Out[18]: array([[ 0., 0., 0., 0., 0., 0.], [ 0., 1., 0., 0., 0., 0.], [ 0., 0., 0., 0., 0., 0.], [ 0., 1., 0., 1., 1., 0.], [ 0., 1., 0., 1., 1., 0.], [ 0., 0., 0., 0., 0., 0.]]) That output in column 1 looks highly suspect! This is a great example for a regression test, thanks Yann. Stéfan
scikit-image mailing list scikit-image@python.org https://mail.python.org/mailman/listinfo/scikit-image
_______________________________________________ scikit-image mailing list scikit-image@python.org https://mail.python.org/mailman/listinfo/scikit-image