top of page

Gamma...

Updated: Dec 2, 2022

Now, this is where the things may get crazy. I will try to explain as simply as I can but nonetheless be cautious.



This is a subject that when understood well, will greatly increase the quality of your work, and if not, it can lead to natural disasters. Pay attention to the research and follow it carefully.



Let me point out an important thing at the beginning. It is a situation that we will encounter in many technical points. Predictable vs Accurate.

The first one is consistent in perception but mathematically incorrect while the second one is mathematically consistent but perception is generally wrong.


Gamma

Let's consider a digital camera. The light detected by the sensor is directly proportional to the light coming from the environment. When the ambient light is doubled, the light detected by the sensor doubles. This is how it goes linearly. The situation is the same in the production of digital luminance. If the input voltage is doubled, the visible brightness will also double and continue proportionally. This gives us the linear input-output line called Gamma 1.0.



If input is 50, so the output is. This is Gamma 1.0. So there is nothing to describe here. But! Nature is fair and correct depending on living beings and things. Therefore the graph above is exactly how the human eye "does not work".


Let's consider the brightness and darkness. When we say dark, or lets call it black there is no such thing as blacker?, more black. Black is black that's it. But when we say bright, now there is no limit for the question of "how much bright?". There is always brighter in existence. So when we shed light on dark, like sunlight, light will invade the dark and fill out every dark point and will lift the brightness of everything. If we perceive sunlight in a linear way and distribute shades between dark and bright, well, there would be little to none dark shades. Less steps for dark, more and more steps for bright. This will make impossible to equally distribute the range between dark and bright. More bits for bright.


The steps become less and less for separation in black tones and more and more in bright tones. In fact, after a point, the whites become inseparable. The bright areas have a lot of bits, while the dark areas have very few bits.


Let's continue with the camera. The pixels in the sensors of these linear devices do not have the individual ability to adapt for light. So during the noon, if we set exposure for sky, ground will be dark, otherwise sky will we overexposed. Washed out.


At this point, let's consider how the human eye works. In natural light conditions, the human eye has a bias towards darkness to balance the range between. While our eyes perceive details in the dark better, they perceive less bright details. This gives us the capacity to detect a wide and proportional tonal detail. If we were perceiving light linearly, we would not be able to step out of the brightness of the daylight, let alone the sunlight.


The human eye corrects the brightness with a curve called Exponentiation. It cuts the brightness values that inseparable and enriches the shades of the separable darkness.



Pink curve is the human eye correction. Value called Gamma 1/2.2 = 0.4545454



After the Gamma 1/2.2 correction we can clearly see how shades equally distributed and details in dark get enriched. Compare with linear.


Linear


Gamma 1/2.2 - 04545454



Up to this point, we have tried to reveal the basic understanding of Gamma. Now things will get a little messy. If you've come this far by digesting it, be patient.


-Now, we know that our eyes has a Gamma Encoding.

-Despite working linearly, digital cameras also saves the images with same Gamma of our eyes in order to have matching data to our eyes. (Log saves linearly, another subject)

-If we see that Gamma Encoded image with +Gamma of our eyes we will have a problem. The image will be too bright.

-To solve this, every display device has another Gamma called 2.2. It is inversion of Gamma 1/2.2.

- Camera saved Gamma + Camera display Gamma = Linearized System Gamma.

- This is how we see camera images natural.




1 Image Gamma = This is how camera or software saves files with Gamma 1/2.2. Same with our eyes.


2 Screen Gamma = Gamma value applied by display devices which is 2.2.


3 System Gamma = Linear output by combining two Gamma values. Known as visible Gamma.


First Linear Gamma 1.0


Gamma 1/2.2 + Gamma 2.2 reproduces System Gamma 1.0



You are reading this on a device that applies Gamma 2.2 or close to images. If your monitor supports Gamma settings you can lower it to see difference as shown below:


Due to adding extra steps to dark areas, linear output will look like bright and dull but notice how overexposed clouds become gray like everything else. This is how we see if screen is not set to Gamma 2.2. If you imagine that it is also not saved with Gamma 1/2.2 then it would look like nothing but white. With the inverse Gamma of screen, we can see it close to the natural.


Finally, all the pictures you see on the internet are encoded with Gamma 1/2.2 and decoded with Gamma 2.2 by the display devices. The exception is some RAW, EXR, TIFF, HDR files. Those files uses Linear Gamma.


Please continue to research about Gamma. Assuming we've digested this topic, we'll move on to the directly linked topic, Linear Workflow.


Stay safe.

7 views0 comments

Recent Posts

See All

Comments


bottom of page