How to calculate resolution of pinhole camera?

I am 60 years old. I'm not a student and this is not homework (despite somebody trying to close it as a "homework question".)

I'm interested in building a long-focal-length pinhole camera (by "long" I mean 1 to 10 meters). I'm aware that will involve very long exposures and am planning to used a Peltier-cooled CCD for an imager (except maybe for solar viewing).

But I'd like to know if it's worth bothering - how much resolution can I expect, given a pinhole size and focal length (hole-to-sensor distance)? Will diffraction make this entirely pointless?

How would I go about calculating the expected resolution - clearly (to me) there's a contribution from the hole size (resolution will drop with a bigger hole), but diffraction will increase as the hole gets smaller.

Surely there must be some well-known formula for calculating this - what is it?

• A decade ago I found a source that went through this analysis in the context of solar observations. The result was that if you use a standard paper hole punch in a piece of paper or tinfoil, you can get a hand- sized image of the sun about ten meters away with enough resolution to track sunspots from day to day. If I am able to find the link I'll add it later (unless someone beats me to it).
– rob
Jul 21, 2022 at 17:20
• I'd guess the limit is due to diffraction by the pinhole, which forms an Airy disk. Then the angular resolution will be given by $\sin\theta = 1.22\lambda/d$, where $\lambda$ is the wavelength of the light and $d$ is the pinhole diameter. Jul 21, 2022 at 17:25
• @JohnRennie Clearly not all pinhole camera configurations are diffraction limited. Consider a 1 inch "pinhole" positioned 1 inch from the film/sensor. (focal length 1 inch). The blurring in that case is obviously dominated by the size of the hole, not diffraction. Jul 21, 2022 at 17:30
• This PDF link is the document I remembered. There is a competition among the diffraction-limited resolution, the observing distance at which the pinhole is "small," and the brightness of the projected image.
– rob
Jul 21, 2022 at 19:36
• Whenever I see something about a pinhole camera resolution I think of this image from Optics by Hecht. Jul 21, 2022 at 22:21

In general, both "wave effects" (i.e. diffraction effects) and "ray effects" (i.e. simply geometric effects) will be observed in a pinhole camera. The theoretical resolution is given by the sum of these two effects. For a pinhole camera of diameter $$d$$, depth $$l'$$, the resolution (or "spot width") $$U$$ is given by:
$$U_{tot} = U_{wave} + U_{ray} = \bigg(1.22l'\frac{\lambda}{d}\bigg) + d\frac{(l+l')}{l}$$
...for an object a lateral distance $$l$$ from the pinhole.
(note a change in notation: this author uses $$s$$ and $$s'$$ to denote the camera depth and lateral distance to the object)
• Note that for the Sun, $l\gg l'$ and so the second term ist just $d$. You don't want either term to dominate, and so you want $1.22l'\lambda = d^2$