Pinhole 101: a brief history of the camera obscura
From Warring States China to Both In Time: four stops along an almost-forgotten optic.
June 8, 2026 · 8 min read · Przemek Zajfert
Strictly speaking, a camera doesn't need a lens; a dark space and a very small hole will do. Everything else, lenses, apertures, autofocus, sensors, refines a principle that was already complete before anyone could use it photographically. That principle is two and a half thousand years old, and it can be told in four stops.
Before every lens, there was a hole.
Stop one: China, the Warring States
The earliest known description sits in the Mohist Canons, a set of logical and scientific chapters appended to the book Mozi. It describes light from an illuminated person falling through a small aperture into a dark space, where it produces an inverted image, and it explains the inversion correctly: the rays cross at the aperture.
One widespread error we will not repeat here: the passage is not by Mozi himself. Mozi lived from roughly 470 to 391 BCE; the Canons were compiled by his followers, on current scholarly reading somewhere between the 4th and the 3rd century BCE. There is a second caveat too: what stands there is not a camera obscura in the sense of a built device, but the observation of an optical effect. That sounds pedantic, but it separates two quite different things: someone having seen the effect, and someone having used it.
The observation circulated in the Greek world too. The compilation known as the Problemata describes how, during a partial solar eclipse, the holes of a sieve or the gaps between leaves draw crescent-shaped patches of light on the ground. The work travels under Aristotle's name, but classicists consider the attribution seriously doubtful: the collection reached its final form somewhere between the 3rd century BCE and the 6th century CE. Anyone wanting to be precise therefore writes not "Aristotle observed" but "the Aristotelian corpus records".
Stop two: Cairo, around 1015
Observation became experiment with Ibn al-Haytham, known in the West as Alhazen. In his Book of Optics, written in Cairo somewhere between 1011 and 1021, he describes a darkened room with a small aperture in which he caught the crescent of the partially eclipsed sun. What matters is how he went on: he set up several light sources at once, let their light pass through one or more apertures, and showed repeatably that light travels in straight lines and that the separate bundles of rays do not mix. With those experiments, the old observation turns into an instrument.
The full geometric account of the inversion, with the crossing point at the aperture, is usually credited to Shen Kuo, who set it down in 1088 in the Dream Pool Essays and compared the process to an oar turning in its rowlock around a fixed point. Some seventy years after Ibn al-Haytham, and independently of him.
Stop three: Europe learns to draw
In the 16th century the instrument became a tool, and here the history is thick with misattribution.
Leonardo da Vinci noted a clear description around 1502 in the Codex Atlanticus: all objects lit by the sun send their images through the aperture and appear there upside down. Only it had no effect, because his notebooks were not published until centuries later. Whoever spread the camera obscura through Europe had never read Leonardo.
It spread through printed books instead. The oldest known published illustration of a camera obscura appears in 1545 in Gemma Frisius, who had used one to observe the solar eclipse of 24 January 1544 in Leuven. In 1550 Girolamo Cardano described how a converging lens in the aperture sharpens the image. In 1558 Giambattista della Porta's Magia Naturalis appeared, a bestseller that brought the technique to a wide audience, and did so again in the expanded 1589 edition.
Out of this grew the most stubborn myth in the subject: that della Porta invented the camera obscura. He did not. By then it was at least five hundred years old, and even the lens he is often credited with had been described by Cardano eight years earlier. What della Porta genuinely achieved was popularisation. Not a small achievement, but a different one.
In 1568 Daniele Barbaro recommended, in La Pratica della Perspettiva, combining a converging lens with a stop to control sharpness and depth, explicitly as an aid for artists who draw. And in 1604 Johannes Kepler finally gave the thing its Latin name in the Ad Vitellionem Paralipomena: camera obscura, dark chamber.
The English phrase for the lensless device came much later. In 1856, in The Stereoscope, David Brewster used the wording "pin hole" for a camera without lenses. So the word that would be on our camera, had we named it in English, is younger than photography itself.
Stop four: the image stays
For two thousand years the image in the dark chamber was fleeting. You could look at it, trace it, marvel at it, but not keep it. The step from seeing to keeping is the actual invention of photography, and it failed first.
Thomas Wedgwood tried from the 1790s with leather and paper soaked in silver nitrate. He got contact images of objects and painted glass, photograms in other words, but no projected image from the camera obscura, and none of it lasted: with no fixer, everything darkened completely. Humphry Davy published the account in 1802. Wedgwood died in 1805 without having kept a single image.
Nicéphore Niépce succeeded, with the view from the window at Le Gras, taken onto a pewter plate. The date is often given as 1826. Helmut Gernsheim, who rediscovered the plate, later revised his own dating: the best current estimate is a window between 4 June and 18 July 1827. Whether Niépce's apparatus used a lens or a bare hole we leave open, because we cannot substantiate it.
Why a smaller hole is not always better
The lovely thing about the pinhole is that its physics fits in two sentences and is still not trivial.
Each point of the scene is projected through the hole not as a point but as a small disc, roughly the size of the hole itself. So: smaller hole, smaller discs, sharper image. That holds only up to a limit. Once the hole is very small, diffraction makes itself felt: light is deflected at the edges of the aperture, and the smaller the hole, the stronger the effect. Two kinds of blur therefore run against each other, a geometric one that shrinks with the hole and a wave-optical one that grows with it. An optimum sits between them.
Lord Rayleigh investigated it in 1891 in "On Pin-hole Photography" in the Philosophical Magazine. In today's usual shorthand the rule reads: the optimal hole diameter is about 1.9 times the square root of the product of distance and wavelength. The figure 1.9 is a later summary, not a formula quoted verbatim from Rayleigh's paper.
Run that backwards for a 0.3 mm hole in green light of 550 nanometres and you get an optimal distance between hole and paper of about 45 millimetres. That corresponds to an aperture of roughly f/150, since the f-number of a pinhole camera is simply distance divided by hole diameter. For comparison, a good lens works at f/2. This is why a pinhole exposure takes seconds to minutes where a phone needs milliseconds. The long exposure belongs to this way of photographing as fundamentally as the hole itself.
And because no refracting element is involved, there is no plane of focus to miss. Near and far are rendered equally soft. People like to call this infinite depth of field, which is a little generous, but in practice it holds: you cannot misfocus a pinhole camera.
That leaves the inversion. The image being upside down and mirror-reversed at the same time is one and the same effect: every ray has to pass through the same point, so top travels to bottom and left travels to right, simultaneously, a rotation of 180 degrees about the hole. That is exactly what the drawing above shows, and exactly what the Mohist Canons already wrote down correctly more than two thousand years ago.
A fifth stop, still open
The last Sunday in April is Worldwide Pinhole Photography Day. It was first held on 29 April 2001, with 291 participants from 24 countries, and has since grown to over 1,800 photographers from around 67 countries. A holiday for a technique that is technically entirely superseded and still draws more people every year.
What interests us about this optic is a property that appears in none of the four stops: a pinhole camera is so simple that you can hand it away. No battery, no electronics, nothing anyone could operate incorrectly. You can give it to another person and wait to see what comes back. Why we built a camera for two out of that is in A manifesto for slow photography. How the exposed paper then becomes an image with instant coffee is explained in Caffenol: the developer made from coffee. And the whole sequence, from piercing the hole to inverting the negative, is in the instructions.
Further reading: Jon Grepstad's technical survey of pinhole photography history, cameras and formulas and, on Rayleigh specifically, the essay what Lord Rayleigh really said, which corrects the usual shortening of his formula.