TransWikia.com

How to calculate the optimal pinhole size?

Photography Asked on August 16, 2021

As far as I’ve understood, optimal diameter for pinhole size is calculated by formula

d = c × √(f × λ)

where

d – the optimal diameter for pinhole
c – constant
f – focal length (distance between pinhole and film/sensor)
λ – wavelength of light the pinhole should be optimized for

f and λ should be in same units as desired for d

Different sources seem to agree that about 550nm (green-yellow) is a good value for λ, and the focal length part is also quite clear.

However, each source seems to provide different value for the magic constant c

The difference of 34% between smallest and largest suggested value seems quite significant.

Why are there so many different values for the constant? Are different constant values optimizing different properties of resulting image? Or perhaps different constants apply to different pinhole material thicknesses (if that’s the case, do bigger constants go for thicker materials)?

2 Answers

I can't summarize the whole optical physics theory behind pinhole (mostly because I don't have the proper knowledge!), but I try to explain why there are different values for constant C. One reason that there are different values for C is the fact that one parameter in the calculation of optimum diameter of hole is missing! Let us refer to the wikipedia article that you mentioned:

Within limits, a smaller pinhole (with a thinner surface that the hole goes through) will result in sharper image resolution because the projected circle of confusion at the image plane is practically the same size as the pinhole. An extremely small hole, however, can produce significant diffraction effects and a less clear image due to the wave properties of light.

This means the purpose of C is to find a value that results in good trade off between sharpness and diffraction. Determining this value, however, is dependant on another factor and that is the distance of the subject to the camera.

enter image description here

Circles on the bottom shows the effect of pinhole size on the resulting image.

enter image description here

In the second figure dashed line (geometric limit) is the resolution and solid line is the diffraction. As you can see the diffraction is affected by θ which is a function of distance to the pinhole.

With all being said, IMHO, the whole reason behind different values for C is the fact that it is obtained empirically and each of them had a different value for p (with reference to the first figure).

Copyright

The plots are borrowed from this file. You can find a lot about the pinhole physics in this document.


P.S. I had a look at the source of the mrpinhole.com page and it seems they are using C=1.92.

P.P.S. Having a look at those websites, it seems each of them have a different value for λ and this could lead to different value for C.

P.P.P.S. I agree with MarcinWolny's comment that a perfectly rounded hole is way much more important.

Correct answer by Pouya on August 16, 2021

The earliest investigation of the right constant c that I am aware of is Petzval's 1859 On the camera obscura. The paper is predominantly about a new lens design he has created but he begins with an investigation of the optimum radius of a pinhole for resolution of the image. Resolution is defined as the ability to discern the difference of two very close objects in the image. If we imagine the objects as point-sources of light then we will be able to resolve that there are two if the spots of light they cast in the image do not substantially overlap. Thus to determine the resolving power of a pinhole we need to determine the diameter of the image of a point-source of light. If the pinhole is big then classical optics say the size of the image is the same as the size of the pinhole. If the pinhole is small diffraction causes the image of a point-source of light through a pinhole to consist of a brighter central spot surrounded by a series of concentric dark and light rings. Petzval creates a equation for the diameter, D, of the largest, central spot of light in cast through a pinhole which attempts to take into account both the classical optics ("large" pinholes) and diffraction ("small" pinholes):

D = 2r + fλ/r

where r is radius of pinhole, f is focal length and λ is wavelength of light. Using elementary calculus he finds that the diameter of light is minimized when

r = sqrt{fλ/2}

or

D = sqrt{2} sqrt{fλ} = 1.414 sqrt{fλ}.

In 1891 Lord Rayleigh published his first On pin-hole photography(p. 493) where he proposes

D = sqrt{2} sqrt{fλ}

based on the computation that with such a pinhole size the maximum phase difference between any two rays of light is no more than λ/4 and thus cannot substantially interfere destructively. He posits this as a good rough criterion for the perceived diameter of the image of a point source of light through a pinhole. He discussed having demonstrated by experiment that this value is good in practice.

In 1891 Lord Rayleigh published his second On pin-hole photography In this paper he criticizes Petzval's argument for being unsound but notes that it gives the same value that was determined by rough calculation and experimentally in his previous paper. Then, using Lemmel's exact solution to the computation of the diffraction image of a point-source of light through small apertures, he computes the shape of the diffraction patterns formed by small circular pinholes. He then calculates the size of the central dot for c = 1, sqrt{2}, 2, sqrt{6} and 2 sqrt{2}. He notes that the two cases that have the smallest diameter of central image spot are c = sqrt{2} and c=2.

He then describes an experiment done with a range of actual pinholes and determines that the best was equivalent to c = 1.89 which falls in the zone he determined from theory. The sizes of pinholes he tried that were smaller and larger than his experimentally chosen best one were equivalent to c = 1.74 and 2.11 so his value of c should be considered good to within about 10%. Before moving on let me recommend the web page Pinhole Design – what Lord Rayleigh really said for a discussion of Lord Rayleigh's other results from this paper, in particular the fact that there is an f-stop number past which lenses are not better than pinholes. They also discuss the implications for what will be in focus for pinhole cameras (it is not the whole field).

In 1971 Young performed a series of experiments with very fine differences in constant c which he reported in Pinhole Optics. He determines that the value of c which optimizes resolution is c=2. These results are probably good to about 1% which is quite precise.

In a 2004 presentation The Pinhole Camera Revisited or The Revenge of the Simple-Minded Engineer Carlsson points out however that that resolution is not the only factor that affects how sharp we perceive an image to be. Another important factor is the Contrast. Optimum contrast is determined not by the smallest radius of the central spot in the diffraction patter through a pinhole, but how much of the total light is contained in the central bright spot, in other words, how concentrated the light it around the center. He provides some very good pictures demonstrating the difference between resolution vs. contrast and to my eye he is correct that sacrificing resolution for increased contrast improves the image. His value of c which optimizes contrast is c = 1.56. The closest other values of c that he reports are c=1 and c=2 so c=1.56 should be considered good to within about 20%.

Trying to find a higher precision result for the best constant for contrast led me to Sroyon's Making, Measuring and Testing the “Optimal” Pinhole: Pinhole Adventures Part 3 which presents some good discussion and experimental results. His article led me to two more references which discuss the resolution/contrast tradeoff which follow.

In 2017 Tim Parkin reported a series of pinhole tests for resolution and contrast in The Science and Aesthetics of the Hole which also has some good photos showing difference between the two criteria. He used homemade and laboratory made pinholes and it is nice to see the impact of thinness of material and quality of the hole on the resulting pictures. His tests also verify that for human perception of sharpness c=1.56 is the best. Parkin varied his focal length for a set of four pinhole sizes but it is not clear to me what precision applies to his findings that c=1.56 is best.

Finally a similar discussion appears in Lambrecht & Woodhouse's Way Beyond Monochrome on pp.153-154, where c=1.56 is given as the best compromise. The authors use the word "Theorem" but do not give the proof that 1.56 is optimal. I would like to have a reference for this proof but I have not found one yet. In this text they claim that the optimum resolution is given by c=1.9 citing Lord Rayleigh but to me Young's empirical evidence for c=2 seems quite strong.

I think the take away from all this is that c=2 seems to be well supported by experiment and theory for maximizing resolution (being able to discern the difference between two close objects) but for images which appear "sharp" to human eyes, contrast is important too and thus one should use a smaller value of c, perhaps as low as c=1.56. In the cases above where actual photographs were taken and shown, the perceptual differences between c=1.56 and c=2 are very subtle so my last take away is not to worry too much about where you are in this range.

Answered by brett stevens on August 16, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP