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
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
Hi Yan, I actually really want to pilfer a lot of your code, but I find it hard to understand/follow. If you have a chance, annotations on your code would make it really useful to put it into scikit-image (I’d be happy to write tests etc.). I specifically am interested in your fast morphology and your ridge detection algorithms. Some suggestions: - Increase variable names to be more descriptive. For example in findmax, what is sta? I have no idea. idx is used in various places with different meanings. etc. - For each function, add a docstring describing what it does, perhaps with some doctest example. Some functions are self explanatory but many are not. - add a few comments in the code for the critical parts of each algorithm, possibly with references back to a paper/wikipedia entry I know you are super busy but at this stage you are the best placed to do this work — it would take me a long time to reverse engineer the algorithm based on your code! Juan. On 12 Apr 2018, 5:08 PM +1000, 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
participants (3)
-
imagepy@sina.com
-
Juan Nunez-Iglesias
-
Yann GAVET