Interpolation is an imaging method to increase or decrease the number of pixels in a digital image. Many compact cameras uses interpolation to produce a larger image than the sensor captured or to create digital zoom. Almost all image editing software support one or more methods of interpolation, the quality of the final image and the amount of jaggies depends on the complexity of the algorithm.
We will present now a couple of most commonly used algorithms.
Nearest Neighbor Interpolation
The most simple interpolation algorithm is Nearest Neighbor Interpolation. It basically makes the pixels bigger. The color of a pixel in the enlarged image is the color of the nearest pixel of the original image. For example if you enlarge 200%, one pixel will be enlarged to a 2 x 2 area of 4 pixels with the same color as the original pixel. Most image viewing and editing software use this type of interpolation to enlarge a digital image for the purpose of closer examination because it does not change the color information of the image and does not introduce any anti-aliasing. This is also the reason why it is not suitable to enlarge photographic images because it increases the visibility of jaggies.
The value of the new pixel is determined in Bilinear Interpolation based on a weighted average of the 4 pixels in the nearest 2 x 2 neighborhood of the pixel in the original image. The averaging has an anti-aliasing effect and therefore produces relatively smooth edges with hardly any jaggies.
Bicubic interpolation is more sophisticated and produces smoother edges than bilinear interpolation. A new pixel is a bicubic function using 16 pixels in the nearest 4 x 4 neighborhood of the pixel in the original image. This is the method most commonly used by image editing software, printer drivers and many digital cameras for resampling images.
Fractal interpolation is mainly useful for extreme enlargements as it retains the shape of things more accurately with cleaner, sharper edges and less halos and blurring around the edges than bicubic interpolation would do.