Keywords

1 Introduction

Image interpolation [1, 2] is widely used in many areas of modern electronics, such as digital cameras and computer graphics etc. Image interpolation is a method of estimating new data points with the range of discrete set of known data points. It is a process of finding a value between two points on a line or curve.

The objective of interpolation is to retain the qualitative characteristics of a reproduced image from artifacts such as blurring, checkerboard effects, edge discontinuities, and jagging etc. Interpolation techniques were developed to convert low resolution images to high resolution images, with low computational complexity and high accuracy. The various interpolation techniques that were developed are nearest neighbor interpolation [3, 4], bilinear interpolation [5, 6], bicubic interpolation [7, 8], cubic spine interpolation [9, 10] and iterative linear interpolation [11, 12].

Interpolation is the problem of approximating the value of a function for a non-given point in a space when given the value of that function at points around that point. In computer graphics and digital imaging, image scaling refers to the resizing of a digital image. In video technology, the magnification of digital material is known as upscaling or resolution enhancement [1, 2]. Photo interpolation is the process by which the number of pixels comprising an image is increased to allow printing enlargements that are of higher quality than photos that are not interpolated. Interpolation is commonly used to make quality large prints from digital photos and film-scanned images.

2 Interpolation Techniques

The various interpolation techniques considered for comprehensive study are as follows.

2.1 Nearest Neighbor Interpolation (NNA)

In NNA [3, 4] neighboring pixel points are chosen to calculate the value of the interpolated pixel. Now consider the interpolated pixel as A = f(x, y). Let the neighboring pixels be at (i, j), (i, j + 1), (i + 1, j), (i + 1, j + 1). Its pixel value is manipulated based on the algorithm described below.

2.1.1 Methodology

If (yj) < ((j + 1) − y) then the value of the interpolated pixel will be one of the top two pixel values, else any one of the bottom two pixel values will be chosen.

If (x − i) < ((i + 1) − x) then the value of the interpolated pixel will be one of the left two pixel values, else any one of the bottom two pixels will be chosen.

Figure 1b depicts how the interpolated pixel value A(x · y) is obtained from the actual image shown in Fig. 1a. The actual image is divided into, say, four pixels. The scaled image has sixteen pixels. The interpolated image should have similar feature characteristics to the actual image.

Fig. 1
figure 1

a Actual image b image block describing the interpolated pixel A(x, y) using NNA [4]

This method is simple and easy to implement and has flexible features choices. The major drawbacks are its speed and poor interpolated image generation with aliasing and blurring effects.

2.2 Bilinear Interpolation (BLI)

In BLI [5, 6] four adjacent pixel points on a rectilinear 2D grid are used for calculating the weighted value of the interpolated point in a scaled image. Linear calculation functions are used in two directions, namely horizontal and vertical, to find the interpolated pixel value.

2.2.1 Methodology

To find the value of P:

$$ f(i,\,j + y) = [f(i,j + 1) - f(i,j)]y + f(i,j) $$
(1)

To find the value of Q:

$$ f(i + 1,j + 1) = [f(i + 1,j + 1) - f(i + 1,j)]y + f(i + 1,j) $$
(2)

To find the value of A:

$$ \begin{aligned} & f(i + x,j + y) = (1 - x)(1 - y)f(i \cdot j) - (1 - x)y\,f(I,j + 1) + x(1 - y) \\ & f(i + 1,j) + x\,y\,f(i + 1,j + 1) \\ \end{aligned} $$
(3)

Figure 2 shows the pictorial representation of the process of obtaining the weighted value of the interpolated pixel using BLI. Equations (1), (2), and (3) help to obtain the weighted value of f(x, y). It uses a weighted average of the four nearest cell centers. The closer an input cell center is to the output cell center, the higher the influence of its value is on the output cell value.

Fig. 2
figure 2

Image depicting the prediction of weighted value for the interpolated pixel using BLI [5]

This means that the output value could be different to the nearest input, but is always within the same range of values as the input. Since the values can change, BLI is not recommended for use with categorical data. Instead, it should be used for continuous data, such as elevation and raw slope values [13].

The major advantage is that the visual distortion caused by fractional zoom is reduced. The block uses the weighted average of two translated pixel values for each output pixel value. The local gradients for the test images can be investigated [14] by applying an iterative procedure. A perceptually optimum value for each interpolated pixel can be obtained from the local mean value of the inverse gradients.

2.3 Bicubic Interpolation (BCI)

In BCI [7, 8] Lagrange polynomials are used for calculating the weight of the interpolated point A = f(x, y) in a scaled image. A 4 × 4, i.e. 16, adjacent pixels are used. For every single dimension calculation, the values of four pixels positioned at i, j, i − 1, and j + 1 are used. Figure 3 depicts the image for predicting the interpolated pixel value using BCI.

Fig. 3
figure 3

Image depicting the prediction of the weighted value for the interpolated pixel using BCI [8]

2.3.1 Methodology

The weighted sum of the interpolated pixel can be found by manipulating Eq. (4):

$$ f\left( {x,y} \right) = \frac{1}{16}\sum\limits_{l = - 1}^{2} {\sum\limits_{m = - 1}^{2} {f\left( {i + l,j + m} \right)u\left( {dx} \right)u\left( {dy} \right)} } $$
(4)

where, \( f\left( {i + l, j + m} \right) \) gives the gray value of that pixel, \( u\left( {dx} \right) \) gives the variation on the x axis, and \( u\left( {dy} \right) \) gives the variation on the y axis.

The above figure shows how the 16 pixel values are considered for calculating the weighted average of the final interpolated image. It gives sharper images than the methods described above, but requires more computational time.

2.4 Cubic Spline Interpolation (CSI)

This [11] interpolation technique uses a special type of piecewise polynomial called a spline. A cubic spline is a spline constructed of piecewise third-order polynomials which pass through a set of control points. The second derivative of each polynomial is commonly set to zero at the endpoints, since this provides a boundary condition that completes the system of equations. The interpolation curves are produced as a smooth curve.

CSI is widely used in curve fitting because of its ability to work with both low and high degree polynomials [15]. The depth of the interpolation is variable, and can be set to depend on an absolute or relative error tolerance. It is meant to be easy to interpolate expensive functions that take a lot of time.

2.4.1 Methodology

Given a function f(x) defined on [a, b] and a set of nodes [12],

$$ a = x_{0} < x_{1} < \cdots < x_{n} = b $$
(5)

Equation (5) describes the set of nodes. Considering f(x) is a piecewise cubic polynomial, a cubic spline interpolant, S, is given in Eq. (6),

$$ S(x) = \left\{ {\begin{array}{*{20}l} {a_{0} + b_{0} (x - x_{0} ) + c_{0} (x - x_{0} )^{2} + d_{0} (x - x_{0} )^{3} } \hfill & {if\,x_{0} \le x \le x_{1} } \hfill \\ {a_{1} + b_{1} (x - x_{1} ) + c_{1} (x - x_{1} )^{2} + d_{1} (x - x_{1} )^{3} } \hfill & {if\,x_{1} \le x \le x_{2} } \hfill \\ . \hfill & {} \hfill \\ . \hfill & {} \hfill \\ . \hfill & {} \hfill \\ {a_{n - 1} + b_{n - 1} (x - x_{n - 1} ) + c_{n - 1} (x - x_{n - 1} )^{2} + d_{n - 1} (x - x_{n - 1} )^{3} } \hfill & {if\,x_{n - 1} \le x \le x_{n} } \hfill \\ \end{array} } \right. $$
(6)

2.5 Iterative Linear Interpolation (ILI)

ILI [4] adopts the fuzzy gradient model to estimate gradients of the target point according to its neighbor sample points in different directions by weighing the gradients using fuzzy membership grades. It estimates the difference between the target point and its neighboring sample points and finally obtains the target point. In 1D signal reconstructions, it uses only three multipliers. Bidirectional interpolation is composed of multiple 1D interpolations. To approximate 2D signal, five 1D ILIs are used, which cost only eight multipliers to obtain similar peak signal-to-noise ratios (PSNR). Further exploiting, multiple 1D interpolation has moderate PSNR performance but better robustness.

2.5.1 Methodology

Fuzzy sets and membership functions are chosen first. The pictorial description of membership functions is shown in Fig. 4.

Fig. 4
figure 4

Image depicting the fuzzy sets and membership functions [4]

Consider uniform sampling is done. The below equations show that only two adders and two multipliers are required for calculating the value of interpolated pixel. The left side and right side gradient values are defined in Eqs. (7) and (8).

$$ \begin{aligned} \hat{f}_{L} (x) = f(x_{2} ) + (x - x_{2} ) \times q_{L} \hfill \\ \hat{f}_{R} \left( x \right) = f(x_{3} ) + (x - x_{3} ) \times q_{R} . \hfill \\ \end{aligned} $$
(7)

where,

qL:

describes the left to right gradient functioinal value.

qR:

describes the right to left gradient functional value.

$$ \begin{aligned} q_{L} = \frac{{q_{12} \times L_{1} + q_{23} \times R_{1} }}{{L_{1} + R_{1} }} \hfill \\ q_{R} = \frac{{q_{23} \times L_{2} + q_{34} \times R_{2} }}{{L_{2} + R_{2} }}. \hfill \\ \end{aligned} $$
(8)

3 Results and Discussion

The following are the pictures considered for comprehensive analysis. These pictures are captured using a Nokia 310 (flower), Samsung GT-S5360 (teddy), and Samsung GT-18552 (vase and bird).

The performances of the algorithms discussed above are compared based on signal-to-noise ratio (SNR), peak signal-to-noise ratio (PSNR), mean squared error (MSE), and processing time. The results were obtained with the help of Matlab R2011a and are tabulated in Table 1.

Table 1 Comparison of interpolation techniques based on SNR (dB) for image sizes from 256 × 256 to 1024 × 1024

From Fig. 5, we can see the SNR of various interpolation algorithms, when acted on interpolating images of sizes from 256 × 256 to 1024 × 1024 as tabulated in Table 2.

Fig. 5
figure 5

SNR performance of interpolation techniques

Table 2 Comparison of interpolation techniques based on PSNR (peak signal-to-noise ratio) for image sizes from 256 × 256 to 1024 × 1024

From Fig. 6, we can observe the PSNR of various interpolation algorithms, when acted on interpolating images of sizes from 256 × 256 to 1024 × 1024 as tabulated in Table 3.

Fig. 6
figure 6

PSNR performance of various interpolation techniques

From Fig. 7, we can see the processing time of interpolating techniques and their mean squared error for image sizes from 256 × 256 to 1024 × 1024.

Fig. 7
figure 7

Mean square error versus processing time for image sizes from 256 × 256 to 1024 × 1024

Table 3 Comparison of interpolation techniques based on MSE (mean square error) and processing time for images of sizes from 256 × 256 to 1024 × 1024

4 Conclusion

In this paper, various interpolation techniques were discussed for their better usage in the field of image interpolation. This survey will assist us in developing a new technique for interpolating images with improved results. As a result future algorithms developed in the future will be optimized for any sort of imaging.