Optics

The hole that makes the sharpest picture

A pinhole camera makes a picture without bending any light: a small hole lets through, from each point of the scene, only the rays that reach one small patch of the screen. A smaller hole makes a sharper picture — until it does not. Below a certain size the hole spreads light by diffraction faster than it narrows the shadow, and the picture blurs again. The best hole balances the two, and at that balance it turns out to pass about half of the first Fresnel zone of the incoming wave: the sharpest pinhole is already beginning to behave like a lens.

Assumes: What a lens is doing, and why three rays are enough · Where rays stop being enough, and a shadow acquires a bright centre

A lens makes a picture by bending: every ray from one point of the scene is turned towards one point of the image, and the rays that start together end together. A pinhole makes a picture by blocking. It turns nothing. From each point of the scene it lets through only the thin cone of rays that happen to be aimed at the hole, and that cone lands on a small patch of the screen behind; neighbouring points of the scene send their cones to neighbouring patches, and an image appears, upside down, in a darkened room or box. It was described by Chinese and Arab scholars more than a thousand years ago, and by Renaissance painters who traced its pictures, and it needs no glass at all.

What decides how sharp it is looks at first like simple geometry: the patch each point lands on is about as wide as the hole, so a smaller hole makes a sharper picture. The geometry is right and it is half the story. Light passing through a small hole spreads, by diffraction, into a cone whose angle grows as the hole shrinks, and for a small enough hole that spreading makes the patch wider than the hole. There is a best size. Finding it, and finding what the light is doing at that size, turns out to lead straight back to the lens the pinhole was supposed to do without.

Two blurs pulling in opposite directions

Too small blurs by diffraction, too large by shadow. The size of the image of a distant point through a pinhole 100 mm from the screen, in 550 nm light, against the hole's diameter, both on logarithmic axes. The dashed lines are the two simple estimates: the hole's own shadow, as wide as the hole, and the diffraction spread, 2.44λf/d. The dots are the diameter holding half the light, computed from the Fresnel diffraction integral. They follow the shadow for large holes and the diffraction for small ones, and are least — 0.207 mm — for a hole 0.336 mm across, where the simple sum of the two estimates puts its minimum at 0.366 mm. At the best hole the Fresnel number d²/4λf is 0.51: the sharpest hole, judged by where half the light lands, lets through about half of the first Fresnel zone.
Fig. 1 The blur of a distant point through a pinhole 100 mm from the screen, in 550 nm light, against the hole’s diameter, both logarithmic. Dashed: the hole’s shadow, as wide as the hole, and the diffraction spread, 2.44λf/d. Dots: the diameter holding half the light, from the Fresnel diffraction integral, least at 0.21 mm for a hole 0.34 mm across. At that hole the Fresnel number is 0.51.

The drawing sets up the problem for a camera a hundred millimetres deep in green light. The first dashed line is the geometric blur: a distant point’s light passes the hole as a parallel beam and lands as a disc the size of the hole. The second is the diffraction blur: light through a circular hole of diameter dd spreads into a pattern whose central disc, at distance ff, has a diameter of 2.44λf/d2.44\lambda f/d — the pattern that sets how far apart two things have to be before a telescope can separate them. One line falls as the hole shrinks and the other rises. Their sum is least where they are equal, at d=2.44λfd = \sqrt{2.44\lambda f}, about a third of a millimetre here.

That estimate adds two things that are not really separate. Near the balance the light is neither a geometric shadow nor a far-field diffraction pattern; it is something in between, and the honest calculation follows the wave through the hole to the screen. The dots do that, from the Fresnel diffraction integral, and measure each image by the diameter within which half the light falls. For large holes they sit on the shadow line, and for small holes on the diffraction line. In between they dip below both estimates, and their minimum — a blur of 0.21 millimetres — comes for a hole 0.34 millimetres across, close to the simple estimate but not at it.

The number that describes where the minimum sits is the Fresnel number, d2/4λfd^2/4\lambda f: the hole’s area measured in units of the zones into which the incoming wave’s path lengths to the centre of the screen divide it. At the best hole it is 0.51. The sharpest pinhole passes about half of the first Fresnel zone.

One length made of the wavelength and the distance

Why should the best hole grow as the square root of the depth, rather than in proportion to it? Because there is only one length that can be built from the two lengths in the problem, the wavelength and the distance to the screen, that grows at all with the distance: λf\sqrt{\lambda f}. It is the radius of the first Fresnel zone, and it turns up wherever a wave travels a distance past an obstacle. It sets the width of the fringes at the edge of a shadow, where light arriving directly and light spread from the wave that comes from the rim interfere. It sets how close to a hill a radio link can pass: a microwave link thirty kilometres long at ten gigahertz must keep a clear space about fifteen metres in radius around its line of sight at the midpoint, the first Fresnel zone, or the hill takes a bite out of the signal. And it sets the pinhole’s best size, for the same reason in each case — it is the width of the region over which paths differing by half a wave can still be told apart.

The Fresnel number, the hole’s area in units of that zone, is therefore a map of which kind of optics applies. A hole many zones across is in the regime of shadows and rays: light goes straight through, and its edge produces only thin fringes. A hole much smaller than one zone is in the regime of far-field diffraction, where the pattern on the screen is the hole’s Fourier transform and its shape no longer matters much. The pinhole’s optimum sits at about half a zone, in the middle of the crossover, which is why neither the ray estimate nor the diffraction estimate gets the minimum exactly right and why the full Fresnel calculation, the spiral that says how much light arrives at each point, is needed there.

What the image of a point looks like

What the point looks like through three holes. The brightness across the image of a distant point, relative to the light falling on the hole, against distance from the centre of the image, for holes 0.167 mm, 0.334 mm, 0.668 mm across at 100 mm from the screen — half, one and two times the best. The small hole makes a broad, faint diffraction disc, peaking at 0.16 times the incident brightness. The best hole, passing 0.51 Fresnel zones, makes a compact spot 2.05 times brighter than the light arriving at it — it concentrates light, as a lens does. The large hole, passing 2.0 zones, casts a wide disc with rings at its edge and a centre of only 0.01, because two zones' contributions nearly cancel there.
Fig. 2 Brightness across the image of a distant point, relative to the light falling on the hole, for holes of 0.17, 0.33 and 0.67 mm at 100 mm — half, one and two times the best. The small hole gives a faint broad disc peaking at 0.16; the best hole a compact spot peaking at 2.05; the large hole a wide disc with edge rings and a centre of only 0.01.

The three profiles show what the half-light diameter summarises. Through a hole half the best size the light has spread into a broad, faint disc: the diffraction pattern of a small aperture, its brightness at the centre only a sixth of what fell on the hole. Through a hole twice the best size the image is a wide disc — the shadow — with bright fringes at its rim and, strikingly, an almost dark centre. Through the best hole it is a compact spot whose centre is twice as bright as the light that arrived.

That last number deserves attention, because it says the pinhole is concentrating light. A hole cannot add energy; the power through it is fixed by its area. But it can redistribute that power, and at the best size it puts more of it into the centre of the image than a uniform beam would have there. The reason is phase. Light from every part of a small enough hole reaches the centre of the screen having travelled nearly the same distance, so it arrives nearly in step and adds constructively. That is exactly what a lens is for: a lens is an arrangement that makes all paths from a point to its image equal. A hole small enough is one in which all the paths are already nearly equal.

A hole that counts zones

The centre of the image counts Fresnel zones. The brightness at the centre of a pinhole's image of a distant point, relative to the light falling on the hole, against the hole's Fresnel number — the number of half-wave zones of the incoming wavefront it lets through, d²/4λf. It is exactly 4 sin²(πN/2): four times the incident brightness when the hole passes one zone, because every part of that zone's light arrives at the centre within half a wave of every other part; zero at two zones, where the second zone cancels the first; four again at three. A hole of one zone makes the brightest centre — it is the simplest zone plate — while the hole that makes the smallest spot passes about half a zone, so what counts as the best pinhole lies between the two and depends on what sharp is taken to mean. A hole of two zones throws a black spot on the axis of a bright disc.
Fig. 3 The brightness at the centre of a pinhole’s image against the number of Fresnel zones the hole passes, d2/4λfd^2/4\lambda f. It is 4sin⁡2(πN/2)4\sin^2(\pi N/2): four times the incident brightness at one zone, zero at two, four again at three.

The centre of the image can be computed exactly, and the answer is one of the neatest results in optics. Divide the incoming wavefront, as seen from the centre of the screen, into rings — Fresnel zones — each of whose edges is half a wavelength further from that centre than the one inside it. Light from one zone arrives within half a wave of itself and adds up; light from the next zone arrives out of step with the first and subtracts. A hole that passes exactly the first zone makes the centre four times as bright as the incident light. A hole that passes two zones makes it dark, because the second zone cancels the first. In between, the brightness at the centre is exactly 4sin⁡2(πN/2)4\sin^2(\pi N/2), with NN the number of zones passed.

The two numbers — 0.51 zones for the smallest spot, 1 zone for the brightest centre — bracket what “the best pinhole” means. Lord Rayleigh, who worked on the question in 1891, recommended a hole of 1.9fλ1.9\sqrt{f\lambda}, which passes 0.9 of a zone; other criteria give values anywhere between half a zone and one. The disagreement is not an error in any of them. It is that “sharpest” has several reasonable definitions — the smallest spot, the brightest centre, the finest detail rendered with contrast — and near the optimum they pull slightly apart. A photographer choosing a pinhole finds the result insensitive to the choice within that range, because the blur curve in the first drawing is flat at its bottom.

The one-zone hole is also the first step towards a lens made of holes. Block the second zone, open the third, block the fourth, and every zone that is let through adds in step at the centre: that is a zone plate, the lens that is a set of rings, whose focus grows brighter with every zone added. A pinhole at its best is a zone plate with one zone, and a zone plate is what a pinhole becomes when the rest of its aperture is made to contribute instead of cancel.

Bigger cameras, finer angles

A bigger pinhole camera sees more sharply. For pinhole cameras from 10 mm to 1000 mm deep, each with its best hole, the angular size of the blur, in minutes of arc, and the camera's f-number, depth over hole diameter. The best hole grows as the square root of the depth, from 0.106 mm to 1.06 mm, so the blur on the screen grows as the square root too, and the blur measured as an angle falls as one over it: 23′ for the smallest camera and 2.3′ for the largest. The f-number rises from 95 to 947, so the sharper camera is also the slower one. A lens of any size does better on both counts; a pinhole's only advantages are that it has no distortion and focuses everywhere at once.
Fig. 4 For pinhole cameras 10 mm to 1,000 mm deep, each with its best hole, the angular blur in minutes of arc and the f-number over ten. The best hole grows from 0.11 to 1.06 mm, as the square root of the depth; the angular blur falls from 23′ to 2.3′; the f-number rises from about 95 to about 950.

Because the best hole grows as the square root of the camera’s depth, so does the blur on the screen, and the blur measured as an angle — what fraction of the scene one blur spot covers — falls as one over the square root of the depth. A deeper pinhole camera is angularly sharper. A camera a centimetre deep blurs over about 23 minutes of arc, nearly the width of the full Moon. One a metre deep blurs over about 2 minutes, close to what the eye can resolve. The price is light: the f-number, depth over hole diameter, rises as the square root of the depth, from about f/95 to f/950, so the deeper camera needs a hundred times longer exposure than the shallow one, and ten thousand times longer than a lens at f/8.

That arithmetic explains both why pinhole photography survives as an art and why nobody uses it for anything else. Its pictures have no distortion, since every ray is straight, and infinite depth of field, since nothing is focused, so everything from a flower a few centimetres away to the horizon is equally sharp — or equally soft. A lens loses depth of field as it gains light; a pinhole never had the light to lose.

The crescents under a tree

The most familiar pinhole cameras are not built. Sunlight through the gaps between the leaves of a tree falls on the ground as overlapping round patches, and during a partial eclipse every patch becomes a crescent. Each gap is a pinhole, and each patch is an image of the Sun.

The arithmetic above says why they are images of the Sun rather than of the gaps. A gap a centimetre across with the ground five metres below passes about nine Fresnel zones, well into the regime of shadows, so diffraction plays no part and the patch is the geometric projection. That projection is the Sun’s disc — half a degree across, so four or five centimetres at five metres — blurred by the gap’s own size. Where the Sun’s image is larger than the gap, the patch takes the Sun’s shape whatever the gap’s shape is; a square gap a few metres up still casts a round patch. Nearer the ground, where the gaps are large compared with the Sun’s image at that distance, the patches take the shapes of the gaps instead. The crossover between the two is the same trade as a pinhole camera’s, between the shadow of the hole and the picture it is making, with the Sun’s size playing the part diffraction plays for a point.

Eyes that stayed pinholes

Why nearly every eye has a lens. The finest angular detail three eyes can resolve, in minutes of arc on a logarithmic scale: pinhole, 10 mm deep, best hole, 23′ at f/95; pinhole, 17 mm deep, 17′ at f/123; lens eye, 17 mm, pupil 3 mm, 0.77′ at f/6. A pinhole eye the size of a human one, with its best hole, blurs detail tens of times coarser than a lens eye with a small pupil, and gathers a hundred times less light; making it brighter means a larger hole and a worse image. The chambered nautilus, whose open pinhole eye is about 10 mm deep, has lived with that trade for hundreds of millions of years; its pupil never closes below about 0.4 mm, four times the best hole for its depth, and it widens it further in dim light at the expense of sharpness.
Fig. 5 The finest detail three eyes can resolve, in minutes of arc: a pinhole 10 mm deep with its best hole, the depth of the chambered nautilus’s eye, 23′ at f/95; a pinhole 17 mm deep, 17′ at f/123; a lens eye 17 mm deep with a 3 mm pupil, limited by diffraction, 0.77′ at f/6.

Animals have been making eyes for half a billion years, and one lineage never added a lens. The chambered nautilus has an open cup about a centimetre deep with a small hole at the front, through which seawater flows freely, and a retina at the back. It is a pinhole camera, and the arithmetic above says what it could see at best: with the ideal hole for its depth, about a tenth of a millimetre, detail no finer than about twenty minutes of arc, some thirty times coarser than a human eye, at an f-number near a hundred. The nautilus does not even use that hole. Its pupil never closes below about 0.4 millimetres, four times the optimum, and in dim light it widens to nearly three, trading sharpness for brightness exactly as a photographer would; its view is blurred to a degree or more, and at its widest far worse.

A lens eye of the same depth, with a three-millimetre pupil, is limited by the diffraction of its pupil to under a minute of arc — and it gathers far more light while being sharper, because its pupil is ten times wider than the best pinhole. Almost every other lineage that evolved image-forming eyes, independently, put a lens in the hole. Why the nautilus did not is a puzzle in evolutionary biology rather than optics: the optics are unambiguous about what it has given up.

Where the pinhole model stops

A distant, monochromatic point. Every calculation here is for a point at infinity in light of one wavelength. A near object puts the geometric blur at d(1+f/u)d(1 + f/u) rather than dd, which favours a slightly smaller hole; white light mixes diffraction patterns of different sizes, and a hole optimal for green is slightly too small for red and too large for blue. Neither changes the square-root scaling.

A hole in an ideal screen. The hole is taken to be a perfect circle in an infinitely thin, perfectly opaque sheet. A real pinhole drilled in foil has a thickness comparable with its diameter, so it acts as a short tube that cuts off oblique rays and dims the edges of the picture, and a ragged edge scatters light into the image. The best pinholes are made in thin shim with a polished edge, which is also why their performance at the theoretical optimum is hard to reach in practice.

The screen. The film or sensor has a grain or pixel size of its own, and for a shallow camera the best pinhole’s blur of a tenth of a millimetre or so is comparable with the pixels of a large sensor; the picture is then limited by both, and the recommended hole shifts slightly.

What the profiles leave out

The profiles are of a single point. A picture is a scene of many points, and how well a pinhole renders detail depends on how it transmits contrast at each spatial frequency — which, for a pinhole near its optimum, falls smoothly to zero at a frequency set by the hole, with none of the sharp cutoff and ringing a lens shows at the edge of its own aperture’s transform. The pictures also omit the dark rings of the diffraction pattern, which for a slightly oversized hole put a faint halo round bright points, the reason pinhole photographs of street lamps show them as soft stars.

Still open: how small a camera’s eye can be

Tiny cameras — in medical endoscopes, in insect-scale robots, in the stacked sensors of phones — are running into the same trade the nautilus lives with. A pinhole or a very small lens in front of a sensor a millimetre deep can resolve only tens of minutes of arc however it is built, because the aperture that diffraction allows is too small to gather much light. Designs that spread the aperture into many tiny openings or into a mask of many pinholes and then compute the image — coded apertures, lensless cameras — trade optics for computation and recover some of the light, at the cost of noise that the computation amplifies. How far such designs can go before noise, rather than diffraction, sets the limit is under active development, and the answer is being argued with the same Fresnel integral used here.

The habit worth carrying away is to ask what a limit is made of. When shrinking something improves one error and worsens another, the best size is where they meet, and it usually lands at a dimensionless number that says what the object has become there. For a pinhole that number is the Fresnel number, and at its best the hole passes about half a zone of the wave — enough of a wave that a pinhole at its sharpest is already doing, crudely, what a lens does by design.

Part 8 of 8

This essay is one argument about Imaging. The others:

The objects named here

The third axis, after the field and the reading path: the things themselves, and every essay that touches each one.

DiffractionF numberFresnel zoneImagingPinhole cameraPoint-spread functionResolutionZone plate