Re: cubic convolution interpolation at boundaries?




In article <1177481694.875563.80280@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
Markus <iandjohn@xxxxxxxxx> writes:
I am using the symmetric cubic convolution kernel ("Catmull-Rom
splines") to interpolate data over a limited range in a variable x.
For the interpolation I am using between 8 and 12 nodes which are
equidistant in x.
Example: The interpolated function between nodes 4 and 5 is computed
based on the data points at nodes 3,4,5,6

My question is: how should I treat the ranges near the boundary?
If I am using 10 nodes, how should I interpolate the data between node
9 and 10? So far I am using linear interpolation here - but this is
conceptually ugly (and it's not precise, although the latter is not my
biggest problem since I want a _nice_ solution).
I am especially worried that in my current approach the interpolated
function has no continuous 1st derivative at node 9.

Is there a solution, in which I could use e.g. a non-symmetric
convolution kernel to interpolate between nodes 9 and 10, based on the
nodes 8,9,10 or maybe 7,8,9,10 - and which results in a continuous 1st
derivative everywhere?
I have not found any discussion about the boundary-treatment in the
literature (and neither on the Google-wide web). In image processing
sometimes people mirror the image at the boundaries (i.e. they would
introduce a hypothetical 11th node for which the data value is set
equal to the data at the 9th node and interpolate using the data
points at nodes 8,9,10,11) - but this would not work in my case.

Any help is appreciated!
Markus


I take the case 10 nodes, node 9: what if you interpolate cubically the data
function, derivative, second derivative at node 9 (already given since you
have already done node 9, and the function value at node 10?
this gives you a smooth curve and is as precise as a usual spline.
or: first approximate the first derivative at _every_ node by cubic
interpolation, taking
nodes 1,2,3,4 for node 1
i,i+1,i+2,i+3 for node i+1, i=1,...7,
node 7,8,9,10 for node 8,
node 7,8,9,10 for node 9
node 7,8,9,10 for node 10 (i.e. the same polynomial, the derivative evaluated at
different nodes.
then you have O(h^3) precise derivatives everywhere and now can use simple
cubic hermite interpolation between node i,i+1 for i=1,..9.
this is also O(h^4) precise, but only C^1 everywhere

hth
peter


.



Relevant Pages

  • 2D and 3D spline coefficient computation
    ... I am trying to figure out how to interpolate best in 2D and 3D on ... regular grids using splines. ... different directions, i.e. calculate a spline along the x-axis and then ... not on the pure 2nd derivatives. ...
    (sci.math.num-analysis)
  • Re: Interpolation w/ cubic convolution kernel - boundary treatment?
    ... splines") to interpolate data over a limited range in a variable x. ... A nice property of the Catmull-Rom splines is that I get a continuous ... Unfortunately there are no constraints on the slope. ...
    (comp.dsp)
  • interpolation w/ cubic convolution kernel: boundary treatment?
    ... splines") to interpolate data over a limited range in a variable x. ... A nice property of the Catmull-Rom splines is that I get a continuous ...
    (sci.math.num-analysis)
  • Re: interp2 partial derivatives
    ... I would like to to interpolate in 2d using the interp2 command. ... Furthermore I need the partial derivatives of the interpolating function. ...
    (comp.soft-sys.matlab)
  • Re: Interpolation w/ cubic convolution kernel - boundary treatment?
    ... I am using the symmetric cubic convolution kernel ("Catmull-Rom ... splines") to interpolate data over a limited range in a variable x. ... A nice property of the Catmull-Rom splines is that I get a continuous ... sometimes people mirror the image at the boundaries (i.e. they would ...
    (comp.dsp)