[SciPy-User] How to find local minimum of 1d histogram

David Warde-Farley dwf@cs.toronto....
Fri Nov 27 15:12:15 CST 2009

On 27-Nov-09, at 2:49 PM, Michael Aye wrote:

> The minimum between the gaussian-like peaks in the histogram shall be
> used as the masking limit to either show one or the other population
> of pixel intensities.
> My idea so far, but I'm not sure, if there is not a more obvious way?
> * Using interpolate1d to get a spline.
> * somehow get the coefficients of the spline function.
> * put them into poly1d
> * do derivative
> * get roots of derivative

I had a similar problem, actually, and used  
scipy.ndimage.gaussian_laplace, which will produce a smoothed discrete  
second derivative. The minimum should be pretty easy to locate (it  
will appear as a rather significant maximum peak in the transformed  


More information about the SciPy-User mailing list