Luminance of images


New: An image luminance calculator is here


Some images look brighter than others.

We can compare the luminance of different images using the so-called log-average luminance of an image. The log-average luminance is calculated by finding the geometric mean of the luminance values of all pixels. In a gray scale image, the luminance value is the pixel value. In a color image, the luminance value is found by a weighted sum

luminance = 0.27 red + 0.67 green + 0.06 blue.

The eight images can then be ordered as follows.

log-ave-luminance = 0.1212 log-ave-luminance = 0.1483 log-ave-luminance = 0.2103 log-ave-luminance = 0.3441
log-ave-luminance = 0.3637 log-ave-luminance = 0.3977 log-ave-luminance = 0.5206 log-ave-luminance = 0.6579

The picture on the far right of the first row has a lower log-ave-luminance value (0.344) than does the picture on the far left of the second row because luminance values are not very sensitive to the blue components in an image.


A different set of weights is used in the YCbCr or YIQ color models to calculate the luminance:
luminance = 0.299 red + 0.587 green + 0.114 blue.

The change in weights does not result in significant changes in the computed log-ave-luminance values. The eight pictures shown above have these luminance values computed using different sets of weights

[0.27, 0.67, 0.06] [0.299, 0.587, 0.114]
0.1212 0.1483 0.2103 0.3441 0.1183 0.1483 0.2093 0.3438
0.3637 0.3977 0.5206 0.6579 0.3614 0.3935 0.5199 0.6580

Computing the geometric mean is expensive. The average luminance values, computed using the arithmetic mean, of the eight images are as follows.

log average luminance (geometric mean) average luminance (arithmetic mean)
0.1183 0.1483 0.2093 0.3438 0.1417 0.2884 0.2785 0.4484
0.3614 0.3935 0.5199 0.6580 0.3930 0.4164 0.5478 0.6808

Note that the leftmost image on the first row jumps two positions in luminance if we use the arithmetic mean. Also, the two middle images on the first row switch order.


Consider the distribution of the luminance values. We can look at the luminance values in five segments of an image: center and the four quadrants.


An image can have a center that has a higher luminance value than any of the four quadrants


Overall = 0.1957


0.26230.1945
0.3139
0.16980.1730

An image can have evenly distributed luminance values across all segments.


Overall = 0.3550


0.36710.3505
0.3356
0.35720.3533

Here is an image with a top half that has much higher luminance values than the bottom half.


Overall = 0.3441


0.63900.6165
0.3789
0.19150.1909

And here is an image with a lower half that has higher luminance values than the top half.


Overall = 0.3637


0.29580.2498
0.3964
0.50520.4688

Sometimes an image can have one segment that has a luminance value that is much higher than every other segment's. In this case, it is the top left segment (numbered 2).


Overall = 0.3655


0.73880.3780
0.3202
0.27020.2366


A different way to look at the distribution is to look at the histogram of the luminance values. In the following, we show the histograms of the luminance values (middle column) and of the log-luminance values ( right column).

Armed with the log-ave-luminance of each image, we can remap the image to any key we like.

In the following, an original image (center) is remapped to a lower key (left) and to a higher key (right).

more to come...
Henry Chu 11.XI.2008
All images, graphs, and text are copyright © 2003 by Henry Chu.