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?".
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 »

To my eyes, not much obvious difference, except jinc4sharpest seems to have slightly less (red) color in the rocks on the left and the wood fence.
Bonzo
Posts: 2971
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

Re: best downsampling method for DSLR photographs

Post by Bonzo »

Thanks for the links Nicolas.
Bonzo
Posts: 2971
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

Re: best downsampling method for DSLR photographs

Post by Bonzo »

As you say fmw42 its hard to tell the difference; but there are differnces.

I would say Jinc3Sharpest.png looks the sharpest and the colours looked best in Jinc3Radius3.png although it seems a bit softer.

I do not know the more you look and which one you look at first makes me change my mind!
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 »

Our psychovisual system is really strange: If you rapidly flip between two nearly identical images, watch out for http://www.scholarpedia.org/article/Visual_masking.
P.S. I was originally warned about this by Dr. Kirk Martinez, Dept. of Electronics and Computer Science, U. Southampton http://users.ecs.soton.ac.uk/km/.
Last edited by NicolasRobidoux on 2012-05-16T14:18:31-07:00, edited 2 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 »

NicolasRobidoux wrote:Our psychovisual system is really strange: If you rapidly flip between two nearly identical images, watch out for http://www.scholarpedia.org/article/Visual_masking.
Interesting article. Yes, I was alternating rapidly in my comparison. But jinc4sharpest looked more different in comparison to each of the others (to my viewing). That is not to say which one is best. I just thought it seemed to have slightly different coloration than the others.

I have a hard time seeing much difference in sharpness. I guess my eyes are not trained for that kind of subtle difference. Also I did not spend that much time looking. It was just a quick review of the images.

Is there some good way to look for sharpness differences?
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 »

Maybe I need to use an image for which the differences are a bit more obvious. (The fly?)
henrywho
Posts: 188
Joined: 2011-08-17T06:46:40-07:00
Authentication code: 8675308

Re: best downsampling method for DSLR photographs

Post by henrywho »

NicolasRobidoux wrote:@Henry: Could you let me know if it's OK that I posted these images? If not, I'll remove them.
It is a sample photo I read from that website. So it's under their copyright. I think it is better to post the original URL and the processing command-lines, instead of the processed files.
Last edited by henrywho on 2012-05-13T23:08:37-07:00, edited 4 times in total.
henrywho
Posts: 188
Joined: 2011-08-17T06:46:40-07:00
Authentication code: 8675308

Re: best downsampling method for DSLR photographs

Post by henrywho »

The colors in Jinc4Sharpest.png are completely wrong. What is the command you used?

I would categorize such coloration as a bug.
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:The colors in Jinc4Sharpest.png are completely wrong. What is the command you used?

I would categorize such coloration as a bug.

Code: Select all

magick original.jpg -colorspace RGB -filter Lanczos -define filter:lobes=4 -define filter:blur=0.88451002338585141 -distort Resize 640x427 -colorspace sRGB Jinc4Sharpest.png
The maximally sharpened Jinc Lanczos 4 is, in my limited testing, a very unusual scheme. So it could be that it sucks. Just in case, let me check that I get the same thing using defines.

P.S. No, the command was almost certainly right. So, Jinc Lanczos 4 maximally sharpened sucks? Or somehow there is a bug (unlikely).

P.S. When I have time I'll compile with the brand new debug check for negative weight sums viewtopic.php?f=22&t=20960#p84795. It would not surprise me if this is what is going on.
Last edited by NicolasRobidoux on 2012-05-13T18:12:41-07:00, edited 3 times 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 »

henrywho wrote:It is a sample photo I read from that website. So it's their copyright.
Oops! I'll switch to http://www.mediafire.com/?49ahiwm5ukfu6c9, which I'll resize to 1024x1536.

P.S. This is a really good test image. But without pixel peeping, it's really hard to see a difference between the "good" ImageMagick schemes.

P.S. 2 The differences are definitely not obvious if looking casually. The scheme which surprises me a lot, esp. in terms of tonal faithfulness, is (warning: selection bias) EWA RobidouxSharp. I expected the various Lanczoses to beat it hands down when downsampling, but no: It's not quite as sharp, but on the other hand it has comparatively insignificant halo, so it does not get as much perceptual sharpness by artificially raising acutance.

P.S. 3 I'll try to do a wider variety of schemes with this one.
Last edited by NicolasRobidoux on 2012-05-14T06:52:37-07:00, edited 8 times 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:Is there some good way to look for sharpness differences?
Not really sure. I think that the following is reasonable if the differences are not made obvious by flickering:

Have a good look at an area of the original, so you know what's there.

Now, have a look at one of the downsizes. Alternating slowly between the downsize and the original, both viewed without resizing, possibly closing your eyes for a while or looking at the wall or at nothing in particular for a bit, try to figure what you can see in the downsize that's supposed to be there, and also what's not supposed to be there, or is missing.

Repeat the exercise, separately, with another downsize.

You may have to take notes and cycle through, because in the process you'll "learn". Iterate until convergence :-)

---

I don't know much about doing psychovisual experiments :-(
Last edited by NicolasRobidoux on 2012-05-14T06:54:12-07:00, edited 2 times in total.
henrywho
Posts: 188
Joined: 2011-08-17T06:46:40-07:00
Authentication code: 8675308

Re: best downsampling method for DSLR photographs

Post by henrywho »

henrywho wrote:The colors in Jinc4Sharpest.png are completely wrong.
No such problem if I download the png file and view it from my harddisk. It's weird. :?
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 »

henrywho wrote:
henrywho wrote:The colors in Jinc4Sharpest.png are completely wrong.
No such problem if I download the png file and view it from my harddisk. It's weird. :?

Viewing may depend upon the viewing app and its interpretation of PNG rendering intent which has somewhat recently been changed to perceptual. Not sure if this is the issue or not.
User avatar
Pictus
Posts: 13
Joined: 2012-05-12T11:52:50-07:00
Authentication code: 13
Location: Teresópolis - Rio de janeiro - Brasil

Re: best downsampling method for DSLR photographs

Post by Pictus »

This topic is gold, thanks guys!

The backpack, I prefer the linear light version, but the windmill nobody likes the house bricks in the linear light version... :lol:

I am enjoying the sharpness of EWA Catrom, sadly it is not 100% moiré free as we can see in the backpack center strip and in the house wall.
ImageImage
henrywho
Posts: 188
Joined: 2011-08-17T06:46:40-07:00
Authentication code: 8675308

Re: best downsampling method for DSLR photographs

Post by henrywho »

Pictus wrote:I am enjoying the sharpness of EWA Catrom, sadly it is not 100% moiré free as we can see in the backpack center strip and in the house wall.
Any comment on EWA-Lagrange or EWA-SincSinc2?
Post Reply