| 1 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> |
| 2 | <html> |
| 3 | <head> |
| 4 | <title>About Gamma</title> |
| 5 | <meta http-equiv="content-type" |
| 6 | content="text/html; charset=ISO-8859-1"> |
| 7 | </head> |
| 8 | <body> |
| 9 | <h2 style="text-decoration: underline; font-weight: bold;">About Gamma</h2> |
| 10 | When calibrating display devices, the notion of "gamma value" quickly |
| 11 | becomes a topic for discussion. Various numbers are often bandied about |
| 12 | as if they have a well known and accepted meaning, but it turns out |
| 13 | that gamma values are not a very precise way of specifying real world |
| 14 | device behavior at all.<br> |
| 15 | <br> |
| 16 | A "gamma" curve is typically thought of as an ideal power curve, but no |
| 17 | real world device has the necessary zero output at zero input to be |
| 18 | able to match such a curve, and in general a display may not exactly |
| 19 | reproduce an idealized power curve shape at all. The consequence of |
| 20 | this is that there are countless ways of matching a real world curve |
| 21 | with the ideal gamma power one, and each different method of matching |
| 22 | will result in a different notional gamma value.<br> |
| 23 | <br> |
| 24 | Argyll's approximate specification and reading is simply the gamma of |
| 25 | the ideal curve that matches the real 50% stimulus relative-to-white |
| 26 | output level. I think this is a reasonable (robust and simple) |
| 27 | approximation, |
| 28 | because it matches the overall impression of brightness for an image. A |
| 29 | more sophisticated approximation that could be adopted would be to |
| 30 | locate the idea power curve that minimizes the total delta E of some |
| 31 | collection of test values, but there are still many details that the |
| 32 | final result will depend on, such as what distribution of test values |
| 33 | should be used, what delta E measure should be used, and how can a |
| 34 | delta E be computed if the colorimetric behavior of the device is not |
| 35 | known ? Some approaches do things such as minimize the sum of the |
| 36 | squares of the output value discrepancy for linearly sampled input |
| 37 | values, and while this is mathematically elegant, it is hard to justify |
| 38 | the choice of device space as the metric.<br> |
| 39 | <br> |
| 40 | There are many other ways in which it could be done, and any such |
| 41 | approximation may have a quite different numerical value, even though |
| 42 | the visual result is very similar. This is because the numerical power |
| 43 | value is very sensitive to what's happening near zero, the very point |
| 44 | that is non-ideal. Consider the sRGB curve for instance. It's |
| 45 | technically composed of a power curve segment with a power of 2.4, but |
| 46 | when combined with its linear segment near zero, has an overall curve |
| 47 | best approximated by a power curve of gamma 2.2. Matching the 50% |
| 48 | stimulus would result in yet another slightly different approximation |
| 49 | value of about 2.224. All these different gamma values represent curves |
| 50 | that are very visually similar.<br> |
| 51 | <br> |
| 52 | <img style="width: 400px; height: 400px;" |
| 53 | alt="Plot of sRGB curve vs. power of 2.224" src="srgbplot.gif" |
| 54 | align="left"><br> |
| 55 | <br> |
| 56 | The result of this ambiguity about what gamma values mean when applied |
| 57 | to real world curves, is that it shouldn't be expected that there are |
| 58 | going to be good matches between various gamma numbers, even for curves |
| 59 | that are very visually similar, unless the precise method of matching |
| 60 | the ideal gamma curve to the real world curve is known.<br> |
| 61 | <br> |
| 62 | <br> |
| 63 | </body> |
| 64 | </html> |