best downsampling method for DSLR photographs

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
NicolasRobidoux
Posts: 1944
Joined: 2010-08-28T11:16:00-07:00
Authentication code: 8675308
Location: Montreal, Canada

Re: best downsampling method for DSLR photographs

Post by NicolasRobidoux »

I put a bunch of downsamples of the windmill image, all produced through linear light using ImageMagick's internal conversion, with bleeding edge ImageMagick v7 (well, maybe I'm behind a few days) in this folder: http://web.cs.laurentian.ca/nrobidoux/m ... 1024x1536/
I think the names are pretty self-explanatory: Jinc means Jinc-windowed Jinc (a.k.a. EWA Lanczos), Sinc means Sinc-windowed Sinc (a.k.a. "standard" Lanczos), an "o" prefix means that I used -resize (tensor a.k.a. orthogonal resizing), no "o" prefix means that I used -distort Resize (EWA). I've only included methods which my back of the envelopes suggest are worthwhile. (Although I skipped LanczosSharp and Lanczos2Sharp, in part because I'm tired of specifying whether it's the new or the old version. LanczosSharp is almost the same as Lanczos anyway.) I may add more (by popular request), for example Lagrange and Triangle, or adding USM while still in linear light at the end. I may add Kaiser-windowed Jinc or Sinc later.
I may also produce another set which has 1024 as longest (instead of shortest) dimension.
Some of the methods have almost identical parameters (so theyre are some near "redundancies") but I put them there anyway for the sake of completeness.
If you email me or point me to downsamples, of the same dimensions, produced with other software tools, I'll add them to this folder.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: best downsampling method for DSLR photographs

Post by fmw42 »

Can you zip them all for easy download?
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: best downsampling method for DSLR photographs

Post by fmw42 »

NicolasRobidoux wrote:
Pictus wrote:...
I am enjoying the sharpness of EWA Catrom...
Image
I really don't like the "jaggies" in the EWA Catrom version of the windmill (maybe we should rename this test image "the brick wall", because it's the wonderful piece of not quite straight brickwork which we all argue about). (There are in Lanczos too, but less obvious.)
Just looking, I bet it's going to moire like crazy at some reduction ratios: The antialiasing is just not good enough. It's right at the edge of "in your face" moire.
I think the desired result is going to depend upon the user's intentions. So a visually sharper image at one scale may be just fine, even though at more reduction it may moire. So I would not exclude some of these filters on such concepts. However, your tests may be designed for certain factors that have nothing to do with what is visually pleasing under limited conditions.

Furthermore demonstrating such extremes may be a good thing for your testing, just as a demonstration.
Last edited by fmw42 on 2012-05-14T12:26:47-07:00, edited 1 time in total.
NicolasRobidoux
Posts: 1944
Joined: 2010-08-28T11:16:00-07:00
Authentication code: 8675308
Location: Montreal, Canada

Re: best downsampling method for DSLR photographs

Post by NicolasRobidoux »

fmw42 wrote:Can you zip them all for easy download?
Done. It's 1024x1536.zip.
NicolasRobidoux
Posts: 1944
Joined: 2010-08-28T11:16:00-07:00
Authentication code: 8675308
Location: Montreal, Canada

Re: best downsampling method for DSLR photographs

Post by NicolasRobidoux »

I'm adding another set, this time at the original size discussed (I believe) on the Digital Photography Review Forum: http://web.cs.laurentian.ca/nrobidoux/m ... /683x1024/. I'll put a zip version there as soon as the upload is done.
NicolasRobidoux
Posts: 1944
Joined: 2010-08-28T11:16:00-07:00
Authentication code: 8675308
Location: Montreal, Canada

Re: best downsampling method for DSLR photographs

Post by NicolasRobidoux »

What a great test image!
NicolasRobidoux
Posts: 1944
Joined: 2010-08-28T11:16:00-07:00
Authentication code: 8675308
Location: Montreal, Canada

Re: best downsampling method for DSLR photographs

Post by NicolasRobidoux »

fmw42 wrote:
NicolasRobidoux wrote:Just looking, I bet it's going to moire like crazy at some reduction ratios: The antialiasing is just not good enough. It's right at the edge of "in your face" moire.
In addition, my "bet" may be a losing one: It's starting to look like they're all pretty good (if you don't mind some haloing).
NicolasRobidoux
Posts: 1944
Joined: 2010-08-28T11:16:00-07:00
Authentication code: 8675308
Location: Montreal, Canada

Re: best downsampling method for DSLR photographs

Post by NicolasRobidoux »

I forgot to include the "plain" Jinc Lanczoses (2, 3, and 4). P.S. Fixed.
Last edited by NicolasRobidoux on 2012-05-14T14:18:56-07:00, edited 1 time in total.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: best downsampling method for DSLR photographs

Post by fmw42 »

Can you include the original subsection at full resolution?
NicolasRobidoux
Posts: 1944
Joined: 2010-08-28T11:16:00-07:00
Authentication code: 8675308
Location: Montreal, Canada

Re: best downsampling method for DSLR photographs

Post by NicolasRobidoux »

fmw42 wrote:Can you include the original subsection at full resolution?
You mean this? http://www.mediafire.com/?49ahiwm5ukfu6c9
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: best downsampling method for DSLR photographs

Post by fmw42 »

NicolasRobidoux wrote:
fmw42 wrote:Can you include the original subsection at full resolution?
You mean this? http://www.mediafire.com/?49ahiwm5ukfu6c9
Yes. But sorry, from your example above, I had assumed that you had done all your tests on that particular subsection only. I had not looked at the text result images first.
NicolasRobidoux
Posts: 1944
Joined: 2010-08-28T11:16:00-07:00
Authentication code: 8675308
Location: Montreal, Canada

Re: best downsampling method for DSLR photographs

Post by NicolasRobidoux »

To my great surprise, it appears that some digital photographers really like a lot of enhanced acutance. This may mean that I should push (de)blurs past the "Sharpest" end. The theoretical back of the envelope limit is sqrt(2)/2 = .7071...
P.S. Reading the following post by Fred, it would appear that it's not only digital photographers...
P.S. 2 I thought I would add "push the knob to 11" sharpened Jinc EWA methods (set the blur to sqrt(2)/2), but when I look at the jagginess and halos of Catrom and Lagrange, even without enlarging, I just shudder. I'll try to find myself an image which knocks them down with moire. I'll probably relent: Lost of acutance does make things look sharp :-/ P.S. 3 Added them. They go in my "bad" bin.
Last edited by NicolasRobidoux on 2012-05-15T09:12:51-07:00, edited 6 times in total.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: best downsampling method for DSLR photographs

Post by fmw42 »

Just from my own, non-photographer, perspective, I like the sharpness of the Catrom and Lagrange. I would expect that Photoshop users, who expect to see some sharpening from USM built into their resampling might also prefer these. (Seems like my suggestion to Anthony to implement Lagrange and Keys cubic convolution may have some benefit after all).
henrywho
Posts: 188
Joined: 2011-08-17T06:46:40-07:00
Authentication code: 8675308

Re: best downsampling method for DSLR photographs

Post by henrywho »

As for upsize, tritical@doom9 has been maintaining an intra-field only deinterlacer which can be used as a video upsizer (http://forum.doom9.org/showthread.php?t=147695).

Sample images at:
http://forum.doom9.org/showthread.php?p ... ost1482017
http://forum.doom9.org/showthread.php?p ... ost1481498
http://bengal.missouri.edu/~kes25c/nnedi2_images/

The results are in most cases jagger-free, very good for video uses (e.g. upsizing DVD to 720p). How would you evaluate it for still photos?
NicolasRobidoux
Posts: 1944
Joined: 2010-08-28T11:16:00-07:00
Authentication code: 8675308
Location: Montreal, Canada

Re: best downsampling method for DSLR photographs

Post by NicolasRobidoux »

henrywho wrote:As for upsize, tritical@doom9 has been maintaining an intra-field only deinterlacer which can be used as a video upsizer...
This "2x enlarger" is very good, and it is based on a very original idea.
(Biased foot in mouth warning) I do not like that sometimes it creates features that are not there. That is, it creates a "plausible 2x reality" which does not necessarily fits reality. But it does it, from my limited testing, in a very attractive way. When I compared with my own methods a while ago, I felt a little bit like an old timer watching the next generation rising up to the challenge and wondering about being left in the dust. (No clue how old tritical is...) No time to double check things so that this paragraph not haunt me later. So, let me leave it at that.
Post Reply