Stair Interpolation and down-sampling

Discussion in 'Digital Darkroom' started by gregp, Jul 11, 2003.

  1. I have read about the advantages of stair-interpolation when
    up-sampling a file. Are there any advantages to
    stair-interpolation when down-sampling an image?
  2. Sometimes. Depends on the image. Whenever I prep a full size scan for online display in jpeg format I first see how it looks by downsizing directly to the desired final dimensions. If that looks okay I'll go with it. Usually it needs one more bit of tone tweaking and sharpening before compression.

    About half the time the results are better if I downsize incrementally, tweaking and sharpening a little as I go.

    B&W photos, especially those with large expanses of similar tones such as skies, usually benefit from the latter method. Smoother tones.
  3. I fundamentally disagree with the concept that incremental resampling gives better quality than a well chosen single step algorithm. You might get more edges (and more artefacts), but there won't be any more detail than in the original. For down-scaling I can't imagine that you would get any benefit whatsoever...
  4. Actually, when I originally attempted to downsize my 1Ds files for web view, I noted that the results were terrible if I did it in one fell swoop. I then step-downsized, and voilla, near perfection. I mentioned theis to Fred Miranda and asked him to build a 1Ds downsizing action. Well he did -- It's called 1Ds WP, costs about $10 and works great :)

  5. No disagreement there, Gordon, assuming your assertion is in fact limited as expressed to "...a well chosen single step algorithm."

    The problem is that we have little control over the algorithm. Since this varies from one program to the next all we can do as end users is to adjust our techniques to suit the capabilities or limitations of the software we use.
  6. Lex:<br>
    Do you have any rules of thumb for step-wise downsampling or
    is it just trial and error?
  7. "About half the time the results are better if I downsize incrementally, tweaking and sharpening a little as I go."

    Agreed. I find that <sharpen lightly, downsample by 70%>, repeat retains more detail than a single bicubic downsample in Photoshop. (Starting with 4000 dpi scans of Provia.) I suspect that there may be better procedures for digital camera originals, though.
  8. More madness than method in my approach. For some odd reason possibly related to an as-yet undiagnosed obsessive-compulsive disorder I like 11's for digital editing.

    For example, I tend to tweak everything in multiples of 11. So I downsize 66% at a whack until I get close to the desired final dimensions.

    I think this obsession with 11's started when I noticed that when boosting the gamma of certain photos in Corel Photo-Paint I preferred 1.11 over 1.10 or 1.12. After that it was all downhill: a 33 here, a -0.44 there, 555mg Xanax at night...
  9. There are many different resampling methods, and I have done a diagram that shows a few of those offered by Irfanview (size increases). Each has pros and cons, and there is no single method that is ideal. This whole topic is subjective, and it takes a lot of definitions to get a clear result. The more operations you do on an image, the more likely you will lose data, and make it look worse. All images benefit from sharpening, and for these bilinear resampling (when reducing size) is optimum since it introduces the least artefacts, while other resampling methods produce various artefacts which are worsened by sharpening. The topic of sharpening is also very subjective. I think Lex is getting close to the truth - don't spend so much time worrying about it...
  10. Downsampling is an extremely important topic on which too little research has been expended. I agree that the 1D WP and D60 WP samples
    on Fred Miranda's website look convincing, but Gordon's examples show
    that the Mitchell filter sharpened is a good space/quality tradeoff.
    Another thing is that at some values (25% 33% 50% 67% 75%)
    downsampling algorithms often perform identically.

    Anybody know the stairstep values in the 1Ds WP action? Is it 50%
    each time, like the upsampling stairstep? I used to do this on my own
    website, but concluded that Mitchell plus sharpening produces smaller,
    clearer thumbnails.
  11. Maybe it's just me, or maybe it's the "Emperor's New Clothes" syndrome, but if you simply do an unsharp mask on the "standard photoshop downsizing" examples on FM's website you get something that looks identical to those obtained from the "WP" action that FM sells for $10.

    I'm totally unconvined that stepwise downsampling (or any other complex "action") is actually any better than a one step downsize and sharpen sequence.
  12. Define 'better'.

    A 'correct' downsampling algorithm will bandlimit the image to
    within the Nyquist limit of the new pixel pitch and then do the
    downsampling in such a way as to preserve the continuity of the
    image. Photoshop's bicubic interpolation does this pretty well.

    If you don't bandlimit, or if you use a filter that has spatial phase
    errors, you end up sharpening at the same time as you
    downsample. This can 'look' better, and is subtly different from a
    post-downsample sharpen because it includes components of
    the original image that are lost in the 'correct' downsample.

    That said, I haven't found the examples scattered across the web
    particularly convincing. Perhaps it's because I have a strong
    personal aversion to aliasing - I have noticed that other people
    don't seem to mind or notice it as much. I can see the
    theoretical point that stair interpolation can make a difference for
    a particular image, but in practice I don't find it worth the trouble,
    or even $10.
  13. Struan is of course correct. Resampling filters which emphasize detail involve some degree of aliasing, and in extreme cases create artefacts which can be horrible to look at. Even a single step bicubic can cause strange results, if an image contains a regular pattern. In this respect stair-stepping could be useful in "smoothing" these artefacts.

    I did a checker-board example, which though not realistic, gives some idea of what can happen:
  14. Oops, forgot the example.
  15. From my experience, 1-(large)step downsampled images are usualy worse than those that were downsampled using a few (smaller) steps. They seem not as sharp and there are pronounced jaggies on diagonal lines.
  16. Gordon, that's quite a torture test - with the original right at the
    Nyquist limit for the higher pixel count you have no hope of
    avoiding aliasing in a general one-shot filter unless it does
    some agressive blurring. Even then phase errors will likely bite
    if the pattern is at all extended.

    The 'correct' answer is a uniform grey, so *all* the resampled
    shots are 'wrong'. I guess that most people would pick the right
    hand picture as best, but I would be reaching for my Gaussian
  17. Struan: The bilinear resampling used in Paint Shop Pro (actually weighted-average in Versions 5 to 7) gives a perfectly smooth grey tone for that example (one-step filter), as does Irfanview.

    Paint Shop Pro does not recommend use of bicubic for down-sizing, because of the artefact problem.

    There really is no filter that works for every example, and for both up and down-sizing.
  18. Why do people beleive this foolishness??? Can you tell which was stepped to
    250% over 15 10% upsamples and which was upsampled to 250% in one
    step? If it does not work for upsample, it probobly will not work for
    downsample. Quite frankly, I have been happy with downsample.
  19. Yes Shawn, I can tell, and posted an ImageMagick "diff" of your pics /">on this thread. Bilinear downsampling produces smoother images at the expense of detail, whereas Bicubic produces more detailed images at the expense of smoothness.

Share This Page