# How to find absolute luminance of a pixel in a photo?

Suppose we have a photo camera, which can take photos from which we can find out relative luminances of various pixels. Suppose also that we can vary exposure times so as to measure scenes of very different average brightness without overexposure — and that the values of the pixels proportionally change with changes in exposure time. Let the camera's objective lens also be free from aberrations, vignetting etc..

Now, if we can make any number of additional photos with the same camera, how can we find out absolute luminance of a given pixel, in cd/m², with an error within something like 20%? Is there a predictable enough source of light outside laboratories, that we could use as a reference with known luminance?

• The Photography SE could have dealt with this. You need to look up the concept of Exposure Value (something you should learn anyway if you use a camera). – StephenG Apr 27 '19 at 11:54
• @StephenG EV still doesn't seem to yield anything better than a rule of thumb to choose "correct" exposure settings. How do I convert EV combined with a pixel value to luminance of the direction corresponding to the pixel? – Ruslan Apr 27 '19 at 12:34
• Maybe the quantum efficiency of the sensor as in onsemi.com/pub/Collateral/KAI-0340-D.PDF is a good start. – EuklidAlexandria Apr 27 '19 at 12:38

# Physicsy way (and cheap equipment)

We can use a lux meter (built into most modern smartphones) to do the absolute measurements and thus make a reference of luminance.

Namely, consider a circular light emitter with radius $$R$$ and luminance $$L(\theta,\varphi)$$. If we measure illuminance $$I$$ of a surface parallel to it at the distance $$r$$, we'll get:

\begin{align}I&=\int\limits_0^{\arctan\left(\frac Rr\right)}\sin(\theta)\,\mathrm d\theta\int\limits_0^{2\pi}\mathrm d\varphi\,L(\theta,\varphi) \cos(\theta) \\ &=\frac12\int\limits_0^{2\pi}\mathrm d\varphi \int\limits_0^{\arctan\left(\frac Rr\right)}\mathrm d\theta\,\sin(2\theta)L(\theta,\varphi).\tag1\end{align}

Here $$\sin(\theta)$$ factor is due to spherical coordinates' Jacobian, and $$\cos(\theta)$$ is the projected area factor from the definition of illuminance.

If $$r \ll R$$, then the result will be virtually the same as if the emitter were infinite. In this case we can take emitter of any shape, provided that its size is still much larger than distance to the surface (lux meter).

Now, the role of the emitter can be played by a TV or a computer monitor showing a uniform white image. We can use the photo camera to measure dependence of emitter's luminance on angle of view, in horizontal and vertical (and possibly more) directions. After we measure this, we'll have some unknown variable $$a$$ in the camera measurement $$M$$ equal to

$$M(\theta,\varphi)=aL(\theta,\varphi).\tag2$$

Substituting $$L$$ expressed from $$(2)$$ into $$(1)$$, we'll get $$aI$$. But since we've also measured the illuminance $$I$$ using our lux meter, we can simply divide the calculated $$aI$$ by the measured $$I$$ and find $$a$$. From this follows the value for $$L(0,0)$$, which is the reference we were looking for.

# Techy way (and more expensive equipment)

Use a luminance meter or a screen calibrator. These devices directly measure luminance by means of their built-in photo camera, which, unlike the one in the OP, is already calibrated by the manufacturer. By measuring luminance of a screen and taking a raw photo of the same, we can find the relation between raw pixel values and luminance.

# Validation

I've actually done both experiments. I used the monitor of my netbook (EEE PC 1015PN), a DSLR photo camera (Canon EOS 1100D), a lux meter (Mastech MS6610), and a screen calibrator (SpyderX Pro + dispcal -R command from ArgyllCMS).

I've measured $$205\,\mathrm{lx}$$ right near the monitor, and two angular distributions of relative brightness (in horizontal and vertical directions). Calculating luminance as described above, I got the estimates of $$245 \frac{\mathrm{cd}}{\mathrm m^2}$$ and $$350 \frac{\mathrm{cd}}{\mathrm m^2}$$ for horizontal and vertical distributions in the assumption $$\varphi$$-independent luminance and $$333 \frac{\mathrm{cd}}{\mathrm m^2}$$ in the assumption of $$L(\theta_{\mathrm h},\theta_{\mathrm v})=L_{\mathrm h}(\theta_{\mathrm h})L_{\mathrm v}(\theta_{\mathrm v})$$ (i.e. multiplying both distributions). With the lux meter in my phone (Samsung Galaxy A320F/DS) I got $$225\,\mathrm{lx}$$, which raises both estimates somewhat.

Actual luminance measured by the screen calibrator was $$280 \frac{\mathrm{cd}}{\mathrm m^2}$$. So the maximum error appears to have been about $$25\%$$ (with the dedicated lux meter) or $$34\%$$ (with the phone) relative to the calibrator's value (which I suppose is the most precise). This is comparable to the precision of "something like $$20\%$$" requested in the OP.

Is there a predictable enough source of light outside laboratories, that we could use as a reference with known luminance?

I think a standard LED light bulb would work for that, within 20% anyway. But this is still a very difficult problem.

First, you have to accurately measure the distance to the bit of image you're measuring due to the inverse square law. Since even small changes in distance between the "standard candle" and the camera will have significant changes on light level, getting within 20% is going to require distance measures to a much higher degree than 20%

Next is the sensor. These are highly non-linear outside certain ranges, consider blooming and similar effects. So unless the object is roughly the same intensity and color temperature as the standard candle, I suspect the values will be inaccurate (although lab instruments would certainly hit the requirements). This seems to limit the usefulness of such a tool based on low-end systems anyway.

• Why would luminance (of a light source) change depending on distance? Don't forget that as we go away from the object, more of it maps to the same pixel. As a sanity check, I've made two photos of a wall: one from 2 m away, another from 30 cm away. Resulting pixel values are the same. – Ruslan May 4 '19 at 16:38