In
mathematics
Mathematics is an area of knowledge that includes the topics of numbers, formulas and related structures, shapes and the spaces in which they are contained, and quantities and their changes. These topics are represented in modern mathematics ...
, bicubic interpolation is an extension of
cubic interpolation
In numerical analysis, a cubic Hermite spline or cubic Hermite interpolator is a spline where each piece is a third-degree polynomial specified in Hermite form, that is, by its values and first derivatives at the end points of the corresponding ...
(not to be confused with
cubic spline interpolation, a method of applying cubic interpolation to a data set) for
interpolating
In the mathematics, mathematical field of numerical analysis, interpolation is a type of estimation, a method of constructing (finding) new data points based on the range of a discrete set of known data points.
In engineering and science, one ...
data points on a
two-dimensional regular grid. The interpolated surface (meaning the kernel shape, not the image) is
smoother than corresponding surfaces obtained by
bilinear interpolation or
nearest-neighbor interpolation
Nearest-neighbor interpolation (also known as proximal interpolation or, in some contexts, point sampling) is a simple method of multivariate interpolation in one or more dimensions.
Interpolation is the problem of approximating the value of a ...
. Bicubic interpolation can be accomplished using either
Lagrange polynomials,
cubic splines, or
cubic convolution algorithm.
In
image processing
An image is a visual representation of something. It can be two-dimensional, three-dimensional, or somehow otherwise feed into the visual system to convey information. An image can be an artifact, such as a photograph or other two-dimensiona ...
, bicubic interpolation is often chosen over bilinear or nearest-neighbor interpolation in
image resampling, when speed is not an issue. In contrast to bilinear interpolation, which only takes 4
pixel
In digital imaging, a pixel (abbreviated px), pel, or picture element is the smallest addressable element in a raster image, or the smallest point in an all points addressable display device.
In most digital display devices, pixels are the smal ...
s (2×2) into account, bicubic interpolation considers 16 pixels (4×4). Images resampled with bicubic interpolation can have different interpolation
artifacts, depending on the b and c values chosen.
Computation
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 as
:
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
and the
directions:
#
#
#
#
#
#
#
#
And four equations for the
mixed partial derivative:
#
#
#
#
The expressions above have used the following identities:
:
:
:
This procedure yields a surface
on the
unit square
In mathematics, a unit square is a square whose sides have length . Often, ''the'' unit square refers specifically to the square in the Cartesian plane with corners at the four points ), , , and .
Cartesian coordinates
In a Cartesian coordinate ...