# luminance calculation

Hello. I am trying to calculate luminance values from Radiance RGBE
values. Somehow, I am not getting good results.

For example, at a certain pixel, the RGBE values are:
R = 128; G = 137; B = 165; E = 129
which is (1.00 1.07 1.29) in RGB values.

The luminance value computation is given by the formula:
luminance = 179 * (0.265*R + 0.670*G + 0.065*B)

With the above RGB values, I calculate luminance as 190.77 (which is
too low) and luminance inquiry in ximage gives 3181 cd/m2 (which makes
lots of sense) for the same pixel. Obviously, I am missing something here.

I would appreciate any help in calculating luminance values from RGBE
data. Thank you.

Mehlika Inanici

University of Michigan o
Taubman College of Architecture + Urban Planning o
Office: 2224 B |\ o
2000 Bonisteel Boulevard | \ o
Ann Arbor, Michigan |\ / .\ o
48109 - 2069 | | (
>/ \ /
http://www.umich.edu/~inanici | /

···

/

Mehlika Nur Inanici wrote:

Hello. I am trying to calculate luminance values from Radiance RGBE
values. Somehow, I am not getting good results.

For example, at a certain pixel, the RGBE values are:
R = 128; G = 137; B = 165; E = 129
which is (1.00 1.07 1.29) in RGB values.

The luminance value computation is given by the formula:
luminance = 179 * (0.265*R + 0.670*G + 0.065*B)

With the above RGB values, I calculate luminance as 190.77 (which is
too low) and luminance inquiry in ximage gives 3181 cd/m2 (which makes
lots of sense) for the same pixel. Obviously, I am missing something here.

In your example picture, you'll find the following line in the
file headers (or something very close):

EXPOSURE=5.9971707e-02

This means that the pixel values in the file are stored relative
to this exposure value, and you need to divide your result by
it to get at the actual luminance:

luminance = 179 * (0.265*R + 0.670*G + 0.065*B) / e

-schorsch

···

--
Georg Mischler -- simulations developer -- schorsch at schorsch.com
+schorsch.com+ -- lighting design tools -- http://www.schorsch.com/