# luminance calculation

**URL:** <https://discourse.radiance-online.org/t/luminance-calculation/3670>\
**Category:** radiance-general\
**Created:** [December 19, 2001, 4:32pm UTC](https://discourse.radiance-online.org/t/luminance-calculation/3670 "2001-12-19T16:32:50Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mehlika\_Nur\_Inanici](https://discourse.radiance-online.org/letter_avatar_proxy/v4/letter/m/b9bd4f/32.png) [@Mehlika\_Nur\_Inanici](https://discourse.radiance-online.org/u/Mehlika_Nur_Inanici)\
**Post date:** [December 19, 2001, 4:32pm UTC](https://discourse.radiance-online.org/t/luminance-calculation/3670/1 "2001-12-19T16:32:50Z")

</div>

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 | | (  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\>/ \ /  
[U-M Web Hosting](http://www.umich.edu/~inanici) | /

> **···**
>
> > /

---

<div class="post-metadata">

**Author:** ![Georg\_Mischler](https://discourse.radiance-online.org/letter_avatar_proxy/v4/letter/g/7feea3/32.png) [@Georg\_Mischler](https://discourse.radiance-online.org/u/Georg_Mischler)\
**Post date:** [December 19, 2001, 5:12pm UTC](https://discourse.radiance-online.org/t/luminance-calculation/3670/2 "2001-12-19T17:12:29Z")

</div>

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):

&nbsp;&nbsp;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:

&nbsp;&nbsp;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/](http://www.schorsch.com/)
