Page 12 of 19
Re: best downsampling method for DSLR photographs
Posted: 2012-07-11T13:24:51-07:00
by NicolasRobidoux
I just had to try it. Starting a new thread:
viewtopic.php?f=22&t=21415
Re: best downsampling method for DSLR photographs
Posted: 2012-07-13T04:22:40-07:00
by NicolasRobidoux
Dane Vandeputte wrote:NicolasRobidoux wrote:
I wager that Eric Brasseur, in his famous post
http://www.4p8.com/eric.brasseur/gamma.html, could have fixed things so that the Dalai Lama disappears when downsized through linear light, but looks fine when processed through sRGB.
Yes, this is possible, and just as the Dalai Lama disappears from the downsized linear light image, so too has he disappeared from the unscaled image.
Dane: The Brasseur posting avoids filters with significant negative lobes, and only uses non-sharpening convolutions. I have not worked out the details yet so I'm not sure, but I believe that I may be able make the Dalai Lama disappear from the downsample through linear light without it disappearing from the full size image or the image processed in sRGB. Same, possibly, if I sharpen it.
This hunch is related to the "Sigmoidal resampling" idea. More about this later.
Re: best downsampling method for DSLR photographs
Posted: 2012-07-13T11:06:05-07:00
by Pictus
NicolasRobidoux wrote:Henry and Luiz and whoever else feels like testing and posting opinions:
Could you please let me know what you think of EWA Lanczos2Sharpest, Lanczos3Sharpest and Lanczos4Sharpest as downsampling schemes, ideally through linear light?
Sorry for the delay, I need to set my forum options to monitor this thread.
There are millions of Luiz around, but not much Pictus...
So can call me Pictus, if you wish...
The
Lanczos4 creates too much ringing, but it is useful when the others still left some moiré, see the
backpack test
viewtopic.php?f=1&t=20992&start=105#p85248
The
Lanczos3 is the safest bet, a good balance between artifacts and acutance.
The
Lanczos2 the acutance is a bit low and not noiré free as the Lanczos3, the good part is very low ringing.
Check with the WindMill
http://www.mediafire.com/?49ahiwm5ukfu6c9
I bet that most DSLR users will prefer the EWA Catrom or EWA Lanczos3.
The crazy pixel peepers will load one layer with Catrom and another with Lanczos2
and mask the Catrom areas where there is too much halos.
Here
http://www.mediafire.com/i/?rzm5jf4pq3i4ql7 (I do not know who is the owner)
a Sony a900 photo, very good to do some tests...
For anyone interested, here
http://dl.dropbox.com/u/4686872/1200_EWA.bat a batch file
I use to resize using many different settings, it is made for ImageMagick V6.
It process TIFF to avoid JPG artifacts...
The batch file creates many files, I load them into Photoshop with
Dr. Brown’s Services 2.2.9
Stack-A-Matic to compare the results, can get at
http://www.russellbrown.com/scripts.html
To use go to Photoshop menu File>Scripts>Load files into Stack
Update, Dr. Brown’s Services 2.2.9 is
not needed to load files into Stack, sorry!
http://digidelights.blogspot.com.br/201 ... orial.html
Re: best downsampling method for DSLR photographs
Posted: 2012-07-13T11:26:21-07:00
by Bonzo
So are all these conversions still relying on what dcraw converts when converting from a CR2 file?
My call to dcraw has been changed as all the images were coming out a bit bright from memory and I changed the -4 to a -6 I think
<delegate command="dcraw.exe -6 -w -O "%u.ppm" "%i"" stealth="True" decode="dng:decode"/>
Did dcraw used to be Ufraw?
Anyway I did a test with the batch file and I ended up with alternate too dark files and slightly over exposed files to my eye.
Re: best downsampling method for DSLR photographs
Posted: 2012-07-13T19:08:46-07:00
by Dane Vandeputte
NicolasRobidoux wrote: Dane: The Brasseur posting avoids filters with significant negative lobes, and only uses non-sharpening convolutions. I have not worked out the details yet so I'm not sure, but I believe that I may be able make the Dalai Lama disappear from the downsample through linear light without it disappearing from the full size image or the image processed in sRGB. Same, possibly, if I sharpen it.
This hunch is related to the "Sigmoidal resampling" idea. More about this later.
Since the human eye performs optical lowpass filtering in linear light, I would imagine that any downsampling method seeking to mimic the filtering performed by our eyes (the "holy grail" of downsampling?) would also use linear light (at least initially, and perhaps followed later by nonlinearities). Aside from all the math, this is why I believe that what you seek is impossible, but even as far as the math is concerned, I am still very skeptical that it can be done. Let's just say that I would be
extremely impressed if you manage to pull this off. I certainly wish you all the best in your endeavors!
Re: best downsampling method for DSLR photographs
Posted: 2012-07-16T13:46:41-07:00
by NicolasRobidoux
@Pictus: Just to make sure, your last comments have to do with orthogonal (-resize) Lanczos or EWA (-distort resize)?
Re: best downsampling method for DSLR photographs
Posted: 2012-07-16T14:15:36-07:00
by Pictus
EWA
I used the batch file, it got this
Code: Select all
convert %1 -filter Catrom -distort resize 1200x1200 "%~n1_EWAcatromSRGB.tif
convert %1 -colorspace RGB -filter Catrom -distort resize 1200x1200 -colorspace sRGB "%~n1_EWAcatrom.tif
convert %1 -colorspace RGB -filter Lanczos2 -define filter:blur=0.88826421508540347 -distort Resize 1200x1200 -colorspace sRGB "%~n1_EWALanczos2Sharpest.tif
convert %1 -filter Lanczos2 -define filter:blur=0.88826421508540347 -distort Resize 1200x1200 "%~n1_EWALanczos2SharpestSRGB.tif
convert %1 -colorspace RGB -filter Lanczos -define filter:blur=0.88549061701764 -distort Resize 1200x1200 -colorspace sRGB "%~n1_EWALanczos3Sharpest.tif
convert %1 -filter Lanczos -define filter:blur=0.88549061701764 -distort Resize 1200x1200 "%~n1_EWALanczos3SharpestSRGB.tif
convert %1 -colorspace RGB -filter Lanczos -define filter:lobes=4 -define filter:blur=0.88451002338585141 -distort Resize 1200x1200 -colorspace sRGB "%~n1_EWALanczos4Sharpest.tif
convert %1 -filter Lanczos -define filter:lobes=4 -define filter:blur=0.88451002338585141 -distort Resize 1200x1200 "%~n1_EWALanczos4SharpestSRGB.tif
Re: best downsampling method for DSLR photographs
Posted: 2012-07-16T14:39:50-07:00
by NicolasRobidoux
@Pictus: All clear now.
Thank you very much for these impressions. Adding to my small collection of "opinions" (which pretty much all agree, esp. if one takes into account pixel peepers' sharpness addition).
I also really like standard orthogonal Lanczos 3. I'm not surprised it's so popular.
Re: best downsampling method for DSLR photographs
Posted: 2012-07-24T12:43:48-07:00
by NicolasRobidoux
@Henry HO: There are many factors at play here, but in one reasonable variant of the "rankings" of filters as enlargement methods for "subcritical" images (well filtered: most likely not much going on near the Nyquist limit), EWA Catmull-Rom comes out at the top of all 3- and 2- and "1"-lobe method. The only ones that beat it are orthogonal Welsh4, Cosine4, Lanczos4 and Hamming4.
I'm shocked! But I figure you may be pleased.
When you enlarge sharper images, EWA Catmull-Rom gets a fairly "ordinary" rank. Which is not surprising.
More details when I put the draft of my student Adam Turcotte's thesis online. (Give it a week.)
Re: best downsampling method for DSLR photographs
Posted: 2012-07-24T16:23:39-07:00
by fmw42
Just following this last post from Nicolas, so I tried some 2x enlarging experiments with the zelda3.png image.
Ranking in order of increasing sharpness with some ties in the list (shown by color):
convert zelda3.png -filter mitchell -resize 200% zelda3_200_mitchell.png (supposedly the default for magnification)
convert zelda3.png -interpolate bilinear -resize 200% zelda3_200_bilinear.png
convert zelda3.png -interpolate bilinear -filter point -resize 200% zelda3_200_point_bilinear.png
convert zelda3.png -filter lanczos -define filter:lobes=4 -distort resize 200% zelda3_200_distort_lanczos4.png
convert zelda3.png -interpolate filter -filter catrom -resize 200% zelda3_200_filter_catrom.png
convert zelda3.png -interpolate filter -filter lagrange -resize 200% zelda3_200_filter_lagrange.png
convert zelda3.png -filter catrom -distort resize 200% zelda3_200_distort_catrom.png
convert zelda3.png -filter lagrange -distort resize 200% zelda3_200_distort_lagrange.png
The best two in terms of sharpness only were:
-filter catrom -distort resize
-filter lagrange -distort resize.
Both were imperceptibly different in sharpness to my eyes.
The both were noticeably better than -filter lanczos -define filter:lobes=4 -distort resize. Even -interpolate filter -filter catrom/lagrange -resize were better than -filter lanczos -define filter:lobes=4 -distort resize.
Re: best downsampling method for DSLR photographs
Posted: 2012-07-24T16:25:57-07:00
by NicolasRobidoux
Fred:
Thank you. Very much.
I'm even more shocked!
Re: best downsampling method for DSLR photographs
Posted: 2012-07-24T16:31:49-07:00
by NicolasRobidoux
Warning: 200% is not enough to have the ugly artifacts show up.
Re: best downsampling method for DSLR photographs
Posted: 2012-07-24T16:39:57-07:00
by fmw42
NicolasRobidoux wrote:Warning: 200% is not enough to have the ugly artifacts show up.
Yes, I understand. That was why I just ranked them by apparent sharpness and used 2x. I have not tried 8x or anything like that. I was just interested in visual sharpness for modest size increases.
Note my edits to rank the filters in my previous post.
Re: best downsampling method for DSLR photographs
Posted: 2012-07-24T18:08:36-07:00
by fmw42
Nicolas,
Just a side note. The results above parallel what my earlier experiences with image processing showed years ago at the time when resampling was very simple. We had only 3 (orthogonal, non-windowed) methods at the time used for both minification and magnification: nn, bilinear and Key's cubic convolution (Catmull-Rom). The latter was clearly the best in both magnification and minification. At one point I did some experiments with Lagrange resampling and found that it was nearly identical in sharpness to the Key's results. At that time sharpness was more important to our clients than other artifacts.
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.
I just did one more experiment with EWA mitchell and Robidouxsharp:
convert zelda3.png -filter mitchell -distort resize 200% zelda3_200_distort_mitchel.png
convert zelda3.png -filter robidouxsharp -distort resize 200% zelda3_200_distort_robidouxsharp.png
And the Catrom and Lagrange again win out. But that does not surprise me as the Catrom is so far to the extreme of the Mitchell-Netravali Filter Family compared to Mitchell and the Robidoux family.
Re: best downsampling method for DSLR photographs
Posted: 2012-07-24T18:15:09-07:00
by NicolasRobidoux
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.