# Comparison gallery of image scaling algorithms

This gallery shows the results of numerous image scaling algorithms which is too cumbersome to include in the main image scaling article.

## Contents

- 1 Scaling methods
- 1.1 Nearest-neighbor interpolation
- 1.2 Bilinear interpolation
- 1.3 Bicubic interpolation
- 1.4 Fourier-based interpolation
- 1.5 Edge-directed interpolation algorithms
- 1.6 hqx
- 1.7 Vectorization
- 1.8 Deep convolutional neural networks (EDSR, waifu2x)
- 1.9 Deep convolutional neural networks using perceptual loss (ESRGAN)

- 2 References

## Scaling methodsEdit

An image size can be changed in several ways. Consider quadrupling the size of the following photographic thumbnail image (40x40 pixel), and doubling the size of the following text based image:

- Reference 160x160 pixel thumbnail

Image | Algorithm |
---|---|

## Nearest-neighbor interpolationEditOne of the simpler ways of increasing the size is nearest-neighbor interpolation, replacing every pixel with a number of pixels of the same color. The resulting image is larger than the original, and preserves all the original detail, but has (possibly undesirable) jaggedness. The diagonal lines of the W, for example, now show the "stairway" shape characteristic of nearest-neighbor interpolation. Other scaling methods below are better at preserving smooth contours in the image. | |

## Bilinear interpolationEditLinear (or bilinear, in two dimensions) interpolation is typically good for changing the size of an image, but causes some undesirable softening of details and can still be somewhat jagged. | |

## Bicubic interpolationEditBetter scaling methods include bicubic interpolation and Lanczos resampling. | |

## Fourier-based interpolationEditSimple Fourier based interpolation based on padding of the frequency domain with zero components (a smooth window based approach would reduce the ringing). Beside the good conservation (even recovering) of details, notable is the ringing and the circular bleeding of content from the left border to right border (and way around). | |

## Edge-directed interpolation algorithmsEditEdge-directed interpolation algorithms aim to preserve edges in the image after scaling, unlike other algorithms which can produce staircase artifacts around diagonal lines or curves. Examples of algorithms for this task include New Edge-Directed Interpolation (NEDI), | |

## hqxEditFor magnifying computer graphics with low resolution and/or few colors (usually from 2 to 256 colors), better results will be achieved by hqx or other pixel art scaling algorithms. These produce sharp edges and maintain high level of detail. | |

## VectorizationEditAn entirely different approach is vector extraction or vectorization. Vectorization first creates a resolution independent vector representation of the graphic to be scaled. Then the resolution-independent version is rendered as a raster image at the desired resolution. This technique is used by Adobe Illustrator Live Trace, Inkscape, and several recent papers. | |

## Deep convolutional neural networks (EDSR, waifu2x)Edit | |

## Deep convolutional neural networks using perceptual loss (ESRGAN)Edit |

## ReferencesEdit

**^**"Edge-Directed Interpolation". Retrieved 19 February 2016.**^**Xin Li; Michael T. Orchard. "NEW EDGE DIRECTED INTERPOLATION" (PDF).*2000 IEEE International Conference on Image Processing*: 311. Archived from the original (PDF) on 2016-02-14. Retrieved 2016-07-03.**^**Zhang, D.; Xiaolin Wu. "An Edge-Guided Image Interpolation Algorithm via Directional Filtering and Data Fusion" (PDF). Cite journal requires`|journal=`

(help)**^**K.Sreedhar Reddy; Dr.K.Rama Linga Reddy (December 2013). "Enlargement of Image Based Upon Interpolation Techniques" (PDF).*International Journal of Advanced Research in Computer and Communication Engineering*.**2**(12): 4631.**^**Dengwen Zhou; Xiaoliu Shen. "Image Zooming Using Directional Cubic Convolution Interpolation". Retrieved 13 September 2015.**^**Shaode Yu; Rongmao Li; Rui Zhang; Mou An; Shibin Wu; Yaoqin Xie (2013). "Performance evaluation of edge-directed interpolation methods for noise-free images". arXiv:1303.6455 [cs.CV].**^**Johannes Kopf and Dani Lischinski (2011). "Depixelizing Pixel Art".*ACM Transactions on Graphics*.**30**(4): 99:1–99:8. doi:10.1145/2010324.1964994. Archived from the original on 2015-09-01. Retrieved 24 October 2012.