Downsampling and stair interpolation

These are pixel-greedy days – the more pixels your DSLR has the better. Hardly anyone disputes that. But when it comes to showcasing ones work on the Internet the number of pixels has to be reduced, either to protect copyrighted work, for the sake of reducing file size, or just to be able to display the whole image on screen. Actually thinking about it I display my pictures on screen much more than on paper.

Image resampling is focused primarily on upscaling, e.g. increasing the number of pixels in an image to prepare it for printing, especially when making larger prints. Various resampling algorithms have been devised for blowing up images. Here I make an attempt to compare some of these methods, when reducing the size of the image.

Downsampling inevitably wipes out some of the detail – there are simply less pixels to store the data. Also due to the way interpolation works some degree of softness is introduced to the image when downsampling. Sharpness can be brought back by applying some amount of unsharp masking AFTER the image has been downsampled.

One of the things I’ve payed special attention to when looking at the results from down sampling is if the given method manages to preserve fine detail. For example the detail textures small patterns etc. The move to try different interpolation methods for down sampling was a method called stair interpolation. The basic idea behind this method is to perform the dawnsampling in incremental steps (hence stair interpolation), each step preceded by applying some USM. In theory applying USM before down sampling should fightback some of the softness introduced. Reading through some blogs there was a fair amount of discussion if this works, is useless or even degrades the quality of the resulting image.

Speaking of USM – sharpness is largely a thing of personal taste. Yet for pleasing results, edge halos and aliasing must be avoided.

I also found some references that many interpolation algorithms behave similarly at particular resampling ratios, like 50%, one third etc. This may be so but my tests did not reveal anything outrageous, so resample at whatever steps you want to, I guess.

In the test results I’ve also included crops from the originals so one would be able to judge what to expect from the crops. First example shot with Canon 50mm f 1.4 on tripod, second with Canon 17-40 f4 L on tripod, third and fourth Canon 100mm f2.8 macro hand held. All mounted on a 20D.

The last 3 step stair interpolation is intentionally quite over sharpened to show the perils of pushing USM way too far.

All in all I believe stair interpolation has potential to bring up really fine detail to downsampled images. It is interesting to note that the amount of sharpening needed varies hugely depending on the subject matter. For instance the second example shows some really ugly artifacts even at fair sharpening applied while the third example shows pleasing detail on the girl’s eyelashes at severe amounts of USM. If you are really mad about detail, you could do selective sharpening at each step and bring detail only where you need it. You might also need special medical help 🙂

Happy downsampling !

References

  • controlledvocabulary.com
  • americaswonderlands.com
  • contaxg.com
  • photo.net
  • prophotohome.com

    Landscape/architecture

  • method result
    original
    bell – irfan view 3.99
    BSpline – irfan view 3.99
    Hermite – irfan view 3.99
    Lancoz – irfan view 3.99
    Mitchell – irfan view 3.99
    Triangle – irfan view 3.99
    Bicubic – Photoshop CS2
    Bicubic Sharper – Photoshop CS2
    2 step stair bicubic (USM: 130/0.8/5, 140/0.7/5) – Photoshop CS2
    2 step stair bicubic (USM: 160/1/5, 140/0.7/5) – Photoshop CS2
    3 step stair bicubic (160/1/5, 150/0.8/4, 130/0,6/4) – Photoshop CS2

  • Landscape

  • method result
    original
    bell – irfan view 3.99
    BSpline – irfan view 3.99
    Hermite – irfan view 3.99
    Lancoz – irfan view 3.99
    Mitchell – irfan view 3.99
    Triangle – irfan view 3.99
    Bicubic – Photoshop CS2
    Bicubic Sharper – Photoshop CS2
    2 step stair bicubic (USM: 130/0.8/5, 140/0.7/5) – Photoshop CS2
    2 step stair bicubic (USM: 160/1/5, 140/0.7/5) – Photoshop CS2
    3 step stair bicubic (160/1/5, 150/0.8/4, 130/0,6/4) – Photoshop CS2

  • Portrait

  • method result
    original
    bell – irfan view 3.99
    BSpline – irfan view 3.99
    Hermite – irfan view 3.99
    Lancoz – irfan view 3.99
    Mitchell – irfan view 3.99
    Triangle – irfan view 3.99
    Bicubic – Photoshop CS2
    Bicubic Sharper – Photoshop CS2
    2 step stair bicubic (USM: 130/0.8/5, 140/0.7/5) – Photoshop CS2
    2 step stair bicubic (USM: 160/1/5, 140/0.7/5) – Photoshop CS2
    3 step stair bicubic (160/1/5, 150/0.8/4, 130/0,6/4) – Photoshop CS2

  • Landscape/architecture

  • method result
    original
    bell – irfan view 3.99
    BSpline – irfan view 3.99
    Hermite – irfan view 3.99
    Lancoz – irfan view 3.99
    Mitchell – irfan view 3.99
    Triangle – irfan view 3.99
    Bicubic – Photoshop CS2
    Bicubic Sharper – Photoshop CS2
    2 step stair bicubic (USM: 130/0.8/5, 140/0.7/5) – Photoshop CS2
    2 step stair bicubic (USM: 160/1/5, 140/0.7/5) – Photoshop CS2
    3 step stair bicubic (160/1/5, 150/0.8/4, 130/0,6/4) – Photoshop CS2

    Автор: Стефан Димов

    The best labor-saving device of today is tomorrow.

    1 коментар към “Downsampling and stair interpolation”

    1. Ignore all this crap and use your raw convertor’s sharpening capabilities 🙂

    Вашият коментар

    Вашият имейл адрес няма да бъде публикуван. Задължителните полета са отбелязани с *