I think the Gamma in digital imagining as used today stems from Sensitometry / Densitometry. Sensitometry is the science of precision exposing films and papers and Densitometry is the science of precision measuring the developed materials. For most applications films were exposed to make a gray scale from Dmin to Dmax in ½ f-stop increments. For pictorial films, the results were typically making a gray scale consisting of 21 steps.
Each step was measured using a Densitometer that returned the optical density of each step. The math used was to measure the light absorption of each step and presenting its density as a log value.
Now each f-stop increment is a 2X (double) of the exposing energy. The 2 value of this increment is expressed as a logarithm base 10. Thus, the number 2 is 10 elevated to the 0.30 power. For 1/6 f-stop = 0.05 1/3 f-stop = 0.10 1/2 f-stop = 0.15 2/3 f-stop = 0.20 1 f-stop = 0.30 2 f-stop = 0.60 3 f-stop = 0.90 4 f-stop = 1.20 5 f-stop = 1.5.
These values are written dropping the base which is 10 as this is unnecessary reputation. Therefor only the exponent of the logarithm is written.
Standard practice is to graph the values of each of the 21 steps using log graph paper. The result is the left half of a bell-shaped curve. The graph slopes upward. Using a proctor, we measured the angle of slope of the graph. The tan of this angle is Gamma.
If the gamma was 1 then the average slope angle is 45⁰. If true, 1 f-stop exposure induces a 2X change in density = 0.30 log change. Now most pictorial films have a upward slope that is less than 1. Typical is 38.7⁰. Its tan is 0.8. Thus, a typical pictorial film has a Gamma of 0.8. This tells me that the density change per f-stop is 0.30 X 0.8 = 0.24 density units per f-stop increment.
If the Gamma is 2 (typical of higher contrast films), then the delta per f-stop = 0.60 density.
I think this is the basis for Gamma used in TV and computer monitors.
For the film plot, the Stright Line slope angle is 45 degrees. The tan of 45 is 1. The Gamma for this plot is 1. Also attached is Kodak 21 step gray scale with densities and RGB values for two different Gammas for computer monitor.
If the density of a patch is known, how to derive the corresponding RGB value: Take step 10, its density is 1.05. Divide this density by the Gamma setting of the monitor – likely 2.2 = 0.47727. Now elevate 10^0.47727 = 3.001. Now divide 255 by 3.001 = 84.9. This is the RGB value of step 10.
Gamma = (C * G) / C²
thenGamma=G/C
, Gamma isn't well defined for 0 (which is why the SRGB profile is not a plain power function and is linear for the very low values. \$\endgroup\$