[SciPy-User] evaluating B-Splines made with scipy.signal.cspline2d?
Charles R Harris
Wed Nov 9 13:08:44 CST 2011
On Wed, Nov 9, 2011 at 10:19 AM, Kay F. Jahnke <firstname.lastname@example.org> wrote:
> I did have lines over 80 chars after all...
> Zachary Pincus <zachary.pincus <at> yale.edu> writes:
> > This doesn't answer your specific question, but look at
> > scipy.ndimage.map_coordinates()
> > for general-purpose spline interpolation of regularly-spaced (e.g. image)
> > data. If you want to repeatedly interpolate the same data, you can get
> > spline coefficients with:
> > scipy.ndimage.spline_filter() and pass them to map_coordinates()
> > with the "prefilter=False" option.
> Thank you very much for your helpful hint. I tried out the code you
> and it seems to do just what I want. It seems to me that I can also
> process the
> coefficient matrix I get from signal.cspline2d() with
> as well as being able to have ndimage.spline_filter() generate the
> though the coefficient matrices the two routines provide aren't identical.
I believe they both use the same algorithm, i.e., uniform b-splines and
prefiltering to get the coefficients, but the boundary conditions may be
different. I think the one in signal uses reflection at the ends, which is
the common case. Of course, one of the routines may also be buggy ;)
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the SciPy-User