Approve the Cookies
This website uses cookies to improve your user experience. By using this site, you agree to our use of cookies and our Privacy Policy.
OK
Forums  •   • New posts  •   • RTAT  •   • 'Best of'  •   • Gallery  •   • Gear
Guest
Forums  •   • New posts  •   • RTAT  •   • 'Best of'  •   • Gallery  •   • Gear
Register to forums    Log in

 
FORUMS Community Talk, Chatter & Stuff General Photography Talk 
Thread started 23 Mar 2011 (Wednesday) 14:26
Search threadPrev/next
sponsored links (only for non-logged)

Metering tonality...18% or 12%?

 
tonylong
...winded
Avatar
54,657 posts
Gallery: 60 photos
Likes: 570
Joined Sep 2007
Location: Vancouver, WA USA
     
Apr 02, 2011 17:52 |  #151

So guys, since this thread continues to be active and working over technical things that tend to be hard for us "laypeople" to understand and process, I'd like some clarity on the whole linear/gamma thing, from the perspective of 1) Raw processing and 2) trying to explain to someone who asks about the difference between and out-of-camera jpeg in terms of processing done, a Raw data "dump" and processing the Raw image (this type of question actually came up earlier today and I may have fumbled my response, hence this question).

So, suppose I try to word this as my attempt to answer a question, and then you guys go at it and "set me straight":

From what I understand, Raw files are "dumps" of the linear capture of the sensor. As a result, the Raw data goes directly from potentially pure white to straight black in a dramatic "straight line" (since each stop "down" represents a loss of half the light of the previous stop). In the camera, to produce a jpeg for a histogram, the data is converted using a "gamma correction" so that the image display and the histogram will more closely appear to what we would visually expect. And, when we have the camera produce out-of-camera jpegs, the camera uses this "gamma curve" along with our setting for Picture Style, White Balance, and so on, all off which apply their own processing.

When you shoot Raw, the camera stores the linear Raw data. When you load your Raw files into a Raw processor, common Raw processors (DPP, Lightroom/ACR and Aperture by default apply a "gamma correction curve" which, in essence, boosts shadows and midtones while retaining highlights.

You can see this default behavior in, for example DPP if you open a Raw file and, in the Raw tab click the "Linear" checkbox. Highlights/bright tones stay pretty even, whereas the image becomes dramatically darker for darker and shadow tones. In Lightroom and ACR, this "correction" is applied by setting the Brightness slider to a midpoint of 50. The Brightness control is designed to boost shadows and midtones but to keep the "White Point" intact, and so this default setting approximates the gamma correction for a "starting point" in your Raw processing -- you have the leeway to adjust this with a Raw file, of course, just so you understand what you are dealing with.

One thing that this knowledge can help with is the usefulness of the "Expose To The Right" technique -- when you become aware of how dramatic the light fall of is by using the "linear" view, you can see how visible noise can be such a factor when we try to further boost shadow areas above what has already been done by the gamma correction, and we can see how we can gain by aiming for an exposure that gives more "to the right" good light!

----

OK, gang, pull out yer shootguns and blow holes in my "laymans' explanation"!


Tony
Two Canon cameras (5DC, 30D), three Canon lenses (24-105, 100-400, 100mm macro)
Tony Long Photos on PBase (external link)
Wildlife project pics here (external link), Biking Photog shoots here (external link), "Suburbia" project here (external link)! Mount St. Helens, Mount Hood pics here (external link)

  
  LOG IN TO REPLY
AbPho
Goldmember
Avatar
3,166 posts
Gallery: 2 photos
Likes: 107
Joined Jan 2009
Location: Planet Earth
     
Apr 02, 2011 18:13 as a reply to  @ tonylong's post |  #152

I have been going over some of the information given on scantips.com. Great reads. :D I usually print them out and read them while going to bed.


I'm in Canada. Isn't that weird!

  
  LOG IN TO REPLY
Wilt
THREAD ­ STARTER
Reader's Digest Condensed version of War and Peace [POTN Vol 1]
Avatar
46,446 posts
Gallery: 1 photo
Likes: 4537
Joined Aug 2005
Location: Belmont, CA
     
Apr 02, 2011 18:33 |  #153

tonylong wrote in post #12145566 (external link)
So guys, since this thread continues to be active and working over technical things that tend to be hard for us "laypeople" to understand and process, I'd like some clarity on the whole linear/gamma thing, from the perspective of 1) Raw processing and 2) trying to explain to someone who asks about the difference between and out-of-camera jpeg in terms of processing done, a Raw data "dump" and processing the Raw image (this type of question actually came up earlier today and I may have fumbled my response, hence this question)....When you shoot Raw, the camera stores the linear Raw data. When you load your Raw files into a Raw processor, common Raw processors (DPP, Lightroom/ACR and Aperture by default apply a "gamma correction curve" which, in essence, boosts shadows and midtones while retaining highlights.

You can see this default behavior in, for example DPP if you open a Raw file and, in the Raw tab click the "Linear" checkbox. Highlights/bright tones stay pretty even, whereas the image becomes dramatically darker for darker and shadow tones. In Lightroom and ACR, this "correction" is applied by setting the Brightness slider to a midpoint of 50. The Brightness control is designed to boost shadows and midtones but to keep the "White Point" intact, and so this default (tone curve) setting approximates the gamma correction for a "starting point" in your Raw processing -- you have the leeway to adjust this with a Raw file, of course, just so you understand what you are dealing with.

Tony,
Like you, I am not into the equations behind conversion, but I believe that I have what I might call an 'operational understanding', and I believe that you have it correct except the blue text.
My own belief about Lightroom is that the gamma correction happens behind the scenes before the Tone Curve is applied...pre-Tone Curve, RAW conversion changes the RAW linear tonal values and assigns darker interpretations to much more of the linear response, giving more value to the darker portion of the linear response so that more of the scene falls into that portion of what our eyes are accustomed to. THEN, after initial RAW conversion, the tone curve is applied, where the relative contrast of the entire scene is lowered (linear standard setting) or boosted (medium contrast/high contrast standard settings) or further manipulations are done manually to the curve.

Wayne will certainly inform us if either is right or wrong in the statements or interpretations.


You need to give me OK to edit your image and repost! Keep POTN alive and well with member support https://photography-on-the.net/forum/donate.p​hp
Canon dSLR system, Olympus OM 35mm system, Bronica ETRSi 645 system, Horseman LS 4x5 system, Metz flashes, Dynalite studio lighting, and too many accessories to mention

  
  LOG IN TO REPLY
WayneF
Member
46 posts
Likes: 1
Joined Mar 2007
     
Apr 02, 2011 18:44 |  #154

tonylong wrote in post #12145566 (external link)
So guys, since this thread continues to be active and working over technical things that tend to be hard for us "laypeople" to understand and process, I'd like some clarity on the whole linear/gamma thing, from the perspective of 1) Raw processing and 2) trying to explain to someone who asks about the difference between and out-of-camera jpeg in terms of processing done, a Raw data "dump" and processing the Raw image (this type of question actually came up earlier today and I may have fumbled my response, hence this question).

So, suppose I try to word this as my attempt to answer a question, and then you guys go at it and "set me straight":

From what I understand, Raw files are "dumps" of the linear capture of the sensor. As a result, the Raw data goes directly from potentially pure white to straight black in a dramatic "straight line" (since each stop "down" represents a loss of half the light of the previous stop).

Yes, and yes.

In the camera, to produce a jpeg for a histogram, the data is converted using a "gamma correction" so that the image display and the histogram will more closely appear to what we would visually expect. And, when we have the camera produce out-of-camera jpegs, the camera uses this "gamma curve" along with our setting for Picture Style, White Balance, and so on, all off which apply their own processing.

Not exactly. Yes, the processing does add gamma to our image processing settings, but ... Just nitpicking words I guess, but Gamma is not done to appear as we might expect. It is specifically only to cause old CRT monitors to display it about correctly. It must be "undone" by LCD monitors, they don't need it. It is very independent of any "image processing" concepts.

It matters not that you no longer own a CRT, the word standards require it now. sRGB says gamma 2.2. If you still had a CRT, it would still work.

Human eyes never see gamma data, it is always undone just before we see it. Either the CRT loses it, or the LCD resets it. Hopefully, we see a faithful reproduction of the liner analog scene the lens saw (plus our own adjustments). However, we definitely see gamma values in our histograms.

If you shoot JPG, the camera will output RGB gamma encoded images.
If you shoot RAW, the camera will output unprocessed RAW, and later the RAW processor software will convert its output to RGB gamma encoded images.

We have no RAW tools. That is, our monitors and printers expect, and can only show RGB data. Printers do print with CYMK ink of course, and there can be elegant exceptions, but our PC printers expect only our RGB images. Tools that say they show RAW may leave out the gamma boost (which makes it look pretty dark), but they must convert it to RGB for our monitor to be able to show it. We can never see RAW. Our eyes sort of work via RGB.

When you shoot Raw, the camera stores the linear Raw data. When you load your Raw files into a Raw processor, common Raw processors (DPP, Lightroom/ACR and Aperture by default apply a "gamma correction curve" which, in essence, boosts shadows and midtones while retaining highlights.

Yes, and gamma does raise the curve between the end points, but for CRT reasons - not for any adjustment we are thinking about. It is always undone before our eyes ever see it.

But if you want to think about the numerical values in the RGB histogram you see, gamma is the reason the numbers are not even close to the numbers you might be led to expect. :) 18% is not the center of anything digital.

This curve does emphasize the boost at the low end, and is for that purpose, but it is not really about shadows, and midtones and highlights, not in those terms. It is about the CRT monitor response, and Gamma is the exponent to which that data value is raised. Or rather, 1/gamma is that exponent.

You can see this default behavior in, for example DPP if you open a Raw file and, in the Raw tab click the "Linear" checkbox. Highlights/bright tones stay pretty even, whereas the image becomes dramatically darker for darker and shadow tones. In Lightroom and ACR, this "correction" is applied by setting the Brightness slider to a midpoint of 50. The Brightness control is designed to boost shadows and midtones but to keep the "White Point" intact, and so this default setting approximates the gamma correction for a "starting point" in your Raw processing -- you have the leeway to adjust this with a Raw file, of course, just so you understand what you are dealing with.

I'm a Nikon guy, and have not seen DPP. I just came through here looking for news about Canon's status in Japan. But in Adobe ACR,

Exposure is the Levels White Point,
Blacks is the Levels Black Point,
Brightness is the Levels center slider (sometimes called gamma).

You can see that holding the ALT key (Windows), shows the clipped pixels when sliding Exposure or Blacks, same as the Levels tool does.

In Levels, the center slider shows 1.0, which is relative to the gamma 2.2 already applied. It is the same exponential curve, but is "flat" at the unadjusted point. It is commonly used as a brightness adjustment on data, without affecting contrast. (very different, the tool in Photoshop and others named Brightness merely shifts the entire histogram right... detrimental to contrast.)

It is sometimes argued that some adjustment controls, esp those implying some action on some percentage (like a gradient), ought to undo gamma, do the calculations and adjustment, and then put gamma back. But most such adjustments are done according to our eye's choice, and any view we see on our monitor already has removed gamma from our eye's view, and then absolute numbers are no factor at all.


Wayne
https://www.scantips.c​om/ (external link) Basics of flash and camera

  
  LOG IN TO REPLY
tonylong
...winded
Avatar
54,657 posts
Gallery: 60 photos
Likes: 570
Joined Sep 2007
Location: Vancouver, WA USA
     
Apr 02, 2011 18:48 |  #155

OK, Wilt, so you are saying that in LR this default Brightness control has nothing to do with the gamma correction? But it's true that the gamma correction is applied in order to render a "decent looking" preview, as well as in DPP? And it is the camma correction curve which brightens shadows/dark tones (while retaining highlights)? I just figured that because Brightness in LR/ACR does pretty much that it would follow that the brightness control is being used for that effect, but that shows how little I know about that stuff!


Tony
Two Canon cameras (5DC, 30D), three Canon lenses (24-105, 100-400, 100mm macro)
Tony Long Photos on PBase (external link)
Wildlife project pics here (external link), Biking Photog shoots here (external link), "Suburbia" project here (external link)! Mount St. Helens, Mount Hood pics here (external link)

  
  LOG IN TO REPLY
tonylong
...winded
Avatar
54,657 posts
Gallery: 60 photos
Likes: 570
Joined Sep 2007
Location: Vancouver, WA USA
     
Apr 02, 2011 19:40 |  #156

WayneF wrote in post #12145800 (external link)
Yes, and yes.

Not exactly. Yes, the processing does add gamma to our image processing settings, but ... Just nitpicking words I guess, but Gamma is not done to appear as we might expect. It is specifically only to cause old CRT monitors to display it about correctly. It must be "undone" by LCD monitors, they don't need it. It is very independent of any "image processing" concepts.

It matters not that you no longer own a CRT, the word standards require it now. sRGB says gamma 2.2. If you still had a CRT, it would still work.

Human eyes never see gamma data, it is always undone just before we see it. Either the CRT loses it, or the LCD resets it. Hopefully, we see a faithful reproduction of the liner analog scene the lens saw (plus our own adjustments). However, we definitely see gamma values in our histograms.

If you shoot JPG, the camera will output RGB gamma encoded images.
If you shoot RAW, the camera will output unprocessed RAW, and later the RAW processor software will convert its output to RGB gamma encoded images.

OK Wayne, thanks for engaging here!

So in the above quote, I'm not getting something. You say that our LCD monitors "undo" the gamma correction, but then the Raw processors "redo" it? Is that correct?

It's too bad you don't have the use of DPP, because the "Linear" checkbox has me on this track -- if you click it you get the dramaticall dark lower tones and just the bright tones show up as something "close to normal" although the picture as a whole tends to look like crap!

So, with the default setting (Linear "off"), this appears to be what you are calling "RGB gamma encoding", correct? But it is not the "old" gamma correction curve but something different? But it still has the affect of applying a curve to the linear data like you are describing, a "levels" curve?

We have no RAW tools. That is, our monitors and printers expect, and can only show RGB data. Printers do print with CYMK ink of course, and there can be elegant exceptions, but our PC printers expect only our RGB images. Tools that say they show RAW may leave out the gamma boost (which makes it look pretty dark), but they must convert it to RGB for our monitor to be able to show it. We can never see RAW. Our eyes sort of work via RGB.

Yes, and gamma does raise the curve between the end points, but for CRT reasons - not for any adjustment we are thinking about. It is always undone before our eyes ever see it.

But if you want to think about the numerical values in the RGB histogram you see, gamma is the reason the numbers are not even close to the numbers you might be led to expect. :) 18% is not the center of anything digital.

This curve does emphasize the boost at the low end, and is for that purpose, but it is not really about shadows, and midtones and highlights, not in those terms. It is about the CRT monitor response, and Gamma is the exponent to which that data value is raised. Or rather, 1/gamma is that exponent.

I'm a Nikon guy, and have not seen DPP. I just came through here looking for news about Canon's status in Japan. But in Adobe ACR,

Exposure is the Levels White Point,
Blacks is the Levels Black Point,
Brightness is the Levels center slider (sometimes called gamma).

You can see that holding the ALT key (Windows), shows the clipped pixels when sliding Exposure or Blacks, same as the Levels tool does.

In Levels, the center slider shows 1.0, which is relative to the gamma 2.2 already applied. It is the same exponential curve, but is "flat" at the unadjusted point. It is commonly used as a brightness adjustment on data, without affecting contrast. (very different, the tool in Photoshop and others named Brightness merely shifts the entire histogram right... detrimental to contrast.)

OK, I follow that but I'm trying to nail down what goes on "behind the scenes in, say, ACR: am I correct that the Raw processor does apply a curve to the linear data? It seems that you are confirming that it does. But you are saying that it isn't the "gamma correction curve" designed for CRTs, I got that, but is it correct to describe it as a "gamma correction curve" designed specifically for digital Raw data? This is what I'm trying to nail down as an intelligent way to present this to other "laypeople".

It is sometimes argued that some adjustment controls, esp those implying some action on some percentage (like a gradient), ought to undo gamma, do the calculations and adjustment, and then put gamma back. But most such adjustments are done according to our eye's choice, and any view we see on our monitor already has removed gamma from our eye's view, and then absolute numbers are no factor at all.

Well, this goes back to the question of the DPP Linear control, and then to the Lightroom/ACR controls and the bit of back-and-forth I had with Wilt. In DPP I've assumed that the Linear control actually does present the "preview" of the linear data, no curve applied, otherwise turning it off applied the correction curve, whatever we end up calling it (I'd love a decisive name so I can pass it on to others:)). In ACR/Lightroom then, I assumed that the Brightness slider set by default to 50 was applying a "semulated-gamma-correction-curve" since the Brightness control retains the White Point while boosting the midtones and shadows, although I believe it keeps the Black Point in place (so retains black "clipping").

But Wilt shot that down with the idea that the curve is being applied independent of an adjustment control. Oh well.

So, maybe if you guys could take a stab at a "statement" -- maybe copy the one I posted and entered your own corrections/elaboratio​ns to come up with your version of a "correct statement to a layperson"? That would be a cool thing to have on hand:)!


Tony
Two Canon cameras (5DC, 30D), three Canon lenses (24-105, 100-400, 100mm macro)
Tony Long Photos on PBase (external link)
Wildlife project pics here (external link), Biking Photog shoots here (external link), "Suburbia" project here (external link)! Mount St. Helens, Mount Hood pics here (external link)

  
  LOG IN TO REPLY
WayneF
Member
46 posts
Likes: 1
Joined Mar 2007
     
Apr 02, 2011 20:56 |  #157

tonylong wrote in post #12146061 (external link)
OK Wayne, thanks for engaging here!

So in the above quote, I'm not getting something. You say that our LCD monitors "undo" the gamma correction, but then the Raw processors "redo" it? Is that correct?

The "redo" is out of place here. The RAW processors "do" it the first time.

Look, it is much simpler than that. Try to imagine this is the easiest possible stuff, and look at it in the easiest possible way. It is not magic, it is simply like the words say.

I tried to write this up, at http://www.scantips.co​m/lights/gamma.html (external link)

Hopefully clearly and studied, at least in my own mind, but sometimes the assumptions about what is clear are not appropriate for all readers. I would appreciate hearing any comments about what specific words in that posted article is not clearly understood by anyone. Via PM here if you don't care to be public. I suppose I can PM here, and I really would like to know which words were not understood by all. It will be my fault, and maybe I can fix it, if I knew which words.


But I will try hastily to summarize again here:

The light from the original scene is linear, and digital camera sensors are linear, and their RAW data is linear. LCD monitors are linear too. If that were all there were to it, we would not need gamma. Hard to imagine it would have ever been invented, if we only started doing it yesterday.

But CRT monitors are not linear - and they used to be universal. CRT requires gamma encoded data to correct their nonlinear response, to cause their output to look correct, meaning to look linear to the human eye. Without gamma correction, their images appear very dark and unacceptable and unusable - like you see that "RAW" image. Gamma is done to all images shown on CRT displays, to correct those CRT displays.

So only for that CRT reason (which used to be a BIG deal), the world standard (like sRGB) is that all RGB data is encoded with gamma 2.2. We must use RGB data because that is how monitors work, and our PC printers expect it too, and our eyes too. We have RGB sensors in our eye too. I use RGB in that sense. I only intend to exclude RAW.

The act of that CRT showing it - decodes it.. Gamma correction is done to correct the output of the CRT screen. So at that point of showing it on CRT, then it is undone, and gone. The correction was effective, and was used, and is now gone, meaning, the eye sees linear RGB again. Gamma correction caused that data emitted from the CRT screen to look normal and linear to the human eye, which expects to see the same scene that the camera lens saw. Gamma makes that true for CRT monitors. Not true otherwise. It is a correction for the CRT screen, so its output will appear true and linear. That is all there is to it.


So back to the camera... the sensor RAW data is linear.
But for above CRT reason (and for sRGB too, which is due to CRT), the camera outputs gamma in the JPG images.
Or it can output RAW, and defer the gamma encoding for output from the processor. But before that image is usable, it is gamma encoded.

By its output... I mean ANY output.
When you save it to a disk file.
Or when this program simply shows it to you on the screen. All screens expect gamma encoded data.
Any output.
Unless you tell it not to.

The CRT's act of showing it decodes it. Or LCD monitors simply "undo" it, resets it to be liner (because they don't need it). But when that light leaves either screen (towards the eye), it is linear again, one way or other. Which is a good thing for the eye. We expect to see real world linear data.

It's too bad you don't have the use of DPP, because the "Linear" checkbox has me on this track -- if you click it you get the dramaticall dark lower tones and just the bright tones show up as something "close to normal" although the picture as a whole tends to look like crap!

So, with the default setting (Linear "off"), this appears to be what you are calling "RGB gamma encoding", correct? But it is not the "old" gamma correction curve but something different? But it still has the affect of applying a curve to the linear data like you are describing, a "levels" curve?

I am sorry if I confused it.

There is just the one gamma. Done on all RGB data, for the CRT monitor correction.

Very crude analogy, don't pin me down, but correction like putting a color filter on our camera, which makes wrong things right again, and our eyes like to see it that way.


OK, I follow that but I'm trying to nail down what goes on "behind the scenes in, say, ACR: am I correct that the Raw processor does apply a curve to the linear data? It seems that you are confirming that it does. But you are saying that it isn't the "gamma correction curve" designed for CRTs, I got that, but is it correct to describe it as a "gamma correction curve" designed specifically for digital Raw data? This is what I'm trying to nail down as an intelligent way to present this to other "laypeople".

There is just the one gamma, now that we agreed on 2.2.

The sRGB standard requires it. It assumes you are using a CRT monitor. And you used to use one, and you might still have one, and the standards require it regardless. Probably someone somewhere still does.

But much more important, ALL of the RGB image data in the world is already gamma encoded, so it is very convenient to be able to view it. The world standards were made to require it. It's a good thing to comply.

I only say RGB to exclude RAW. RAW data is NOT YET gamma encoded.

Regardless, any image data you will ever see has been gamma encoded, for the CRT monitor correction - right up until the time that data leaves the monitor towards your eye. The CRT decodes it just by showing it. It corrects the CRT just by showing the corrected data. The LCD monitor decodes it because it knows it is there, and that your eyes have no use for it. We only see decoded data. The eye expects linear RGB data. The CRT cannot otherwise provide it, without gamma correction.


So you have this DPP program, and it has a control to show you linear data. It cannot show you RAW, your monitor has no clue how to show RAW. They can leave out the gamma encoded (so that it looks way too dark), but they convert it to RGB to show it to your RGB monitor, and your RGB eyes.

Specifically, to beat this to death, DPP leaving out gamma to show RAW simply just shows you the original scenes data (as RGB of course)... which was not too dark in the first place. It was linear too.

But any act of showing it (RAW or not) expects to "undo" gamma (one way for CRT, another way for LCD), so this decoding makes it be darker. So the only reason you think it is darker is because it has not previously been made brighter. But your monitor does not know that, and it will decode it anyway. Either a CRT by simply showing it, or a LCD because it knows it needs to.

I am not sure that is helpful, but it is precisely correct.


Well, this goes back to the question of the DPP Linear control, and then to the Lightroom/ACR controls and the bit of back-and-forth I had with Wilt. In DPP I've assumed that the Linear control actually does present the "preview" of the linear data, no curve applied, otherwise turning it off applied the correction curve, whatever we end up calling it (I'd love a decisive name so I can pass it on to others:)). In ACR/Lightroom then, I assumed that the Brightness slider set by default to 50 was applying a "semulated-gamma-correction-curve" since the Brightness control retains the White Point while boosting the midtones and shadows, although I believe it keeps the Black Point in place (so retains black "clipping").

But Wilt shot that down with the idea that the curve is being applied independent of an adjustment control. Oh well.

You are reading too many words too literally. :) Best to understand the concept, and then you can say it in your own words.

Gamma is always done, yes, independent of the adjustment controls we might otherwise apply. In the sense that our RAW processor is going to show gamma data on the screen to show you, before file output, yes, we can say it is done first.

But if you ask DPP not to add gamma, then it wont add gamma.

But your monitor is still going to decode it, so your view will be dark then, because your monitor expects gamma encoded data.

Hope that helps.


EDIT: ADDED...

Searching Google for the key words gamma correction finds the Wikipedia article under the same name. It has faults, mostly organization and lack of a clear overview (and film gamma should not be mentioned in this article). It includes this good graph:

http://en.wikipedia.or​g/wiki/File:Gamma06_60​0.png (external link)

Note the bottom curve is the response curve of the CRT monitor.. specifically, the example is marked to show input (along bottom scale) of 50% only comes out 21.8% (along the left side scale). Darker data is shown even darker, and only brighter data is shown brighter. This is the problem which CRT has, and which gamma corrects, to allow CRT monitors to be usable for images.

To make the CRT show the data properly, the RGB data is gamma encoded ... the top curve. Low end signals are boosted more than high end signals, and example is marked showing that input of 21.8% actually comes out 50% (on the screen, again same as linear, for the eye).

We don't need to understand the math, but it really is fairly simple...

The curve representing the CRT response is: output = input ^ gamma (^ is to the power of gamma, which is 2.2 exponent)

The curve representing the correction to the data is: output = input ^ 1/gamma (opposite correction - new response is straight line in the middle - linear)

CRT monitors are no longer as significant as previously, however, all of the worlds RGB data is already gamma encoded, so we simply continue.


Wayne
https://www.scantips.c​om/ (external link) Basics of flash and camera

  
  LOG IN TO REPLY
tonylong
...winded
Avatar
54,657 posts
Gallery: 60 photos
Likes: 570
Joined Sep 2007
Location: Vancouver, WA USA
     
Apr 03, 2011 16:37 |  #158

Well, thanks Wayne!

What I would like is to be able to leave the "gamma correction for CRT monitors" completely out of things and only put together a statement of how Raw data is processed for either a jpeg or in a Raw processor "under the hood" for either a print or to be viewed on an LCD! You refer to it as "gamma encoded RGB", right? Can we put that into a very simple explanation?


Tony
Two Canon cameras (5DC, 30D), three Canon lenses (24-105, 100-400, 100mm macro)
Tony Long Photos on PBase (external link)
Wildlife project pics here (external link), Biking Photog shoots here (external link), "Suburbia" project here (external link)! Mount St. Helens, Mount Hood pics here (external link)

  
  LOG IN TO REPLY
WayneF
Member
46 posts
Likes: 1
Joined Mar 2007
     
Apr 03, 2011 17:11 |  #159

tonylong wrote in post #12150458 (external link)
Well, thanks Wayne!

What I would like is to be able to leave the "gamma correction for CRT monitors" completely out of things and only put together a statement of how Raw data is processed for either a jpeg or in a Raw processor "under the hood" for either a print or to be viewed on an LCD! You refer to it as "gamma encoded RGB", right? Can we put that into a very simple explanation?


Sorry, I guess I don't understand the question, and I do not know how to comply. Omitting gamma from consideration seems impossible, by definition. We might imagine it, but it would not be usable today.

Gamma simply is... sRGB requires it. Speaking of tonal photo data, if it is in JPG or if anything else sent to a monitor or printer, it will be gamma encoded, as has been described. They expect nothing less.

Is it just the word CRT you object to? The reason is incidental today. The fact is, it is still our standard.


Wayne
https://www.scantips.c​om/ (external link) Basics of flash and camera

  
  LOG IN TO REPLY
tonylong
...winded
Avatar
54,657 posts
Gallery: 60 photos
Likes: 570
Joined Sep 2007
Location: Vancouver, WA USA
     
Apr 03, 2011 20:15 |  #160

WayneF wrote in post #12150629 (external link)
Sorry, I guess I don't understand the question, and I do not know how to comply. Omitting gamma from consideration seems impossible, by definition. We might imagine it, but it would not be usable today.

Gamma simply is... sRGB requires it. Speaking of tonal photo data, if it is in JPG or if anything else sent to a monitor or printer, it will be gamma encoded, as has been described. They expect nothing less.

Is it just the word CRT you object to? The reason is incidental today. The fact is, it is still our standard.

OK, let me try to rephrase and put what you are saying into something comprehensible. I asked to leave out "gamma correction for CRT monitors" because, from everything you have said here and on your website, I was gathering that this specific process does not apply to our modern digital usage and, in fact, is undone and a different process, "gamma RGB encoding" is applied. Is this correct, or am I missing something.

What I'm looking for is a simple way of expressing things. Look at the post I made above, my "simple statement". Can you post that statement after correcting/modifying it to be "correct" and still "keep it simple" for laypeople?


Tony
Two Canon cameras (5DC, 30D), three Canon lenses (24-105, 100-400, 100mm macro)
Tony Long Photos on PBase (external link)
Wildlife project pics here (external link), Biking Photog shoots here (external link), "Suburbia" project here (external link)! Mount St. Helens, Mount Hood pics here (external link)

  
  LOG IN TO REPLY
E-K
Senior Member
983 posts
Joined Sep 2006
Location: Canada
     
Apr 03, 2011 21:05 |  #161

How about,

1. The raw file contains data which is linearly proportional to the amount of light which struck the sensor.
2. Output devices expect gamma encoded input and will perform any necessary conversions to make the output as close to linearly proportional to the original amount of light as possible.

e-k




  
  LOG IN TO REPLY
WayneF
Member
46 posts
Likes: 1
Joined Mar 2007
     
Apr 03, 2011 21:34 |  #162

tonylong wrote in post #12151484 (external link)
OK, let me try to rephrase and put what you are saying into something comprehensible. I asked to leave out "gamma correction for CRT monitors" because, from everything you have said here and on your website, I was gathering that this specific process does not apply to our modern digital usage and, in fact, is undone and a different process, "gamma RGB encoding" is applied. Is this correct, or am I missing something.

What I'm looking for is a simple way of expressing things. Look at the post I made above, my "simple statement". Can you post that statement after correcting/modifying it to be "correct" and still "keep it simple" for laypeople?


I am very curious which words gave you that idea? Specifically, how can I fix it to leave that out, and to be more easily understood?

Tony, the simple explanation is that gamma is ALWAYS included in our RGB images. ALWAYS. JPG, TIF, PNG, GIF, BMP, any and all, always if the image data is in RGB format (three colors, red, green, blue). The ONLY data we can show on our monitor or print on our printer is digital data, and it ALWAYS includes gamma. This is our standard, and always has been. You've heard of the sRGB specification, and it says approximately gamma 2.2. This is what it means.

It just is. No exceptions. Time to get used to it. :) It is simple, because without this concept, you can only get the wrong answer.. Because, simple truth is that ALL digital RGB images are gamma encoded, as has been described.

It is all the same one thing called gamma... only one topic, which may be called gamma correction, RGB gamma, sRGB gamma, but all the same one thing. It has only one actual explanation. If it is about our digital data, it is all the same ONE thing, same as has been discussed here.

Gamma is just a greek letter, and the confusion can be that there are other quite unrelated concepts also named gamma, for example film gamma - which has nothing to do with digital data. Several other things too, like several things are called X in algebra. But it if it is about our digital images, it is this ONE gamma correction or sRBG thing, about gamma encoding our digital image data.... any red,green,blue image data.

It happens automatically and invisibly, every time, in every image, regardless if we realize it or not. Even if you never realize it, it happens every time. EVERY digital RGB image is gamma encoded. The only time we actually need to know this is when we get involved with more specific details, for example, the numerical values of the data within histograms. I may have mentioned before that histogram data is gamma encoded too. :)

It is true that gamma was originally for the purpose of correcting our CRT monitors. Now it remains true (same exact thing) for the purpose of complying with our world standards, like sRGB. That is, our standards still require that it is still done, regardless of which monitor you use. Any RGB image you can show on your monitor or print on your printer has this same one concept of gamma in it. No exceptions. There is just the one concept. That seems the simple explanation. A fact of life.

In regard to your RAW processing, try to see this simple story of the big picture:

Your camera takes digital images. It initially creates a RAW image at the linear CMOS or CCD sensor. Then it outputs that image in one of two forms:

8 bit JPG file with gamma 2.2 sRGB encoding.
or
12 bit (usually) RAW file, with no gamma yet. However, this has only the one use to go to PC RAW processor, which ultimately has the only purpose to output a RGB image with gamma encoding (so this image will be usable by us). All of our RGB images are gamma encoded.

Nits, but there are often a few options... The output RGB file might be sRGB or Adobe RGB, but it will contain gamma encoding very near 2.2. It may in some cases be 16 bits or a TIF file, but any RGB file will have its data gamma encoded.

There are no exceptions. ALL RGB images in the world are gamma encoded. Has always been true, and likely always will be true. Certainly true now. This not really not a difficult concept. ALL digital RGB images are gamma encoded. Normally, gamma 2.2.

It is true that gamma encoding originated 70 years ago, for the purpose of showing corrected television images on CRT tubes. We all used CRT tubes until relatively recent times, and this was a huge deal. We continue to use that standard of adding gamma 2.2 to ALL of our image files. This has additional advantage to allow us to view all old files which were always gamma encoded.

I say RGB images only to exclude the only two exceptions I can think of, which are:

1. RAW files - do not yet have gamma encoding. However, we cannot show or view them, and they have no other purpose but to create gamma RGB files.

2. 1 bit files - line art, bilevel, B&W, monochrome, whatever you want to call one bit files. These only contain two data values, 1 or 0. Fax is an example. Black text on white paper... Line drawings like newspaper cartoons are often other instances. These are not tonal files - and need no concept of gamma.

Hope that helps to see the overall big picture.


Wayne
https://www.scantips.c​om/ (external link) Basics of flash and camera

  
  LOG IN TO REPLY
WayneF
Member
46 posts
Likes: 1
Joined Mar 2007
     
Apr 07, 2011 11:31 |  #163

tonylong wrote in post #12151484 (external link)
.


I am sorry to be a turn off Tony. But the fact is, all of our digital images are gamma encoded. It is real, it does exist, and it is not going away.

We can pretty much ignore it, since all of the necessary work is done automatically in background. We need not even be aware of it, up until the time we want to discuss the numbers in the histogram. Then we must know what those numbers are (and they are gamma encoded).

I have edited a few words in the material at http://www.scantips.co​m/lights/gamma.html (external link) hopefully to be more readable.


Wayne
https://www.scantips.c​om/ (external link) Basics of flash and camera

  
  LOG IN TO REPLY
tonylong
...winded
Avatar
54,657 posts
Gallery: 60 photos
Likes: 570
Joined Sep 2007
Location: Vancouver, WA USA
     
Apr 07, 2011 18:41 |  #164

Thanks, Wayne, I have tried to process all that you've said. At some point I get the impression that since, as you say, the work is done automatically in the background and is apparently not ever visually apparent to us then, well, it has no impact on our photography. All which brings us back to Wilt's original post on how to acheive certain exposure results, although bearing in mind that there is some underlying issues concerning this thing "gamma encoding" and what actually represents "true middle". But will that actually affect our photography? I suppose not. Of course there are different approaches to exposure, many of which don't involve any kind of gray card, I'd say there are a few conditions where a gray card can be valuable (without making the mistake of calling it medium gray:)!). Actually, though, I think it's probably an exercise in frustration to go on a crusade against the "Medium gray" term, but oh well:)!


Tony
Two Canon cameras (5DC, 30D), three Canon lenses (24-105, 100-400, 100mm macro)
Tony Long Photos on PBase (external link)
Wildlife project pics here (external link), Biking Photog shoots here (external link), "Suburbia" project here (external link)! Mount St. Helens, Mount Hood pics here (external link)

  
  LOG IN TO REPLY
WayneF
Member
46 posts
Likes: 1
Joined Mar 2007
     
Apr 07, 2011 20:55 |  #165

tonylong wrote in post #12179201 (external link)
Thanks, Wayne, I have tried to process all that you've said. At some point I get the impression that since, as you say, the work is done automatically in the background and is apparently not ever visually apparent to us then, well, it has no impact on our photography. All which brings us back to Wilt's original post on how to acheive certain exposure results, although bearing in mind that there is some underlying issues concerning this thing "gamma encoding" and what actually represents "true middle". But will that actually affect our photography? I suppose not. Of course there are different approaches to exposure, many of which don't involve any kind of gray card, I'd say there are a few conditions where a gray card can be valuable (without making the mistake of calling it medium gray:)!). Actually, though, I think it's probably an exercise in frustration to go on a crusade against the "Medium gray" term, but oh well:)!


Yes, that is correct Tony, it does not affect our "photography", but gamma correction happens automatically in background, invisible to us - in the output from any source (cameras, scanners, software). Gamma is always intentionally done, due to our standards requiring it, due to the CRTs need for it, and it has been done since we had image files. It is automatic, and there is not much notice or announcement made of it.

So we can always totally ignore gamma, or be totally unaware of it, and our photography will not be affected. It still happens however, automatically, and our files are affected. Gamma only affects the digital data while it is "stored" (let's say somewhere between the linear sensor and our human eye). And then anytime our human eye ever sees the data, it will have been equally decoded, as if it never happened. Perhaps the CRT losses decode it, or the LCD overtly decodes it, but it has been removed when the eye finally sees it.

So therefore, we might ignore it, or be unaware of it, or even deny it if we wish, :smile: however no matter what, it does happen, and furthermore, our histogram shows the gamma encoded data values. So my point has been - if we are going to make claims about how or why any specific data values should appear in our histograms, then we better understand that the histogram data is gamma encoded. It is a much larger factor than anything we can do.

Gamma encoding (CRT correction) merely just always happens. It is why sRGB and Adobe RGB systems discuss gamma 2.2. Our standards require it. This is what it is about.

We might make our own image corrective settings, of contrast and color and brightness and whatever, then on top of anything we do, this data also gets this gamma encoding. Without exception for digital images.

I am having trouble wording the term "all digital images" precisely. It is all of our photography digital images, but there is no gamma in RAW files, and none in one bit files. I was saying RGB (to exclude those) but grayscale too. Gamma is in all digital images which show tonal data, like photos... color or grayscale. Graphics too, if it shows tonal data needing gamma.

The 18% gray card is not difficult. They reflect 18% of the light hitting them. 18% of however much that is, but ideally, let's assume our metering would put 100% of that light at histogram 255. That means, on a linear scale, that 18% would be at 18%. 18% is not the middle of anything digital.

Then our histogram shows gamma data, so ideally (hopefully), we see 18% at 117, which is at 46%. Not at center, not related to a center, but coincidentally, not too far from center. Histogram midpoint at 128 50% meanwhile was moved up near 187, at 73%.

Kodak tells us if we meter from the 18% card, we should increase exposure 1/2 stop.


Wayne
https://www.scantips.c​om/ (external link) Basics of flash and camera

  
  LOG IN TO REPLY
sponsored links (only for non-logged)

21,616 views & 0 likes for this thread, 15 members have posted to it.
Metering tonality...18% or 12%?
FORUMS Community Talk, Chatter & Stuff General Photography Talk 
AAA
x 1600
y 1600

Jump to forum...   •  Rules   •  Forums   •  New posts   •  RTAT   •  'Best of'   •  Gallery   •  Gear   •  Reviews   •  Member list   •  Polls   •  Image rules   •  Search   •  Password reset   •  Home

Not a member yet?
Register to forums
Registered members may log in to forums and access all the features: full search, image upload, follow forums, own gear list and ratings, likes, more forums, private messaging, thread follow, notifications, own gallery, all settings, view hosted photos, own reviews, see more and do more... and all is free. Don't be a stranger - register now and start posting!


COOKIES DISCLAIMER: This website uses cookies to improve your user experience. By using this site, you agree to our use of cookies and to our privacy policy.
Privacy policy and cookie usage info.


POWERED BY AMASS forum software 2.58forum software
version 2.58 /
code and design
by Pekka Saarinen ©
for photography-on-the.net

Latest registered member is johntmyers418
1178 guests, 186 members online
Simultaneous users record so far is 15,144, that happened on Nov 22, 2018

Photography-on-the.net Digital Photography Forums is the website for photographers and all who love great photos, camera and post processing techniques, gear talk, discussion and sharing. Professionals, hobbyists, newbies and those who don't even own a camera -- all are welcome regardless of skill, favourite brand, gear, gender or age. Registering and usage is free.