Pages: 1 [2]   Go Down

Author Topic: Downsizing and aliasing  (Read 17823 times)

Schewe

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 6229
    • http:www.schewephoto.com
Downsizing and aliasing
« Reply #20 on: January 12, 2010, 03:37:17 pm »

Quote from: madmanchan
To clarify one point that Jeff made: CR/LR does use a method similar to bicubic sharper when downsampling, but it is not the same as the method used by the named "Bicubic Sharper" method of Photoshop.


Yeah, what Eric said...it's Bicubic Sharper'ish...

:~)
Logged

joofa

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 544
Downsizing and aliasing
« Reply #21 on: January 12, 2010, 03:39:34 pm »

Quote from: ejmartin
The issue (I think) is how the filtering is combined with decimation.  Consider the following example -- you want to downsample by binning pixels.  If you want to bin and downsample by a factor of four, you can do that in one step by a filter (1,1,1,1)/4 and then subsampling the array every fouth pixel.  Or you can do it in two steps with a filter (1,1)/2 and downsampling by a factor of two at each step.  Or, you can do two filterings at the original resolution -- the first with the filter kernel (1,1)/2 and the second with the filter kernel (1,0,1,0)/2, and then subsampling by a factor four, since the convolution of these two kernels is (1,1,1,1)/4.   I believe that's what Joofa had in mind by zero padding.

Hi Emil. You are right. The OP asked the question if the image is downsized, say twice, using the same filter in 2 steps, then how does that compare to using a single larger filter. I provided a simple method for deriving that single larger filter.

For 1-D signals it is straightforward to show in theory why all that would hold. BTW, for the graphically-inclined, please see the following link where I have an example of an original 2D Gaussian filter shown on the left, the zero-interleaved filter in the middle, and the larger equivalent single filter on the right:

http://www.djjoofa.com/data/images/cascade_gauss.jpg
« Last Edit: January 12, 2010, 04:13:37 pm by joofa »
Logged
Joofa
http://www.djjoofa.com
Download Photoshop and After Effects plugins

ErikKaffehr

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 11311
    • Echophoto
Downsizing and aliasing
« Reply #22 on: January 12, 2010, 03:42:16 pm »

Jeff and Eric,

Thanks for explanation. It's reassuring that so many alternatives have been evaluated. This may also come down to measuring the wrong thing, we try to study patterns that are difficult to reduce and the methods that work best with those patterns may be less than optimal in other cases. It's easy to overshoot when striving for perfection.

Erik

Quote from: Schewe
Camera Raw (and as a result Lightroom) used to use a Lanczos variant. The problem was that it could produce pretty serious ringing artifacts. Currently ACR/LR uses Bicubic Sharper for downsampling and a Bicubuc/Bicubuc Smoother adaptive hybrid for upsampling.

I was involved in the original resampling testing back when Photoshop incorporated multiple flavors of Bicubic with Photoshop CS. The engineer working on the algorithms, Chis Cox, went through literally _ALL_ of the various resampling schemes out there. In real world testing with photographic images (both scans and digital captures), we all settled on Bicubic Sharper for downsampling, Bicubuc Smoother for upsampling and regular Bicubuc for general use or as a substitute if Bicubuc Sharper produced artifacts on an image by image basis.

It's clear you can cherry pick all sort of exotic interpolation algorithms that can do certain things better than others based on the patterns, textures or objects in an image. But as Erik notes, in the vast majority of cases, the differences are generally hard to predict and often difficult or impossible to see.
Logged
Erik Kaffehr
 

ErikKaffehr

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 11311
    • Echophoto
Downsizing and aliasing
« Reply #23 on: January 12, 2010, 03:54:09 pm »

Jeff and Eric,

Having you both on this thread. I have a question about output sharpening. I have compared two images shot with 12.5 and 24.6 MP digital cameras. When looking on screen with 12.5 MP file upscaled  to 24.6 MP there was a large difference. I tried to print crops corresponding to A2 from both and I couldn't tell my prints apart. I printed with Lightroom 2.3 (?) standard sharpneing for output and rescaled for 480PPI. I don't know which resolution I used on my Epson Pro 3800, I should have noted but did not.

Original images:
http://www.pbase.com/ekr/image/107619976/original

Scanned crops from prints:
http://www.pbase.com/ekr/image/107823207/original

Is this expected?

Best regards
Erik


Quote from: ErikKaffehr
Jeff and Eric,

Thanks for explanation. It's reassuring that so many alternatives have been evaluated. This may also come down to measuring the wrong thing, we try to study patterns that are difficult to reduce and the methods that work best with those patterns may be less than optimal in other cases. It's easy to overshoot when striving for perfection.

Erik
Logged
Erik Kaffehr
 

ejmartin

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 575
Downsizing and aliasing
« Reply #24 on: January 12, 2010, 04:44:50 pm »

Quote from: madmanchan
To clarify one point that Jeff made: CR/LR does use a method similar to bicubic sharper when downsampling, but it is not the same as the method used by the named "Bicubic Sharper" method of Photoshop.


Is there any attempt to filter high frequencies before downsampling?  One of the issues I have with bicubic in CS3 is that it can alias high-frequency noise into the output, so that the reduced image is not as noise-free as it could be.
Logged
emil

Schewe

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 6229
    • http:www.schewephoto.com
Downsizing and aliasing
« Reply #25 on: January 12, 2010, 05:35:13 pm »

Quote from: ErikKaffehr
I don't know which resolution I used on my Epson Pro 3800, I should have noted but did not.


That would have an impact for sure...unless you are at 1440 minimum and ideally 2880, you might not see much printed difference unless you are looking at super high frequency and/or high contrast diagonals.

You could recreate the test and simply output as a JPEF two images...on at native res and one at upsampled res and visually compare the resulting images...you could then output both images from Photoshop to confirm there would be differences...

As to the A900 vs A700, not sure what you are referring to...do you mean you did the exact same shot with an A900 and an A700 and tried to upsample the smaller capture to the same size as the large capture? Then what did you do to the image? The process you are talking about is unclear to me...
Logged

Jonathan Wienke

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 5829
    • http://visual-vacations.com/
Downsizing and aliasing
« Reply #26 on: January 13, 2010, 08:09:04 am »

Quote from: joofa
Jonathan, linear convolution increases the size of the output filter based upon the lengths of the convolved input arrays. It is basic DSP. That is how it accepts "more inputs" when convolved with incoming data.

I wrote a small program quickly for you to ascertain what I am saying. I shall double check for bugs as I was in a hurry, but the output produced is pretty satisfactory. I can provide the program to you or anybody else if requested.

That makes more sense; you're using the zeroes to perform a mathematical operation on the convolution kernel array that increases its size, not on the image data array. I would be interested in a link to the sample program...
Logged

ErikKaffehr

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 11311
    • Echophoto
Downsizing and aliasing
« Reply #27 on: January 13, 2010, 09:48:47 am »

Hi Jeff,

Sorry for being less than clear...

I had two images taken with two cameras, Sony Alpha 700 and Sony Alpha 900. Same image, tripod, MLU, different lenses. I than scaled up the image from the Alpha 700 12.5 MP to the same size as the image from the Alpha 900. The image from the Alpha 900 was much better, as expected. This was just for comparison.

I than printed the original (unscaled and unmanipulated images) from Lightroom with normal output sharpening at a resolution of 480 PPI. I don't recall the setting on my Epson, but it was probably 1440 DPI, possibly higher. To my surprise I couldn't see any difference. I also asked two collegeaues about their opninion, one having considerable experience from a professional photo lab. They could not see any difference either. The crops I had corresponded to about A2. The subject I photographed was a mural painting with good detail, but probably not a lot of very high contrast and high frequency detail.

As the difference in print from the two files was so small I figured that output sharpening in Lightroom may have played a role. In my eyes both prints were absolutely good enough.


Also, thank you for taking time to answer my question!

Best regards
Erik


Quote from: Schewe
That would have an impact for sure...unless you are at 1440 minimum and ideally 2880, you might not see much printed difference unless you are looking at super high frequency and/or high contrast diagonals.

You could recreate the test and simply output as a JPEF two images...on at native res and one at upsampled res and visually compare the resulting images...you could then output both images from Photoshop to confirm there would be differences...

As to the A900 vs A700, not sure what you are referring to...do you mean you did the exact same shot with an A900 and an A700 and tried to upsample the smaller capture to the same size as the large capture? Then what did you do to the image? The process you are talking about is unclear to me...
« Last Edit: January 14, 2010, 12:26:51 am by ErikKaffehr »
Logged
Erik Kaffehr
 

joofa

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 544
Downsizing and aliasing
« Reply #28 on: January 13, 2010, 10:25:07 pm »

Quote from: Jonathan Wienke
That makes more sense; you're using the zeroes to perform a mathematical operation on the convolution kernel array that increases its size, not on the image data array. I would be interested in a link to the sample program...

Of course, I was making sense from the start  . Kindly PM me your email address.
Logged
Joofa
http://www.djjoofa.com
Download Photoshop and After Effects plugins

Jonathan Wienke

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 5829
    • http://visual-vacations.com/
Downsizing and aliasing
« Reply #29 on: January 14, 2010, 08:40:14 am »

Quote from: joofa
Kindly PM me your email address.

Done.
Logged
Pages: 1 [2]   Go Up