Mike Chaney's Tech Corner
November 22, 2024, 08:24:11 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Qimage registration expired? New lifetime licenses are only $59.99!
 
   Home   Help Login Register  
Pages: [1]
  Print  
Author Topic: Gamma, resampling and bits.  (Read 13810 times)
Ernst Dinkla
Sr. Member
****
Posts: 410


Email
« on: July 31, 2009, 10:22:22 AM »

There have been discussions over the last year on the influence of the image gamma in the results of up- and downsampling. A recent one is at
the Fred Miranda forum:
http://www.fredmiranda.com/forum/topic/798523
and some other ones that also refer to Eric Brasseur's article:
http://www.4p8.com/eric.brasseur/gamma.html
like
http://www.nabble.com/possble-replacement%28s%29-for-Gimp-Lanczos-td19089418.html#a19096945

Mike could you shed your light on this subject in relation to Qimage?

For printing when it is crucial I always make proof prints of cropped parts of blow-ups etc to get some idea whether the contrast and tone etc works the same on the larger print. Sharpening and resampling artefacts checked too. For small prints a proof isn't made but it could be replaced with one after some contrast etc editing if it doesn't look like intended. I didn't relate that to the original gamma of the file and the processing but thought it was mainly the aliasing on downsampling and the perceptual effect that larger prints look often lighter printed without an edit. The last either a result of (anti-)aliasing or an unknown perceptual effect that John Caponigro also observes. Unlike his observation I do not think that the larger print always looks lighter, depends on the content too.


met vriendelijke groeten, Ernst Dinkla

Dinkla Gallery Canvas Wrap Actions for Photoshop
http://www.pigment-print.com/dinklacanvaswraps/index.html


Logged
admin
Administrator
Forum Superhero
*****
Posts: 4220



Email
« Reply #1 on: July 31, 2009, 01:10:57 PM »

This is something that I investigated more than 5 years ago as I knew it might affect interpolation.  I ran many tests and in the end, I found it best to just interpolate the image without worrying about gamma.  Take a look at all the examples in the links you posted.  They are all oddball images where every other line/pixel has been removed or zeroed out.  Those are not "real world" examples that you will ever see in a photograph but people use those examples because they are the only examples that really show a significant difference.  Those examples exploit the fact that wide variations between adjacent pixels can cause non-gamma-corrected interpolation algorithms to go awry.  In real photos, you'll never see such large variations between adjacent pixels in photographs from digital cameras or scanners.  The image acquisition on those devices is simply not capable of rendering huge per-pixel contrast changes and even when they come close, the changes are at a sharp edge where the difference will likely go unnoticed anyway.  The bottom line is that there is almost never a visible difference between images interpolated with or without gamma manipulation.  Even in cases where there is some difference, you have to switch back and forth between both images, staring at them, and then you might eventually be able to point out a hard edge somewhere that looks slightly different and you might say "I think I might see a difference here".

Doing gamma corrected interpolation has other trade-offs as well.  Do you know the gamma of your photos?  You think you do, but in reality, you do not!  The gamma curve is totally dependent on the tone curve used by the camera/scanner and that can change under different lighting sources.  Many cameras "crush" the dark end too in order to reduce noise, and that modifies the tone curve such that it doesn't follow a true gamma 2.2 curve.  In addition, does your camera use a straight gamma or a linear corrected gamma per Rec 709?  Some people think that gamma is a straight power(1/2.2) curve.  Most devices do not use that curve even when they are called gamma 2.2: they modify that curve with a linear segment at the low end.  Some of these articles I've seen don't even account for the proper gamma curve!  Does your camera use a gamma 2.2 curve?  Most likely not.  Is gamma correcting to 2.2 better than doing nothing at all?  Maybe.  Maybe not!  In the end, my decision was that guessing at the tone curve and making gamma manipulations based on an unknown curve wasn't worth the extra processing when the end result didn't vary significantly for photos.

The links you point to make a good "look at what trick I can do" but they are nothing more than a curiosity when it comes to real photographs as most of what is there does not apply and won't cause any problem in our photos.  You can easily test this yourself.  Just use Qimage's batch filter, open an image, and drag the "M" levels slider to .45 and interpolate.  Save the interpolated image.  Then open that image and slider the "M" slider to 2.2 and the result will be your gamma corrected/interpolated image.  Compare that to an image with "straight" interpolation.  Unless you are dealing with a mathematically derived image with alternating closely spaced pixels, there will be no visible difference that appreciably affects the image.  Try it for yourself.

Keep in mind that this is a very easy thing to do.  I could easily add a "Use gamma correction" checkbox on the Qimage interpolation dialog and have it working in just a few minutes, so I would have already done it if I thought it really made a positive difference.  Fact is, given the complexity (and errors) in the tone curves of most cameras, assuming the wrong gamma curve can actually cause more harm than good and considering the minor differences it elicits in real photos anyway, it just seemed like a "clutter" feature.

Mike
Logged
Seth
Sr. Member
****
Posts: 322



« Reply #2 on: July 31, 2009, 01:44:16 PM »

Ernst-

I have, in the past two years stopped doing two things in PS: final sizing and changing PPI.  Whether it is a 157 or 289.6, I just leave it alone and let QI get it later.

The real world change seems to go as Mike says.  I say this from using my (learned from Clayton Jones) method of small, medium, final-size test prints.  I used to think my stuff was too dark, contrasty and adjust it.  Then as I printed it larger I was resetting gamma and contrast back where it was.  This is with B&W.  I think it was just the eye and mind playing tricks with the smaller prints.  A lot more tonal variations are visible in the large prints, so more to "perceive," I guess.

Personally, I think the only test for Gamma (if one must test) is using a grey scale and read it with a spectro.  Then, we need to use a 128-step chart, not 21.  That is more similar to the old photo paper capabilities.

Seth
Logged

Seth
<CWO4 (FMF) USN, Ret.>
Ernst Dinkla
Sr. Member
****
Posts: 410


Email
« Reply #3 on: July 31, 2009, 09:05:39 PM »



Keep in mind that this is a very easy thing to do.  I could easily add a "Use gamma correction" checkbox on the Qimage interpolation dialog and have it working in just a few minutes, so I would have already done it if I thought it really made a positive difference.  Fact is, given the complexity (and errors) in the tone curves of most cameras, assuming the wrong gamma curve can actually cause more harm than good and considering the minor differences it elicits in real photos anyway, it just seemed like a "clutter" feature.

Mike

Mike,

You have answered my question. I had some doubts about the gamma issue and the samples provided. The uncertainty about the actual gamma curve used like you explained would make any "solution" a gamble.

What I observed in smaller versus larger prints from the same file is still there though.



met vriendelijke groeten, Ernst Dinkla

Dinkla Gallery Canvas Wrap Actions for Photoshop
http://www.pigment-print.com/dinklacanvaswraps/index.html
Logged
Ernst Dinkla
Sr. Member
****
Posts: 410


Email
« Reply #4 on: July 31, 2009, 09:41:37 PM »

Ernst-

I have, in the past two years stopped doing two things in PS: final sizing and changing PPI.  Whether it is a 157 or 289.6, I just leave it alone and let QI get it later.

The real world change seems to go as Mike says.  I say this from using my (learned from Clayton Jones) method of small, medium, final-size test prints.  I used to think my stuff was too dark, contrasty and adjust it.  Then as I printed it larger I was resetting gamma and contrast back where it was.  This is with B&W.  I think it was just the eye and mind playing tricks with the smaller prints.  A lot more tonal variations are visible in the large prints, so more to "perceive," I guess.

Personally, I think the only test for Gamma (if one must test) is using a grey scale and read it with a spectro.  Then, we need to use a 128-step chart, not 21.  That is more similar to the old photo paper capabilities.

Seth


Seth,

It is good that you mention Clayton. Precisely with B&W images and more specific with scanned B&W images you may see tone shifts in resampling up and down. It is quite complex, even the scan gives "aliased" grain and editing a grainy image shows that its tone range is based on two components, the pixel and the grain.  Sharpen and the contrast changes and vice versa. Print a grainy image in Black Only and a small size gives you a translation of the grain size to the printer dot size which is another texture, enlarge and the printer dots have to represent a larger grain distribution which isn't so nicely done as starting from a smooth pixel gradation. With a quad or K7 monochrome inkset it becomes more predictable. With a digital B&W image and a smoother inkset it all becomes more predicatble.

The other images that show the shifts are scanned or digital takes of art, sketches on paper etc. Texture of the original in that case.

Measuring a greyscale printed at different sizes may not prove anything if it is a perceptual issue and even a spectro- or densitometer would need an adaption of the measured area when texture is enlarged.

I never resample the files but on the fly at print time in Qimage.



met vriendelijke groeten, Ernst Dinkla

Try: http://groups.yahoo.com/group/Wide_Inkjet_Printers/




Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!
Security updates 2022 by ddisoftware, Inc.