[SciPy-User] how can I create B-splines of mutidimensional values?
Kay F. Jahnke
_kfj@yahoo....
Mon Nov 28 05:30:24 CST 2011
Hi group!
I have the following problem: I have multidimensional values which I have
sampled over a 2D grid. Now I want to interpolate the values (using B-spline
interpolation) for arbirary (x,y) locations.
Obviously this can be done by creating a separate B-spline for each dimension of
of the values, interpolating at (x,y) and putting the results of the
interpolations together, forming the multidimensional result.
For performance reasons, this approach isn't optimal, though. Since the splines
are evaluated at the same location, a fair deal of the calculations would be
identical. But I haven't found a way to create a B-spline of the
multidimensional values to exploit the fact that I'm evaluating several splines
at the same position.
I suppose my problem would be quite common - one typical case would be RGB image
data: it would be silly to have separate splines for the R,G and B channels and
triplicate the part of the calculation which only depends on the position where
a value is interpolated. What I'm missing is a mechanism to calculate the spline
with n-dimensional coefficients and interpolation routines yielding
multidimensional values when used with these n-dimensional spline coefficients.
Am I missing something? I'm not very proficient with numpy/scipy, so maybe I
just can't see the obvious...
Helpful hints welcome.
Kay
More information about the SciPy-User
mailing list