Last modified: December 02, 2024

This article is written in: 🇺🇸

Thin Plate Spline Interpolation

Thin Plate Spline (TPS) Interpolation is a non-parametric, spline-based method for interpolating scattered data in two or more dimensions. Originally arising in the context of fitting a smooth surface through a set of points in R2, thin plate splines can be generalized to higher dimensions. The name "thin plate" comes from the physical analogy of bending a thin sheet of metal so that it passes through given points with minimal bending energy.

While polynomial methods or radial basis functions can also perform interpolation, TPS stands out by providing a minimal "bending energy" solution, leading to a surface that is not only guaranteed to pass through the given points but is also as flat (smooth) as possible away from these points. This makes thin plate splines particularly favored in fields like image warping, geometric modeling, and shape deformation.

Conceptual Illustration

Imagine you have a set of control points (xi,yi,zi) in 3D space, where (xi,yi) represent spatial coordinates and zi is the function value at that location. Thin plate spline interpolation finds a surface z=f(x,y) that exactly passes through all these points. If you imagine the surface as a thin metal sheet pinned at these points, the TPS solution is the shape the sheet would naturally take if it were free to bend but not stretch, minimizing the total bending energy:

output(30)

The resulting surface is smooth, continuous in its derivatives, and tends to flatten out smoothly between data points.

Mathematical Formulation

Given a set of N data points (xi,yi,zi)Ni=1, where no two points coincide, we want to find a function:

f(x,y)=α0+α1x+α2y+Ni=1wiϕ((x,y)(xi,yi))

that interpolates the given data. Here:

ϕ(r)=r2ln(r)

which is the fundamental solution associated with the thin plate spline bending energy in 2D.

This f(x,y) must satisfy the interpolation conditions:

f(xi,yi)=zi,i=1,,N.

Additionally, to ensure a unique solution and remove degeneracies, f(x,y) must satisfy:

Ni=1wi=Ni=1wixi=Ni=1wiyi=0

This leads to a linear system for the unknown parameters α0,α1,α2,w1,,wN.

Derivation

I. Energy Minimization:

Thin plate splines arise from minimizing a bending energy functional:

J[f]=(2fx2)2+2(2fxy)2+(2fy2)2dxdy, subject to the interpolation constraints f(xi,yi)=zi.

II. Variational Problem:

Solving the Euler-Lagrange equations associated with the energy minimization under the interpolation conditions yields the form of the TPS. The solution can be shown to be a polynomial of degree at most 1 plus a weighted sum of radial basis functions ϕ(r)=r2ln(r).

III. Linear System:

Substitute f(x,y) into the interpolation conditions. This produces a system of N+3 linear equations (for wi,α0,α1,α2):

[0P PK][α w]=[0 z]

where:

Solving this system yields the TPS coefficients.

Algorithm Steps

I. Input:

A set of points (xi,yi,zi), i=1,,N

II. Form the Matrices:

III. Solve the Linear System:

IV. Interpolation:

To find f(x,y) at a new point (x,y):

f(x,y)=α0+α1x+α2y+Ni=1wiϕ((xxi)2+(yyi)2).

Example

Given Data: Suppose we have 4 points:

(0,0,0),(1,0,1),(0,1,1),(1,1,2).

I. Compute K:

For each pair of points, calculate distance r and then ϕ(r)=r2ln(r). Handle r=0 carefully (ϕ(0)=0 by definition).

II. Compute P:

P=[100110101111]

III. Form the linear system and solve for α0,α1,α2,wi.

IV. Once solved, you have a TPS surface that passes exactly through these four points. For any (x,y), use the formula to predict f(x,y).

(This is a simplified conceptual example; actual numbers require careful computation.)

Advantages

Limitations

Table of Contents

    Thin Plate Spline Interpolation
    1. Conceptual Illustration
    2. Mathematical Formulation
    3. Derivation
    4. Algorithm Steps
    5. Example
    6. Advantages
    7. Limitations