In
mathematics
Mathematics is a field of study that discovers and organizes methods, Mathematical theory, theories and theorems that are developed and Mathematical proof, proved for the needs of empirical sciences and mathematics itself. There are many ar ...
, bicubic interpolation is an extension of
cubic spline interpolation (a method of applying cubic interpolation to a data set) for
interpolating data points on a
two-dimensional
A two-dimensional space is a mathematical space with two dimensions, meaning points have two degrees of freedom: their locations can be locally described with two coordinates or they can move in two independent directions. Common two-dimension ...
regular grid
A regular grid is a tessellation of ''n''-dimensional Euclidean space by Congruence_(geometry), congruent parallelepiped#Parallelotope, parallelotopes (e.g. bricks). Its opposite is Unstructured grid, irregular grid.
Grids of this type appear on ...
. 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. 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'' ...
s,
cubic splines, or
cubic convolution algorithm.
In
image processing
An image or picture is a visual representation. An image can be two-dimensional, such as a drawing, painting, or photograph, or three-dimensional, such as a carving or sculpture. Images may be displayed through other media, including a pr ...
, 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 graphics, raster image, or the smallest addressable element in a dot matrix display device. In most digital display devices, p ...
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 coordinat ...