The best high-quality scaling algorithm for enlarging images is called Super-Resolution (SR). SR is a type of image upscaling algorithm that uses machine learning to generate high-resolution images from low-resolution ones. It works by analyzing the low-resolution image and then using a trained neural network to generate a higher-resolution version that preserves the details of the original image.

Comparison gallery of image scaling algorithms

Visual examples of techniques for image scaling

This gallery shows the results of numerous image scaling algorithms.

Scaling methods

An image size can be changed in several ways. Consider resizing a 160×160 pixel photo to the following 40×40 pixel thumbnail and then scaling the thumbnail to a 160×160 pixel image. Also consider doubling the size of the following image containing text.

Low-resolution images
Thumbnail Text
Thumbnail Image Original Image 40x40 pixel thumbnail
Comparison of scaling methods
Original photo Upscaled thumbnail Upscaled text Algorithm and description
160×160 thumbnail reference Nearest-neighbor interpolation Nearest-neighbor interpolation

Nearest-neighbor interpolation

One of the simpler ways of increasing the size, 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.

160×160 thumbnail reference Bilinear interpolation Linear Interpolation

Bilinear interpolation

Linear (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.

160×160 thumbnail reference Bicubic Interpolation Cubic Interpolation

Bicubic interpolation

Better scaling methods include bicubic interpolation, Lanczos resampling and Mitchell-Netravali filters.

160×160 thumbnail reference Fourier-based interpolation Fourier-based Interpolation + saturation

Fourier-based interpolation

Simple 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 of details, notable is the ringing and the circular bleeding of content from the left border to right border (and way around).

160×160 thumbnail reference 40 by 40 thumbnail of 'Green Sea Shell' (x4 DCCI).png Wiki dcci 2x.png

Edge-directed interpolation

Edge-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), Edge-Guided Image Interpolation (EGGI), Iterative Curvature-Based Interpolation (ICBI), and Directional Cubic Convolution Interpolation (DCCI). A study found that DCCI had the best scores in PSNR and SSIM on a series of test images.

160×160 thumbnail reference hq4x scaling hq2x scaling

Pixel art scaling algorithms (hqx)

For magnifying computer graphics with low resolution and few colors (usually from 2 to 256 colors), better results will be achieved by pixel art scaling algorithms such as hqx or xbr. These produce sharp edges and maintain high level of detail. Unfortunately due to the standardized size of 218×80 pixels, the “Wiki” image cannot use HQ4x or 4xBRZ to better demonstrate the artifacts they may produce such as row shifting.

The example images use HQ4x and HQ2x respectively.

160×160 thumbnail reference 160 by 160 upscaled thumbnail of 'Green Sea Shell' (4xBRZ) Image after scaling (2xBRZ)

Pixel art scaling algorithms (xbr)

The xbr family is very useful for creating smooth edges. It will however deform the shape significantly, which in many cases creates a very appealing result. However it will create an effect similar to posterization by grouping together local areas into a single colour. It will also remove small details if in-between larger ones which connect together.

The example images use 4xBRZ and 2xBRZ respectively.

160×160 thumbnail reference160×160 thumbnail reference 160 by 160 upscaled thumbnail of 'Green Sea Shell' (GemCutter Preserve Details)160 by 160 upscaled thumbnail of 'Green Sea Shell' (Smooth Edges) Image after scaling (GemCutter Preserve Details)

Image-after-scaling smooth

Pixel art scaling algorithms (GemCutter)

An adaptable technique which can deliver variable amounts of detail or smoothness. It aims to preserve the shape and coordinates of original details, without blurring those details into neighboring ones. It will avoid blending pixels which directly touch each other, and instead only blend pixels with their diagonal neighbors.

The “Cutter” name comes from its tendency to cut corners of squares and turn them into diamonds, as well as create distinct faces along stair-stepped pixels, ie: those which exist on along the angles of edges found on a diamond. The “Gem” prefix both reffers to the diamond cut, and also many traditional gem cuts which involve cutting corners at a 45 degree angle.

The example images use GemCutter Preserve Details (Top), and GemCutter Smooth Edges (Bottom).

160×160 thumbnail reference Vectorization to 48 colors (Inkscape) Vectorization

Image tracing

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.
Scalable Vector Graphics are well suited to simple geometric images, while photographs do not fare well with vectorization due to their complexity.

Note that the special characteristics of vectors allow for greater resolution example images. The other algorithms are standardized to a resolution of 160×160 and 218×80 pixels respectively.

160×160 thumbnail reference EDSR waifu2x (unknown version?)

Deep convolutional neural networks

Using machine learning, convincing details are generated as best guesses by learning common patterns from a training data set. The upscaled result is sometimes described as a hallucination because the information introduced may not correspond to the content of the source. Enhanced deep residual network (EDSR) methods have been developed by optimizing conventional residual neural network architecture. Programs that use this method include waifu2x, Imglarger and Neural Enhance.

160×160 thumbnail reference ESRGAN RealESRGAN-x4plus TTA

Deep convolutional neural networks using perceptual loss

Developed on the basis of the super-resolution generative adversarial network (SRGAN) method, enhanced SRGAN (ESRGAN) is an incremental tweaking of the same generative adversarial network basis. Both methods rely on a perceptual loss function to evaluate training iterations.


Source: Comparison gallery of image scaling algorithms

Video about Which Method Is A High-Quality Scaling Algorithm For Enlarging Images

Resizing Images – Computerphile

Question about Which Method Is A High-Quality Scaling Algorithm For Enlarging Images

If you have any questions about Which Method Is A High-Quality Scaling Algorithm For Enlarging Images, please let us know, all your questions or suggestions will help us improve in the following articles!

The article Which Method Is A High-Quality Scaling Algorithm For Enlarging Images was compiled by me and my team from many sources. If you find the article Which Method Is A High-Quality Scaling Algorithm For Enlarging Images helpful to you, please support the team Like or Share!

Rate Articles Comparison gallery of image scaling algorithms

Rate: 4-5 stars
Ratings: 6892
Views: 7698219 2

Search keywords Which Method Is A High-Quality Scaling Algorithm For Enlarging Images

– Image Resizing
– Image Scaling
– Interpolation
– Image Resampling
– Nearest-Neighbor
– Bilinear
– Bicubic
– Lanczos
– Pixel Replication
#Comparison #gallery #image #scaling #algorithms