In
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 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
A regular grid is a tessellation of ''n''-dimensional Euclidean space by congruent parallelotopes (e.g. bricks).
Its opposite is irregular grid.
Grids of this type appear on graph paper and may be used in finite element analysis, finite volu ...
. The interpolated surface (meaning the kernel shape, not the image) is
smoother than corresponding surfaces obtained by
bilinear interpolation
In mathematics, bilinear interpolation is a method for interpolating functions of two variables (e.g., ''x'' and ''y'') using repeated linear interpolation. It is usually applied to functions sampled on a 2D rectilinear grid, though it can be ge ...
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 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 ...