This App Is A Light Meter
We recently got to work with Kelli Anderson, lo-fi paper design extraordinaire, to build a new partner app for her book: This Book Is A Camera.
The app is designed to take the guesswork out of pinhole photography, measuring the amount of light and interpreting that data into a timeframe of how long it would take for a balanced photo to be captured.
There are already a few apps to test light, but they’re either not designed with pinholes in mind, used to measure the amount of light needed for different plants, or used for gauging how far away lightning is.
Kelli wanted the app to perform three functions:
- Calculate the exposure time for a pinhole camera with an aperture of f/228 using film paper with an ISO of 10 (exactly the specs of Kelli’s pop up camera)
- A built-in timer so you wouldn’t have to switch to other apps to countdown the seconds to the ideal exposure
- An inverter to capture the negative created by the pinhole and turn it into a photo you could save and share
So we hit the books - specifically, the five copies of This Book is a Camera that Kelli provided us. Where other books might shy away from the more technical aspects of science, Kelli’s books showcase every detail (and use only paper to do so)!
The app follows Kelli’s ethos by offering a technically precise set of tools in a clear, straightforward way. Each utility in the app directly complements a step of the pinhole process, and the UI takes colors and visuals from the book to unite the digital experience with the analog tool.
We also studied the iOS Camera app, because many people are already familiar with the visual vocabulary established by Apple. Full-screen gestures and haptic feedback give the photographer a clear understanding of the app’s workflow.
Our task was to design an algorithm that accurately approximated exposure times, to do that we needed to do some math.
Since photo paper has a certain sensitivity to photon interactions (it’s albedo), the higher the luminosity, the lower the exposure time. This luminosity value comes from the device’s camera, and we knew it was between 0
and 1
. We required that our model fit the following conditions: for the exposure time function T
T(l) = 0
When l = 1
, and
T(l) = ∞
when l = 1
, for some
l ∈ L ∈ [0, 1]
This infinity represents the fact that in complete darkness no exposure can take place – the limit of T
as l
goes to zero is infinity, also suggesting a higher-order denominator. More importantly, this suggests that there is a vertical asymptote that bounds the function to the left – which means that our model will be highly non-linear.
Initially, we tried different power expansions e, tan, and Taylor polynomials, and found that some coefficient multiplication of e was an (initially) acceptable metric for our model. The eccentricities (how curvy the curve is) of powers of e were hard to tame, and the resulting model varied widely across different devices. What we had yet to account for were variations in device hardware that lead to different luminosity calculations, which was problematic.
So we had to go back to the drawing board.
Instead, our final model approximates the exposure time given the luminosity of the entire frame and computes this at smaller f-stop numbers, which traditionally have less asymptotic variance. We then scale this value to the camera’s f-stop and device’s iso, which share a squared-inverse relationship. This performs consistently across all devices – and shows the best models are simple and not overengineered or overthought.
Hat tip to Eric Hagan, Awoisoak, and those at Stanford for their open source equations which helped us along the way.
The app was written in Swift for iPhone and iPad and relies heavily on the AVCaptureDevice framework to access the camera feed, as well as the Core Image framework for the real-time filters. We also used Photoshop and Pixelmator to create the bitmaps used in the app, and Paintcode for the various vector graphics.
QA for the light meter was very involved, but it was so much fun! We wanted to make sure our app was precise in varied lighting conditions and worked accurately according to the book’s specifications. So we tested it — a lot.
We also had to spend time exposing the pictures that we took. Unsurprisingly, our office doesn’t have a dark room, but we do have a utility room on our floor that we could shut Alex in. Kelli’s book suggests developing with instant coffee and washing soda if you don’t have the proper developer, so that’s what we used. It works brilliantly - the only problem was the smell. Imagine the smell of a cheap plastic Halloween mask being burnt and you’ve got it. It still haunts our nostrils.
This App Is Lit ™
It’s got a cute website, simple UI, and even a countdown timer to the perfect balanced exposure. Use it and let us know what you think.