ohho - 7 months ago 34

C Question

How to convert from an exposure value to lux? Thanks!

i.e. what's the formula behind this chart?

Answer

Forget the math on Wikipedia. By inspecting the table to which you linked, it's possible to see a pattern:

EV Lux -1 1.25 -0.5 1.75 0 2.50 0.5 3.50 1 5.00 1.5 7.00 2 10.00 2.5 14.00 3 20.00 3.5 28.00 4 40.00 ...

1 EV is 5 Lux. 2 EV is 10 Lux. 3 EV is 20 Lux. So, it looks logarithmic:

```
lux = (2 ^ ev) * 2.5;
```

(2 to the power of EV, times 2.5)

C-like:

```
#include <math.h>
double evToLux(double ev) {
return pow(2, ev) * 2.5;
}
```

**Update**

Wikipedia has this formula:

**Update 2**

It is important to point out that EV is dependent on the film speed (ISO). All above is true only for ISO 100. It is easy to convert to other speeds, though:

`EV(at ISO 100) == EV(at ISO 200) - 1`

(H/T Nikolai Ruhe)