from machinevisiontoolbox import Image
hist = Image.Read('street.png').hist()
x = hist.peaks(scale=20)
idx = np.searchsorted(hist.x, x)
idx = np.clip(idx, 0, len(hist.x) - 1)
plt.plot(x, hist.h[idx], 'ko', markersize=10)