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

josef.pktd@gmai... josef.pktd@gmai...
Fri Nov 27 16:07:49 CST 2009


On Fri, Nov 27, 2009 at 4:12 PM, David Warde-Farley <dwf@cs.toronto.edu> wrote:
>
> 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
> curve).

In a similar direction, I thought of using gaussian_kde to get a
smoothed probability distribution. and look for local minimum.

Josef

>
> David
> _______________________________________________
> SciPy-User mailing list
> SciPy-User@scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-user
>


More information about the SciPy-User mailing list