[SciPy-Dev] Splines

Charles R Harris charlesr.harris@gmail....
Wed Mar 13 14:48:13 CDT 2013


On Wed, Mar 13, 2013 at 12:54 PM, denis <denis-bz-py@t-online.de> wrote:

> Charles R Harris <charlesr.harris <at> gmail.com> writes:
>
> > I'm not sure you are interpreting 'prefilter' correctly. I haven't
> looked at
> the scipy code, but the uniform spline coefficients can be gotten by
> filtering
> forward and back along each axis. It essentially factors the fit matrix
> into
> lower/upper factors with constant diagonals modulo boundary conditions, and
> forward/reverse substitution reduces to IIR filtering. This is also used
> for
> other interpolation schemes, for instance variance preserving interpolation
> which is useful when matching scenes using mutual information.Chuck
>
> Chuck,
>   is "prefilter=True will filter out high frequencies in the data"
> not correct ?


No, I suspect it increases the high frequencies ;) For cubic splines
convolving the coefficients with [1/6, 2/3, 1/6] will reproduce the sample
values, so to get the spline coefficients you need to deconvolve what is
essentially a low pass filter. Direct deconvolution is numerically
unstable, so you need to factor the kernel and run one factor forward and
the other backwards to get the coefficients.

It's a pure preprocessing step,
> spline_filter in ndimage/interpolation.py
> iterates spline_filter1d Bspline smoothing along each axis.
>
> How about running some testfunctions with / without prefilter,
> do you know of any real or realistic ?
>
>
Chuck
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/scipy-dev/attachments/20130313/85fad4cf/attachment.html 


More information about the SciPy-Dev mailing list