In mathematics, bicubic interpolation is an extension of cubic interpolation for interpolating data points on a two dimensional regular grid. The interpolated surface is smoother than corresponding surfaces obtained by bilinear interpolation or nearest-neighbor interpolation. Bicubic interpolation can be accomplished using either Lagrange polynomials, cubic splines, or cubic convolution algorithm.
In image processing, bicubic interpolation is often chosen over bilinear interpolation or nearest neighbor in image resampling, when speed is not an issue. In contrast to bilinear interpolation, which only takes 4 pixels (2×2) into account, bicubic interpolation considers 16 pixels (4×4). Images resampled with bicubic interpolation are smoother and have fewer interpolation artifacts.
Suppose the function values and the derivatives , and are known at the four corners , , , and of the unit square. The interpolated surface can then be written
The interpolation problem consists of determining the 16 coefficients . Matching with the function values yields four equations,
Likewise, eight equations for the derivatives in the -direction and the -direction
And four equations for the cross derivative .
where the expressions above have used the following identities,
This procedure yields a surface on the unit square which is continuous and with continuous derivatives. Bicubic interpolation on an arbitrarily sized regular grid can then be accomplished by patching together such bicubic surfaces, ensuring that the derivatives match on the boundaries.
If the derivatives are unknown, they are typically approximated from the function values at points neighbouring the corners of the unit square, e.g. using finite differences.
Grouping the unknown parameters in a vector,
the problem can be reformulated into a linear equation where its inverse is:
Bicubic convolution algorithm
Bicubic spline interpolation requires the solution of the linear system described above for each grid cell. An interpolator with similar properties can be obtained by applying a convolution with the following kernel in both dimensions:
where is usually set to -0.5 or -0.75. Note that and for all nonzero integers .
If we use the matrix notation for the common case , we can express the equation in a more friendly manner:
for between 0 and 1 for one dimension. for two dimensions first applied once in and again in :
Use in computer graphics
However, due to the negative lobes on the kernel, it causes overshoot (haloing). This can cause clipping, and is an artifact (see also ringing artifacts), but it increases acutance (apparent sharpness), and can be desirable.
- Spatial anti-aliasing
- Bézier surface
- Bilinear interpolation
- Cubic Hermite spline, the one-dimensional analogue of bicubic spline
- Lanczos resampling
- Natural neighbor interpolation
- Sinc filter
- Spline interpolation
- Tricubic interpolation