ArticleslgStudy

science

Bicubic interpolation

Bicubic interpolation is a science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Bicubic interpolation rather than just read about it. In short: In mathematics, 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 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 — main illustration
Bicubic interpolation — illustration

Key takeaways

  • Bicubic interpolation belongs to science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Bicubic interpolation to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Bicubic interpolation from memory before moving on to harder problems.

Reference excerpt

In mathematics, 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 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 polynomials, cubic splines, or cubic convolution algorithm. In image processing, 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 pixels (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 f and the derivatives fx, fy and fxy are known at the four corners (0,0), (1,0), (0,1), and (1,1) of the unit square. The interpolated surface can then be written as p(x,y)=∑i=03∑j=03aijxiyj. The interpolation problem consists of determining the 16 coefficients aij. Matching p(x,y) with the function values yields four equations:

f(0,0)=p(0,0)=a00, f(1,0)=p(1,0)=a00+a10+a20+a30, f(0,1)=p(0,1)=a00+a01+a02+a03, f(1,1)=p(1,1)=∑i=03∑j=03aij. Likewise, eight equations for the derivatives in the x and the y directions:

fx(0,0)=px(0,0)=a10, fx(1,0)=px(1,0)=a10+2a20+3a30, fx(0,1)=px(0,1)=a10+a11+a12+a13, fx(1,1)=px(1,1)=∑i=13∑j=03aiji, fy(0,0)=py(0,0)=a01, fy(1,0)=py(1,0)=a01+a11+a21+a31, fy(0,1)=py(0,1)=a01+2a02+3a03, fy(1,1)=py(1,1)=∑i=03∑j=13aijj. And four equations for the xy mixed partial derivative:

fxy(0,0)=pxy(0,0)=a11, fxy(1,0)=pxy(1,0)=a11+2a21+3a31, fxy(0,1)=pxy(0,1)=a11+2a12+3a13, fxy(1,1)=pxy(1,1)=∑i=13∑j=13aijij. The expressions above have used the following identities: px(x,y)=∑i=13∑j=03aijixi−1yj, py(x,y)=∑i=03∑j=13aijxijyj−1, pxy(x,y)=∑i=13∑j=13aijixi−1jyj−1. This procedure yields a surface p(x,y) on the unit square [0,1]×[0,1] that is continuous and has 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. Grouping the unknown parameters aij in a vector α=[a00a10a20a30a01a11a21a31a02a12a22a32a03a13a23a33]T and letting x=[f(0,0)f(1,0)f(0,1)f(1,1)fx(0,0)fx(1,0)fx(0,1)fx(1,1)fy(0,0)fy(1,0)fy(0,1)fy(1,1)fxy(0,0)fxy(1,0)fxy(0,1)fxy(1,1)]T, the above system of equations can be reformulated into a matrix for the linear equation Aα=x. Inverting the matrix gives the more useful linear equation A−1x=α, where A−1=[10000000000000000000100000000000−3300−2−100000000002−2001100000000000000000010000000000000000000100000000000−3300−2−100000000002−2001100−30300000−20−1000000000−30300000−20−109−9−9963−6−36−63−34221−666−6−3−333−44−22−2−2−1−120−20000010100000000020−2000001010−666−6−4−242−33−33−2−1−2−14−4−4422−2−22−22−21111], which allows α to be calculated quickly and easily. There can be another concise matrix form for 16 coefficients: [f(0,0)f(0,1)fy(0,0)fy(0,1)f(1,0)f(1,1)fy(1,0)fy(1,1)fx(0,0)fx(0,1)fxy(0,0)fxy(0,1)fx(1,0)fx(1,1)fxy(1,0)fxy(1,1)]=[1000111101000123][a00a01a02a03a10a11a12a13a20a21a22a23a30a31a32a33][1100011101020103], or [a00a01a02a03a10a11a12a13a20a21a22a23a30a31a32a33]=[10000010−33−2−12−211][f(0,0)f(0,1)fy(0,0)fy(0,1)f(1,0)f(1,1)fy(1,0)fy(1,1)fx(0,0)fx(0,1)fxy(0,0)fxy(0,1)fx(1,0)fx(1,1)fxy(1,0)fxy(1,1)][10−32003−201−2100−11], where p(x,y)=[1xx2x3][a00a01a02a03a10a11a12a13a20a21a22a23a30a31a32a33][1yy2y3].

Extension to rectilinear grids Often, applications call for bicubic interpolation using data on a rectilinear grid, rather than the unit square. In this case, the identities for px,py, and pxy become px(x,y)=∑i=13∑j=03aijixi−1yjΔx, py(x,y)=∑i=03∑j=13aijxijyj−1Δy, pxy(x,y)=∑i=13∑j=13aijixi−1jyj−1ΔxΔy, where Δx is the x spacing of the cell containing the point (x,y) and similar for Δy. In this case, the most practical approach to computing the coefficients α is to let x=[f(0,0)f(1,0)f(0,1)f(1,1)Δxfx(0,0)Δxfx(1,0)Δxfx(0,1)Δxfx(1,1)Δyfy(0,0)Δyfy(1,0)Δyfy(0,1)Δyfy(1,1)ΔxΔyfxy(0,0)ΔxΔyfxy(1,0)ΔxΔyfxy(0,1)ΔxΔyfxy(1,1)]T, then to solve α=A−1x with A as before. Next, the normalized interpolating variables are computed as x‾=x−x0x1−x0,y‾=y−y0y1−y0 where x0,x1,y0, and y1 are the x and y coordinates of the grid points surrounding the point (x,y). Then, the interpolating surface becomes p(x,y)=∑i=03∑j=03aijx‾iy‾j.

Finding derivatives from function values 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. To find either of the single derivatives, fx or fy, using that method, find the slope between the two surrounding points in the appropriate axis. For example, to calculate fx for one of the points, find f(x,y) for the points to the left and right of the target point and calculate the slope of the straight line between them, and similarly for fy. To find the cross derivative fxy, take the derivative in both axes, one at a time. For example, one can first use the fx procedure to find the x derivatives of the points above and below the target point, then use the fy procedure on those values (rather than, as usual, the values of f for those points) to obtain the value of fxy(x,y) for the target point. (Or one can do it in the opposite direction, first calculating fy and then fx from those. The two give equivalent results.) At the edges of the dataset, when one is missing some of the surrounding points, the missing points can be approximated by a number of methods. A simple and common method is to assume that the slope from the existing point to the target point continues without further change, and using this to calculate a hypothetical value for the missing point.

Bicubic convolution algorithm

… excerpt ends here. Continue reading the full article.

Illustrations

Bicubic interpolation: Comparison of Bicubic interpolation  with some 1- and 2-dimensional interpolations.
Black and red/yellow/green/blue dots correspond to the interpolated point and neighbouring samples, respectively. 
Their heights above the ground correspond to their values.
Comparison of Bicubic interpolation with some 1- and 2-dimensional interpolations. Black and red/yellow/green/blue dots correspond to the interpolated point and neighbouring samples, respectively. Their heights above the ground correspond to their values.
Bicubic interpolation: Bicubic interpolation on the square [0,4]×[0,4] consisting of 25 unit squares patched together. Bicubic interpolation as per Matplotlib's implementation. Colour indicates function value. The black dots are the locations of the prescribed data being interpolated. Note how the color samples are not radially symmetric.
Bicubic interpolation on the square [0,4]×[0,4] consisting of 25 unit squares patched together. Bicubic interpolation as per Matplotlib's implementation. Colour indicates function value. The black dots are the locations of the prescribed data being interpolated. Note how the color samples are not radially symmetric.
Bicubic interpolation: Bilinear interpolation on the same dataset as above.[dubious – discuss] Derivatives of the surface are not continuous over the square boundaries.
Bilinear interpolation on the same dataset as above.[dubious – discuss] Derivatives of the surface are not continuous over the square boundaries.
Bicubic interpolation: Nearest-neighbor interpolation on the same dataset as above
Nearest-neighbor interpolation on the same dataset as above
Bicubic interpolation: Convolution kernel W(x)
Convolution kernel W(x)

Worked examples

Example 1 — a first encounter with Bicubic interpolation

Start with the simplest possible case. Write down what Bicubic interpolation claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Bicubic interpolation before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Bicubic interpolation ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Bicubic interpolation

In research
Bicubic interpolation appears in science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Bicubic interpolation in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Bicubic interpolation is common in secondary-school and first-year university syllabi. It links to neighbouring topics Image processing, Multivariate interpolation, so understanding it makes those chapters shorter.
In everyday life
Look for Bicubic interpolation outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Bicubic interpolation” →

How to study Bicubic interpolation in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Bicubic interpolation means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Bicubic interpolation out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Bicubic interpolation in simple terms?

In mathematics, 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 regular grid. The interpolated surface (meaning the kernel shape, not the image) is smoother than correspon…

Why does Bicubic interpolation matter?

Because it connects several science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Bicubic interpolation?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Bicubic interpolation.

Tags

  • Image processing
  • Multivariate interpolation

Keep exploring