aimstil
5.0.5
|
Cubic interpolation. More...
#include <til/CubicSplineInterpolation.h>
Public Types | |
typedef CubicSplineInterpolation< T > | Self |
Static Public Member Functions | |
static T | compute (T f1, T f2, T f3, T f4, T x) |
Returns the cubic spline interpolation value of four numbers, given their four spline coefficients. More... | |
Cubic interpolation.
Definition at line 12 of file CubicSplineInterpolation.h.
typedef CubicSplineInterpolation<T> til::CubicSplineInterpolation< T >::Self |
Definition at line 16 of file CubicSplineInterpolation.h.
|
inlinestatic |
Returns the cubic spline interpolation value of four numbers, given their four spline coefficients.
The cubic spline coefficients of the data to interpolate therefore must have been previoulsy computed. To do that, one technique is to use recursive filtering, see e.g. til::cubicSplineCoefficients for images. The cubic spline is 3/4*x^3-3/2*x^2+1, 0<x<1 -1/4*x^3+3/2*x^2-3*x+2, 1<x<2
f1 | Cubic spline coefficient assumed to lie at position -1 |
f2 | Cubic spline coefficient assumed to lie at position 0 |
f3 | Cubic spline coefficient assumed to lie at position 1 |
f4 | Cubic spline coefficient assumed to lie at position 2 |
x | The interpolated value at position x, supposed to lie between 0 and 1 (no checking on that) |