Selection of pinhole size
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. Additionally, vignetting occurs as the diameter of the hole approaches the thickness of the material in which it is punched, because the sides of the hole obstruct the light entering at anything other than 90 degrees.
The best pinhole is perfectly round (since irregularities cause higher-order diffraction effects), and in an extremely thin piece of material. Industrially produced pinholes benefit from laser etching, but a hobbyist can still produce pinholes of sufficiently high quality for photographic work.
One method is to start with a sheet of brass shim or metal reclaimed from an aluminium drinks can or tin foil/aluminum foil, use fine sand paper to reduce the thickness of the centre of the material to the minimum, before carefully creating a pinhole with a suitably sized needle.
A method of calculating the optimal pinhole diameter was first attempted by Jozef Petzval. The crispest image is obtained using a pinhole size determined by the formulawhere d is pinhole diameter, f is focal length (distance from pinhole to image plane) and λ is the wavelength of light.
For standard black-and-white film, a wavelength of light corresponding to yellow-green (550 nm) should yield optimum results. For a pinhole-to-film distance of 1 inch (25 mm), this works out to a pinhole 0.17 mm in diameter. For 5 cm, the appropriate diameter is 0.23 mm.
The depth of field is basically infinite, but this does not mean that no optical blurring occurs. The infinite depth of field means that image blur depends not on object distance, but on other factors, such as the distance from the aperture to the film plane, the aperture size, and the wavelength(s) of the light source.