When an image captured on a sensor of high resolution is displayed on a computer monitor, there are far too many pixels. Most computer monitors are capable of displaying either 96 or 72 pixels per inch (ppi) both vertically and horizontally - or something similar. If a 96ppi monitor has, for example dimensions of 15" x 12", it is capable of displaying simultaneously only 15 x 96 pixels across its width and 12 x 96 pixels vertically. This is a total of only (15 x 96) x (12 x 96) = 1,658,880 pixels. Interpolation is basically the process of fitting the six million pixels of the image on to the 1.658 million pixels of the monitor.
Reduction of the number of pixels in an image is rather simpler than achieving an increase although the basic process is the same in both cases. In a case where the number of pixels is exactly double what is required in both the vertical and horizontal planes, it is a simple matter to remove every other pixel. Similarly, where the number of required pixels in an image is only half the required amount, each pixel can be duplicated. However practical applications are rarely so simple.
The problem is easily seen in the two images. The left-hand image is 30 pixels in width and 26 pixels in height. To display it on an imaginary monitor 17 pixels in width and 15 pixels in height it is necessary to recreate every pixel to preserve in the best way possible the detail of the original image.
There are a number of algorithms used to make such conversions, but three are most commonly used. These are known as "nearest neighbour", "bilinear" and "bicubic" interpolation.
The nearest neighbour technique is the simplest and easiest to understand. It merely duplicates the appropriate number of adjacent pixels and copies them in to the image. This works well in graphical applications where it is desirable to preserve clean edges to lines and other objects. However in areas of smooth tonal change the results tend to be unsatisfactory. Bilinear interpolation averages the values of the four pixels above, below, and to either side of each pixel in an image. In the diagram the four grey pixels would be considered. This gives much smoother results than the nearest neighbour technique. Bicubic interpolation takes into account all eight neighbouring pixels for each pixel in an image and computes a weighted average to give the best possible result. In the diagram the eight grey pixels would be incorporated into the calculations. This technique is the most often used by photographers but also requires the most computing power.