%pylab inline
from skimage import (
io as dataio,
feature,
filters,
measure,
morphology,
)
image = dataio.imread('https://imagej.nih.gov/ij/images/blobs.gif')
imshow(image, cmap='gray')
blurred = filters.gaussian(image, sigma=5)
imshow(blurred, cmap='gray')
Note:
maxima = feature.peak_local_max(-blurred, min_distance=10)
imshow(blurred, cmap='gray')
plot(maxima[:, 1], maxima[:, 0], 'y+')
maxima_image = feature.peak_local_max(-blurred, min_distance=10, indices=False)
props_table = measure.regionprops_table(
measure.label(maxima_image), image,
properties=['centroid', 'max_intensity'])
import pandas as pd
pd.DataFrame(props_table)