Helpful Posts Helpful Posts:  0
Results 1 to 4 of 4

Thread: Question concerning tutorial on gamma correction

  1. #1

    Question concerning tutorial on gamma correction

    Hello,

    I am new to the forum and would like to address some confusion I keep facing every time I read this tutorial. Pretty much at the beginning where the gamma function is being explained it says:

    Technical Note: Gamma is defined by Vout = Vingamma , where Vout is the output luminance value and Vin is the input/actual luminance value. This formula causes the blue line above to curve. When gamma<1, the line arches upward, whereas the opposite occurs with gamma>1.


    Shouldn’t this be the other way around? Doesn’t the chart show the blue line for gamma = 2.2 hence it should arch upward? Or rather should the formula be Vout = Vin ^ (1/gamma)?

    Thanks,
    Erik

  2. #2

    Join Date
    Feb 2012
    Location
    Texas
    Posts
    6,956
    Real Name
    Ted

    Re: Question concerning tutorial on gamma correction

    Quote Originally Posted by Braaamer View Post
    Hello,

    I am new to the forum and would like to address some confusion I keep facing every time I read this tutorial. Pretty much at the beginning where the gamma function is being explained it says:

    Technical Note: Gamma is defined by Vout = Vingamma , where Vout is the output luminance value and Vin is the input/actual luminance value.
    Welcome, Erik!

    Whatever the tutorial says, the above formula which I read as Vout equals Vin times gamma is incorrect.

    This formula causes the blue line above to curve. When gamma<1, the line arches upward, whereas the opposite occurs with gamma>1.


    Shouldn’t this be the other way around? Doesn’t the chart show the blue line for gamma = 2.2 hence it should arch upward? Or rather should the formula be Vout = Vin ^ (1/gamma)?

    Thanks,
    Erik
    Yes, going from Linear RGB to gamma-corrected RGB, the formula is indeed Vout = Vin ^ (1/gamma), where V = channel value which is not necessarily luminance, by which I mean that RGB channel values do not have units of cd/(m^2).
    Last edited by xpatUSA; 5th January 2022 at 07:30 PM.

  3. #3

    Re: Question concerning tutorial on gamma correction

    Quote Originally Posted by xpatUSA View Post
    Welcome, Erik!

    Whatever the tutorial says, the above formula which I read as Vout equals Vin times gamma is incorrect.



    Yes, going from Linear RGB to gamma-corrected RGB, the formula is indeed Vout = Vin ^ (1/gamma), where V = channel value which is not necessarily luminance, by which I mean that RGB channel values do not have units of cd/(m^2).
    Thank you! The formula I copied from the tutorial was altered when pasting it into the forum thread. In the tutorial it is Vout = Vin^gamma.

    But I am glad to hear that you agree with Vout = Vin^(1/gamma).

  4. #4

    Join Date
    Feb 2012
    Location
    Texas
    Posts
    6,956
    Real Name
    Ted

    Re: Question concerning tutorial on gamma correction

    Quote Originally Posted by Braaamer View Post
    Thank you! The formula I copied from the tutorial was altered when pasting it into the forum thread. In the tutorial it is Vout = Vin^gamma.
    Understood and you're welcome.

    But I am glad to hear that you agree with Vout = Vin^(1/gamma).
    You probably know that there's several color spaces that have a correction slightly different to the above simple formula.

    The most common is sRGB which has a linear portion at low input values and a greater gamma of 2.4 above the linear portion. The total effect being similar to gamma equals 2.2.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •