Page 13 of 19
Re: best downsampling method for DSLR photographs
Posted: 2012-07-24T18:17:31-07:00
by NicolasRobidoux
Fred: And yes: In my back of the envelope mind, there was no way that anything past RobidouxSharp could be any good. My grad student and Henry and you sure are blowing my back of the envelope off the table
Re: best downsampling method for DSLR photographs
Posted: 2012-07-24T21:28:19-07:00
by fmw42
Some more experiments:
1)
convert zelda3.png -filter catrom -define filter:blur=0.7 -distort resize 200% zelda3_200_distort_catrom_b0p7.png
2)
convert zelda3.png -define filter:support=2.5 -filter lagrange -distort resize 200% zelda3_200_distort_lagrange_order4.png
convert zelda3.png -define filter:support=3 -filter lagrange -distort resize 200% zelda3_200_distort_lagrange_order5.png
convert zelda3.png -define filter:support=3.5 -filter lagrange -distort resize 200% zelda3_200_distort_lagrange_order6.png
The catrom with filter:blur=0.7 is sharper than the default catrom (filter:blur=1). But it shows stair-stepped artifacts
The lagrange of order 4 (filter:support=2.5) is even sharper, but has far less artifacts, though there is some in comparison to the default order 3 (filter:support=2) lagrange. This is to be expected as the even order lagrange filters have discontinuous slopes. See (
http://www.imagemagick.org/Usage/resize/#lagrange).
The order 5 lagrange is only slightly sharper at best than the order 3 (default) lagrange.
There seems to be no or little increase in sharpness or difference, when using lagrange of order 6 in comparison to order 4.
3)
convert zelda3.png -filter catrom -define filter:lobes=2 -distort resize 200% zelda3_200_distort_catrom_lobes2.png (default)
convert zelda3.png -filter catrom -define filter:lobes=3 -distort resize 200% zelda3_200_distort_catrom_lobes3.png
convert zelda3.png -filter catrom -define filter:lobes=4 -distort resize 200% zelda3_200_distort_catrom_lobes4.png
Catrom with lobes=3,4 are not any sharper than with lobes=2.
Re: best downsampling method for DSLR photographs
Posted: 2012-07-24T22:55:02-07:00
by fmw42
The last few post here have gone off track from the subject about downsampling and have turned into upsampling. Perhaps this topic should be linked to
viewtopic.php?f=22&t=21435&start=15
Re: best downsampling method for DSLR photographs
Posted: 2012-07-25T12:57:47-07:00
by NicolasRobidoux
fmw42 wrote:...
What surprised me about my experiments with IM above was that the EWA versions of Catrom and Lagrange were noticeably better than the orthogonal ones.
...
(Gasp!)
Re: best downsampling method for DSLR photographs
Posted: 2012-07-25T13:02:35-07:00
by NicolasRobidoux
Anthony: If downsampling through Lab or actually anything else than linear RGB or XYZ turns out to be better than these last two, you'll shock more than just me.
Re: best downsampling method for DSLR photographs
Posted: 2012-07-26T02:50:35-07:00
by henrywho
NicolasRobidoux wrote:Fred: Your observations jive with "why" Henry tried EWA Catmull-Rom: To give "pixel peepers" all the sharpness they crave. His context was downsampling, but still.
Hey, I thought I had made myself clear in some posts that I prefer
EWA Lagrange over EWA Catrom for downsizing
in place of unsharpening.
Re: best downsampling method for DSLR photographs
Posted: 2012-07-26T04:51:51-07:00
by NicolasRobidoux
henrywho wrote:...
Hey, I thought I had made myself clear in some posts that I prefer EWA Lagrange over EWA Catrom for downsizing in place of unsharpening.
Message received: I was so certain that EWA Catmull-Rom would never amount to anything that I did not even bother to try it even though the code was right there.
Actually, I was even more certain that EWA Lagrange had to be junk, so I did not record that I should consider it, despite yours (and Fred's) strong hints.
I thought I had shades on, but they were blinders.
-----
Plain unwindowed Jinc has to be given another look. They have been visited before I believe, but only in the context of enlarging. Reducing is a different ball o'wax.
When downsampling, the raison d'etre of windowing, namely reducing slope discontinuities, is not so important. Getting rid of the window function thus seems reasonable.
Re: best downsampling method for DSLR photographs
Posted: 2012-09-14T07:15:14-07:00
by NicolasRobidoux
henrywho wrote:...
Hey, I thought I had made myself clear in some posts that I prefer EWA Lagrange over EWA Catrom for downsizing in place of unsharpening.
@Henry: Thank you, very much, for the clarification. Sometimes I do things too quickly. For this reasons, messages that clearly dot the i's are a friend.
Re: best downsampling method for DSLR photographs
Posted: 2012-09-14T10:26:24-07:00
by fmw42
henrywho wrote:Hey, I thought I had made myself clear in some posts that I prefer EWA Lagrange over EWA Catrom for downsizing in place of unsharpening.
Henry, in my quick tests, I did not see any significant difference. I would appreciate hearing from you what differences you saw and was this downsampling, upsampling or both. I presume these were very high quality or perhaps raw images that you processed, something with which I really have no experience.
Re: best downsampling method for DSLR photographs
Posted: 2012-09-18T15:01:18-07:00
by NicolasRobidoux
Here is an example of downsampling with sigmoidization, compared to downsampling through linear RGB (linear light being better at tonal faithfulness). It's the backpack image which Pictus (Luiz E. Vasconcellos) has used for tests earlier in this thread, and which Henry HO pointed us to.
Downsampled with EWA LanczosSharp through linear RGB:
Downsampled with EWA LanczosSharp sigmoidized with contrast = 6, pretty much the reasonable limit when downsampling:
The code:
Code: Select all
magick BackPack.jpg -colorspace RGB -filter LanczosSharp -distort resize 1200x1200 -colorspace sRGB EWALanczosSharp.0.png
for the first, and
Code: Select all
magick BackPack.jpg -colorspace RGB +sigmoidal-contrast 6 -filter LanczosSharp -distort resize 1200x1200 -sigmoidal-contrast 6 -colorspace sRGB EWALanczosSharp.6.png
for the second.
To see clearly the differences, you should flicker between the two images. To see the difference in haloing, enlarge and follow sharp boundaries, for example where wood meets sky.
The sigmoidized version not only has decreased halos, but it also has slightly sharper and less jaggy thin features. Look at the zipper track.
But there is no question that sigmoidization affects tonal faithfulness in areas where pixels with midtones mixed in with more extreme values.
Re: best downsampling method for DSLR photographs
Posted: 2012-09-19T03:54:54-07:00
by henrywho
Yup, there are fewer halos; unfortunately, it also reduces the reflection of the nylon fibre vastly. May we use a 2-lobe downsizer with lower sigmoidization value?
The backpack photo is a special use-case. EWA Catrom, "Cub-grange" (cubic @ c=0.4846), Lagrange and Lanczos2VerySharp (blur=0.88826421508540347), in decreasing order of acutance, are actually preserving the nylon texture better than "gently-sharp" schemes like GinSeng under such a big down-sampling operation.
Re: best downsampling method for DSLR photographs
Posted: 2012-09-19T04:49:00-07:00
by NicolasRobidoux
@Henry: As usual, you bring some very interesting observations and ideas to the table.
Thank you.
P.S. You tried Ginseng (-resize with Jinc-windowed Sinc)?
Re: best downsampling method for DSLR photographs
Posted: 2012-09-19T05:58:52-07:00
by NicolasRobidoux
I am starting to get the hint that sigmoidization is indeed a bad idea when downsampling if there are fine textures. It may only be a general recommendation when dealing with "synthetic" images (like line drawings).
This backpack test image is wonderful. Sigmoidization makes everything look at least as good EXCEPT on the backpack itself.
It looks like when there is actual, real, natural moire that one wants to preserve, sigmoidization messes it up.
Even the webbing straps are affected.
-----
When downsizing, linear light strikes again.
Re: best downsampling method for DSLR photographs
Posted: 2012-09-19T06:00:16-07:00
by NicolasRobidoux
Here is Ginseng through linear light (no sigmoidization):
Code:
Code: Select all
magick BackPack.jpg -colorspace RGB -define filter:window=Jinc -define filter:lobes=3 -resize 1200x1200 -colorspace sRGB Ginseng.0.png
Yes, there is halo when one pixel-peeks. But the textures are nicely preserved.
Re: best downsampling method for DSLR photographs
Posted: 2012-09-19T06:10:47-07:00
by NicolasRobidoux
Isn't it funny? I spend all this time trying to minimize (artificial) moire, and then fall in love with a scheme that preserves (natural) moire.