In
mathematics, bicubic interpolation is an extension of
cubic interpolation (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
In mathematics, a plane is a Euclidean ( flat), two-dimensional surface that extends indefinitely. A plane is the two-dimensional analogue of a point (zero dimensions), a line (one dimension) and three-dimensional space. Planes can arise ...
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. Bicubic interpolation can be accomplished using either
Lagrange polynomial
In numerical analysis, the Lagrange interpolating polynomial is the unique polynomial of lowest degree that interpolates a given set of data.
Given a data set of coordinate pairs (x_j, y_j) with 0 \leq j \leq k, the x_j are called ''nodes'' an ...
s,
cubic spline
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 ...
s, 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-dimension ...
, 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 s ...
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 coordina ...