[scikit-image] local maxima improvements
Stefan van der Walt
stefanv at berkeley.edu
Wed Apr 11 15:07:58 EDT 2018
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
More information about the scikit-image
mailing list