双三次插值

维基百科,自由的百科全书

数值分析这个数学分支中,双三次插值(英语:Bicubic interpolation)是二维空间中最常用的插值方法。在这种方法中,函数 f 在点 (x, y) 的值可以通过矩形网格中最近的十六个采样点的加权平均得到,在这里需要使用两个多项式插值三次函数,每个方向使用一个。

属性[编辑]

通过双三次插值可以得到一个连续的插值函数,它的一阶偏导数连续,并且交叉导数处处连续。

公式[编辑]

Bicubic interpolation on the square consisting of 25 unit squares patched together. Bicubic interpolation as per Matplotlib's implementation. Colour indicates function value. The black dots are the locations of the prescribed data being interpolated. Note how the color samples are not radially symmetric.
Bilinear interpolation on the same dataset as above. Derivatives of the surface are not continuous over the square boundaries.
Nearest-neighbor interpolation on the same dataset as above.

双三次插值通过下式进行计算:

或者用展开的形式,


计算系数 的过程依赖于插值数据的特性。如果已知插值函数的导数,常用的方法就是使用四个顶点的高度以及每个顶点的三个导数。一阶导数 表示 x 与 y 方向的表面斜率,二阶相互导数 表示同时在 x 与 y 方向的斜率。这些值可以通过分别连续对 x 与 y 向量取微分得到。对于网格单元的每个顶点,将局部坐标(0,0, 1,0, 0,1 和 1,1) 带入这些方程,再解这 16 个方程。

在计算机图形学中的应用[编辑]

双三次插值算法经常用于图像或者影片的缩放,它能比占主导地位的双线性滤波算法保留更好的细节品质。

参见[编辑]

外部链接[编辑]