Bicubic interpolation
From Wikipedia, the free encyclopedia
In numerical analysis, a branch of mathematics, bicubic interpolation is one of the most common multivariate interpolation methods in two dimensions. With this method, the value f(x, y) of a function f at a point (x, y) is computed as a weighted average of the nearest sixteen samples in a rectangular grid (a 4x4 array). Here, two cubic interpolation polynomials, one for each plane direction, are used.
Contents |
[edit] Properties
Bicubic interpolation results in an interpolating function which is continuous, has continuous first partial derivatives, and has continuous cross derivatives everywhere.
[edit] Formula
The bicubic interpolation is calculated as follows:
- a00 + a10x + a01y + a20x2 + a11xy + a02y2 + a21x2y + a12xy2 + a22x2y2 + a30x3 + a03y3 + a31x3y + a13xy3 + a32x3y2 + a23x2y3 + a33x3y3
Or, in more compact form:
The procedure used to calculate the coefficients aij depends on the interpolated data source properties. If we are interpolating a function with known derivatives, the common approach is to use the height at the four vertices, together with three derivatives at each vertex. The first derivatives h'x and h'y express the slope of the surface in the x and y directions, while the second (cross) derivative h''xy represents the slope in both x and y. In terms of solving the coefficients of the formula, these values can be expressed by differentiating the x and y vectors independently, and then consecutively. For each of the vertices of the grid cell, the local coordinates (at 0,0, 1,0, 0,1 and 1,1) can be input into these equations to generate the 16 equations to solve.
[edit] Use in computer graphics
The bicubic algorithm is frequently used for scaling images and video for display. It preserves fine detail better than the predominant bilinear algorithm.
[edit] See also
- Cubic Hermite spline, the one-dimensional analogue
- Bilinear interpolation
- Spline interpolation
- Anti-aliasing
- Sinc filter
- Lanczos resampling