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

Michael Aye kmichael.aye@googlemail....
Fri Nov 27 13:49:10 CST 2009


Hi!

I am still fairly new with scipy, so please forgive me, if this is a
simple question. But I couldn't find an example for this.

What is the easiest way of finding the local minimum between 2
gaussian-like peaks in a 1d Histogram?

Background:
Using a histogram on an image to identify 2 populations of
intensities.
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 am ready to go this way, but I wondered if it isn't easier?

Best regards and a nice weekend!
Michael


More information about the SciPy-User mailing list