Comparing super resolution tools

To scale an image without losing sharpness, these free tools use efficient algorithms.

The first script will be used to assess the quality of these tools, we will compare them with a simple scaling algo achieved without any optimization. In this algorithm, included in the code of the page, each pixel of the original image is replaced by a square of the same color, 2 or 4 pixels aside.

Secondly I tried a bilinear interpolation algorithm, which is simple and fast, but I saw that the browser provides a similar result, then I have not included the script in the list. It is easier to use the browser: you load the image with the <img> tag , and assigns to width and height properties values superior to the original dimensions. The scale function of the Canvas tag also uses this algorithm.

The third tool is the HQX program by Maxim Stepin which uses a lookup table to select intermediate colors and so remove jaggies. (Tested on Windows 10, does not seem functional).

Finally the Scale2X program from AdvanceMAME offers the same magnification factors of 2, 3 or 4 that HQX. It is faster. Its aim is the creation of game emulators and this is probably why it is the most effective on sprites. (Successfully tested on Windows 10).

Image Resampler is another tool which has been tested but not included in the samples. It provides an intermediate result between the browser and HQX for sprites. Images are less pixelated than with the bilinear or bicubic interpolation algorithms but still blurred. Its disadvantage is that the image is resized in TGA format and must be converted for the Web.

  Original Low resolution Browser HQX Scale 2X
Small icon
Big icon

Poster:

The silence of the lambs

Sprite: the plumber

Photo of the face of a girl

Original Low resolution Browser
  HQX Scale 2X
 

Conclusions

Image hidden in the poster of The silence of the lambs

Scale2X generally provides the clearest picture, but seems to have trouble with round shapes. For a photo, it does not perform better than the browser. For the record, this photo is itself the result of an algorithm.
It is on small complex but coarser images than Scale2X provides the best result, but it is then equivalent to HQX.

In some cases, including the photo, the browser provides a picture as clear as these tools. The linear interpolation algorithm can be sufficient most of the time, and if the image is to a web page, you can simply load the original and enlarge it in the page.

Unfortunately, super-resolution can not provide a more accurate picture than the original image. From what we see in the television series, such algorithms exist, but it is not the goal of the algorithms here. Otherwise the image extracted of the movie poster The Silence of the Lambs would look like the image you see on the right.

t>