You are here: Nature Science Photography – Contrast – Gamma correction
Now that we have taken a picture with our digital Fujiyamaruckzuck camera, we want to continue working with it. At this point, we come back to the fundamental difference mentioned above between our perception of contrast and that of an electronic image carrier. The sensor transforms the electrons received from the pixels nearly 1:1 into voltage values, which the A/D converter then quantizes. Therefore, if a scene is twice as bright as another, its voltage value, or binary value, will also be twice as high. This is evident from the characteristic curve we established earlier. However, our perception system prevents the doubling of intensity from appearing twice as bright to us. Brighter, but not twice as bright. In order to create the impression of twice as much brightness, we have to increase the intensity almost ninefold. This can be seen from the curve in figures 20 (Estimation of the brightness on a linear scale ) and 21 (Estimation of the brightness on a logarithmic scale ) in the section about „The minimum size of brightness differences“. For this reason, image files in .raw converters that display the preview image exactly according to the data appear much too dark. Their histogram subsequently displays a majority of the values on the left, or dark side.



We deal with this by changing the gradient of the linear part of the characteristic curve, i.e. by applying the exponential function known from the “Contrast perception” section. We refer to this change as gamma correction or gamma encoding, as the slope of the curve is also known as the gamma value. This is a simple mathematical operation in which each data value is exponentiated by the reciprocal of the gamma value. The .raw converter does the calculation for us photographers. It does this either automatically with a given gamma value or leaves it to us to set it manually.
Formula 17

The characteristic curve then looks like in figure 56 (C-curve gamma correction), the too dark image shown at the beginning appears in the correct brightness, and its histogram shows a normal distribution of the brightness values. The first thing to notice about this curve is the similarity to the one in figure 20 (Estimation of the brightness on a linear scale) and this is not a coincidence. Moreover, we observe that the exponential transformation of the data results in distinct curve forms, contingent on whether we output them on linear or logarithmic scales. On log-log axes, as in figure 25 in the section „Factors we must take into account to meet requirement 0: Factor 2 – Ambient brightness“, this resulted in a sloped curve but unchanged in shape. Here, on linearly scaled axes, we see a graph bent outward in the middle.
The following two paragraphs will clarify exactly how high the gamma value must be, providing two more equally important reasons for the necessity of gamma correction.




Next Gamma Correction the Second – Compensating the Monitor Properties
Main Contrast
Previous Requirement 0 in the digital area
If you found this post useful and want to support the continuation of my writing without intrusive advertising, please consider supporting. Your assistance goes towards helping make the content on this website even better. If you’d like to make a one-time ‘tip’ and buy me a coffee, I have a Ko-Fi page. Your support means a lot. Thank you!