badge icon

This article was automatically translated from the original Turkish version.

Article

Bicubic Interpolation

Quote

Image processing is one of the foundational pillars of modern technology and is an integral part of many applications we use daily, from photograph editing software to artificial intelligence. One of the most commonly used methods in this field is bicubic interpolation, which delivers high-quality results when resizing images or estimating missing pixels.

Bicubic Interpolation

Bicubic interpolation is a method used to calculate new pixel values when resizing an image, such as during scaling up or down. Known in Turkish as "çift kübik interpolasyon," this method derives its name from cubic (third-degree polynomial) mathematical functions and operates on a two-dimensional plane (x and y axes). Unlike simpler methods such as nearest-neighbor close neighbor and bilinear interpolation, bicubic interpolation considers 16 surrounding pixels (a 4x4 matrix) when computing a pixel’s value. This results in smoother and more natural-looking outcomes.

According to Cloudinary, "Bicubic interpolation is a method that calculates a pixel’s value based on its surrounding pixels."【1】 This method is particularly preferred in situations requiring high image quality because it excels at preserving detail and minimizing artifacts such as pixelation or blurring.

Primary Purpose of Interpolation

In image processing, interpolation is typically used to change an image’s resolution or fill in missing data points. For example, when enlarging a photograph, new pixels must be generated between the original ones. The values of these new pixels are estimated using interpolation algorithms. Bicubic interpolation makes these estimations more accurately, better preserving sharp edges and fine details.


Original image, nearest-neighbor, bilinear, and bicubic interpolation pixel differences (Credit: )

Mathematical Foundations of Bicubic Interpolation

The core of bicubic interpolation lies in cubic polynomials. This method does not only consider nearby pixels but also their gradients (rates of change) when calculating a pixel’s value. Mathematically, the process occurs in two stages: first along the x-axis, then along the y-axis.

Role of the Cubic Polynomial

Bicubic interpolation uses a cubic spline function, typically defined as:


This function assigns a weight to each surrounding pixel based on its distance. Wu et al. explained in their study: "Cubic interpolation provides a smoother transition by considering the derivatives of a continuous function."

Use of the 4x4 Matrix

To compute a pixel’s value, a 4x4 pixel matrix surrounding the target pixel is selected. This matrix includes both horizontal and vertical neighbors. Each pixel’s value is then combined using cubic weighting. The mathematical expression can be summarized as:


<span class="katex"><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em;"></span><span class="mord mathnormal" style="margin-right:0.10764em;">f</span><span class="mopen">(</span><span class="mord mathnormal">x</span><span class="mpunct">,</span><span class="mspace" style="margin-right:0.1667em;"></span><span class="mord mathnormal" style="margin-right:0.03588em;">y</span><span class="mclose">)</span><span class="mspace" style="margin-right:0.2778em;"></span><span class="mrel">=</span><span class="mspace" style="margin-right:0.2778em;"></span></span><span class="base"><span class="strut" style="height:3.0788em;vertical-align:-1.2777em;"></span><span class="mop op-limits"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:1.8011em;"><span style="top:-1.8723em;margin-left:0em;"><span class="pstrut" style="height:3.05em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mord mathnormal mtight">i</span><span class="mrel mtight">=</span><span class="mord mtight">0</span></span></span></span><span style="top:-3.05em;"><span class="pstrut" style="height:3.05em;"></span><span><span class="mop op-symbol large-op">∑</span></span></span><span style="top:-4.3em;margin-left:0em;"><span class="pstrut" style="height:3.05em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mord mtight">3</span></span></span></span></span><span class="vlist-s">​</span></span><span class="vlist-r"><span class="vlist" style="height:1.2777em;"><span></span></span></span></span></span><span class="mspace" style="margin-right:0.1667em;"></span><span class="mord"><span class="mord mathnormal">a</span><span class="msupsub"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.3117em;"><span style="top:-2.55em;margin-left:0em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mathnormal mtight">i</span></span></span></span><span class="vlist-s">​</span></span><span class="vlist-r"><span class="vlist" style="height:0.15em;"><span></span></span></span></span></span></span><span class="mord mathnormal" style="margin-right:0.05724em;">j</span><span class="mord"><span class="mord mathnormal">x</span><span class="msupsub"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.8747em;"><span style="top:-3.113em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mathnormal mtight">i</span></span></span></span></span></span></span></span><span class="mord"><span class="mord mathnormal" style="margin-right:0.03588em;">y</span><span class="msupsub"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.8747em;"><span style="top:-3.113em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mathnormal mtight">i</span></span></span></span></span></span></span></span></span></span></span>

  1. Determine Target Pixel: The position (x, y) of the new pixel is identified.
  2. Select Neighboring Pixels: A 4x4 pixel matrix closest to the target pixel is chosen.
  3. Calculate Weights: A weight is assigned to each neighboring pixel using the cubic function, based on distance.
  4. Estimate Value: The weighted pixel values are summed to compute the new pixel’s value.
  5. Apply Two-Dimensionally: This process is first applied along the x-axis, then along the y-axis.

Bicubic interpolation (Credit: )

Advantages and Disadvantages of Bicubic Interpolation

Like every method, bicubic interpolation has its strengths and weaknesses.

Advantages

  • High Quality: By considering 16 pixels, bicubic interpolation produces smooth gradients and sharp details. In particular, during enlargement, artifacts such as pixelation are minimized.
  • Natural Appearance: It generates results that are visually more pleasing to the human eye, offering a significant advantage in fields such as photography and graphic design.
  • Flexibility: It can be effectively applied to various types of images, including natural scenes and digital graphics.

Disadvantages

  • Computational Cost: Due to the need to process more pixels and perform complex mathematical operations, bicubic interpolation is slower than nearest-neighbor or bilinear methods.
  • Subtle Blurring: In some cases, particularly with highly detailed or sharp-edged images, it may introduce a slight blurring effect.
  • Resource Intensive: Its use may be challenging on low-power devices or in real-time applications.


Comparison of Interpolation Methods (Generated by artificial intelligence.)

Applications of Bicubic Interpolation

Bicubic interpolation is not merely a theoretical concept but a widely used practical method.

  • Image Editing Software: Professional software such as Photoshop favors bicubic interpolation for image enlargement, allowing users to scale photographs without significant quality loss.
  • Artificial Intelligence and Super-Resolution: Bicubic interpolation is often used as a starting point in deep learning-based super-resolution algorithms. A low-resolution image is first upscaled using bicubic interpolation, after which AI models further enhance the details.
  • Computer Graphics and Gaming: In game engines and 3D rendering, bicubic interpolation is used to scale textures, resulting in more realistic visuals.
  • Scientific Visualization: In the interpolation of scientific data—such as medical imaging or meteorological maps—the bicubic method plays a critical role in preserving fine details.

Implementation of Bicubic Interpolation in Code

In languages such as Python, this method can be implemented as follows:

  1. The input image is represented as a matrix.
  2. The coordinates of the target pixel are determined.
  3. A 4x4 matrix of neighboring pixels around this pixel is selected.
  4. A cubic weighting function is defined, assigning a weight to each neighbor.
  5. The weighted sum is calculated to determine the new pixel’s value.
  6. This process is repeated for all new pixels.


Example pseudo-code:


Detailed Code:


(1) Original image; (2) Image obtained by downsampling the original image at 4x scale using bicubic interpolation; (3) Image obtained by upsampling the downsampled image at 4x scale using bicubic interpolation. (Prepared and edited by Beyza Nur Türkü)

Citations

  • [1]

    Cloudinary, "Bicubic Interpolation", Cloudinary Website, Last accessed: 18 March 2025, Access Address.

Author Information

Avatar
AuthorBeyza Nur TürküDecember 20, 2025 at 6:44 AM

Tags

Discussions

No Discussion Added Yet

Start discussion for "Bicubic Interpolation" article

View Discussions

Contents

  • Bicubic Interpolation

    • Primary Purpose of Interpolation

  • Mathematical Foundations of Bicubic Interpolation

    • Role of the Cubic Polynomial

    • Use of the 4x4 Matrix

  • Advantages and Disadvantages of Bicubic Interpolation

    • Advantages

    • Disadvantages

  • Applications of Bicubic Interpolation

  • Implementation of Bicubic Interpolation in Code

Ask to Küre