Skip to content
/ tps Public

Interactive thin-plate spline interpolation

Notifications You must be signed in to change notification settings

sarathknv/tps

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Interactive Thin-Plate Spline Interpolation

TPS is an interpolation technique that finds a "minimally bent" smooth surface that passes through a given set of points. Here's an example of a TPS surface with 5 control points.

The equation of the surface is of the form:

There are two parts in the function f. The first three terms form an affine, or linear part, that represents the behavior at infinity. It is basically a flat plane that the surface approaches at infinity. The second term, which is a sum of functions U(r), provides the bending to the surface. So the unknown coefficients a and w can be obtained by solving the linear system of equations,

These equations can be arranged nicely into a matrix as:

Then, once we know the values for w and a, we can interpolate v for arbitrary points (x, y) using:

Demo

Usage

$ python3 tps.py --img sample.png

References

About

Interactive thin-plate spline interpolation

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages