Re: cubic convolution interpolation at boundaries?



Markus wrote:
On Apr 25, 5:00 pm, Fred Krogh <fkr...@xxxxxxxxxxxxxxxx> wrote:
Markus wrote:
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
The algorithm here,http://mathalacarte.com/cb/mom.fcg/ya58, generates
an interpolant with a continuous derivative. For the cubic case the
interpolant can be thought of as a linear combination of two quadratics
if there are two points on either side of the interpolation point. If
there are not two points on either side of the interpolation point, then
the quadratic using the nearest three points is used. For more details
see the link above.
Fred


This sounds pretty good. I think that my cubic convolution
interpolation kernel (the Catmull-Rom splines) is exactly what you
describe: a linear combination of two quadratics. And it is
straightforward to use your proposed method to compute the
interpolated result within the range near the boundary,
But my point is that I'm interested in how the _kernel_ looks like and
I'm not sure how to derive the kernel for a quadratic using the
nearest three points (for the ranges at the boundary). Do you know
the formula for this kernel?
Markus


The code mentioned above uses standard divided differences as described
in: "Fred T. Krogh, Efficient algorithms for polynomial interpolation
and numerical differentiation, Math. of Comp. 24, 109 (Jan. 1970)
185--190." The highest order difference is used differently than when
doing the usual cubic interpolation. I'm sorry, but I'm not clear on
what you mean by the kernel.
Fred
.



Relevant Pages

  • Re: Gibbs phenomenon
    ... I am trying to use 1D sinc interpolation, ... The Gibbs phenonmenon is a direct result of using a sinc. ... the way around this is to use a different kernel ...
    (comp.dsp)
  • Re: cubic convolution interpolation at boundaries?
    ... For the interpolation I am using between 8 and 12 nodes which are ... convolution kernel to interpolate between nodes 9 and 10, ... I have not found any discussion about the boundary-treatment in the ... a linear combination of two quadratics. ...
    (sci.math.num-analysis)
  • Re: cubic convolution interpolation at boundaries?
    ... For the interpolation I am using between 8 and 12 nodes which are ... convolution kernel to interpolate between nodes 9 and 10, ... sometimes people mirror the image at the boundaries (i.e. they would ... a linear combination of two quadratics. ...
    (sci.math.num-analysis)
  • Re: Convolution-based image interpolation
    ... Do you mean using a convolution kernel of? ... That's where spline interpolation is real handy. ... Google "Pascal's triangle". ... Well the {1 2 1]/2 kernel discussed earlier is the second row of ...
    (comp.dsp)
  • Re: cubic convolution interpolation at boundaries?
    ... For the interpolation I am using between 8 and 12 nodes which are ... convolution kernel to interpolate between nodes 9 and 10, ... sometimes people mirror the image at the boundaries (i.e. they would ... a linear combination of two quadratics. ...
    (sci.math.num-analysis)