Lecture - Image Processing
3. Basic Methods II: Image operations
3.11. Gamma Transfer Function
A powerful and more flexible tool than the previous point operation is given by the gamma transfer function. Basically, it allows to brighten or darken the middle tones of an image without much change at the end points, i.e. very dark and very bright tones. The function takes advantage of the scale of 0 ... 1, whose endpoints, that are connected by a smooth curve, remain constant when applying a power to all brightness levels / tones \( p \). A power of 1 leaves the curve as a straight line. When the power is greater 1, the curve bows upward, if it is less than 1, it bows downward. The middle tones of the image become more pronounced or less pronounced, respectively. The darkest and brightest tones do not change significantly. The transfer function is defined as:
\( f(p) = p^{1/\gamma} \)
where \( p \) is between 0 and 1. Consequently, the standard brightness values of 0 ... 255 need to be scaled accordingly. The convention of using \( 1/\gamma \) instead of \( \gamma \) simply makes the using the parameter \( \gamma \) more intuitive: increasing \( \gamma \) also increases the middle tones.
Like in the examples before, all pixel values lower that \( p_{black} \) will be set to 0, and all values greater than \( p_{white} \) to \( p_{max} \). The pixel values between \( p_{black} \) and \( p_{white} \) are to be transferred onto the range of 0 ... 1, raised to the power \( 1/\gamma \), and finally transferred onto the range of 0 ... \( p_{max} \) :
\( f(p) = p_{max} (\frac{p - p_{black}}{p_{white} - p_{black}})^{1/\gamma} \).
The gamma transfer function is efficient for highlighting weak or diffuse objects in an image, like nebulae or super nova remnants. Alternative methods like narrowing the brightness band ( \( p_{black} \) to \( p_{white} \) ) or using the Log transfer function may throw away information, or may only be useful when the image brightness encompasses several orders of magnitude.