In [1]:
%pylab inline
from skimage import (
    io as dataio, 
    feature, 
    filters, 
    measure, 
    morphology, 
)
Populating the interactive namespace from numpy and matplotlib

Opening the image

In [2]:
image = dataio.imread('https://imagej.nih.gov/ij/images/blobs.gif')
imshow(image, cmap='gray')
Out[2]:
<matplotlib.image.AxesImage at 0x7f6296dd9a20>

Finding maxima in a loop (and showing on plot each time)

In [3]:
for sigma in [2, 5, 10, 15, 20]:
    blurred = filters.gaussian(image, sigma=sigma)
    maxima = feature.peak_local_max(-blurred, min_distance=3)
    figure()
    imshow(blurred, cmap='gray')
    plot(maxima[:, 1], maxima[:, 0], 'y+')