- LENS DIFFRACTION & PHOTOGRAPHY -
Diffraction is an optical effect which can limit the total resolution of your photography-- no matter how many megapixels your camera may have. Ordinarily light travels in straight lines through uniform air, however it begins to disperse or "diffract" when squeezed through a small hole (such as your camera's aperture). This effect is normally negligible, but increases for very small apertures. Since photographers pursuing better sharpness use smaller apertures to achieve a greater depth of field, at some aperture the softening effects of diffraction offset any gain in sharpness due to better depth of field. When this occurs your camera optics are said to have become diffraction limited. Knowing this limit can help you to avoid any subsequent softening, and the unnecessarily long exposure time or high ISO speed required for such a small aperture.
Parallel light rays which pass through a small aperture begin to diverge and interfere with one another. This becomes more significant as the size of the aperture decreases relative to the wavelength of light passing through, but occurs to some extent for any size of aperture or concentrated light source.
|Large Aperture||Small Aperture|
Since the divergent rays now travel different distances, some move out of phase and begin to interfere with each other-- adding in some places and partially or completely canceling out in others. This interference produces a diffraction pattern with peak light intensities where the amplitude of the light waves add, and less light where they cancel out. If one were to measure the intensity of light reaching each position on a line, the data would appear as bands similar to those shown below.
For an ideal circular aperture, the 2-D diffraction pattern is called an "airy disk," after its discoverer George Airy. The width of the airy disk is used to define the theoretical maximum resolution for an optical system (defined as the diameter of the first dark circle).
|Airy Disk||3-D Visualization|
When the diameter of the airy disk's central peak becomes large relative to the pixel size in the camera (or maximum tolerable circle of confusion), it begins to have a visual impact on the image. Alternatively, if two airy disks become any closer than half their width they are also no longer resolvable (Rayleigh criterion).
|Barely Resolved||No Longer Resolved|
Diffraction thus sets a fundamental resolution limit that is independent of the number of megapixels, or the size of the film format. It depends only on the aperture's f-stop (or f-number) setting on your lens, and on the wavelength of light being imaged. One can think of it as the smallest theoretical "pixel" of detail in photography. Even if two peaks can still be resolved, small apertures can also decrease small-scale contrast significantly due to partial overlap, the secondary ring and other ripples around the central disk (see example photo).
VISUAL EXAMPLE: APERTURE VS. PIXEL SIZE
The size of the airy disk itself is only useful in the context of depth of field and pixel size. The following interactive table shows the airy disk within a grid which is representative of the pixel size for several camera models (move your mouse over each to change grid).
||Aperture||Camera Type||Pixel Area|
|f/2.0||Canon EOS 1D||136. µm2|
|f/2.8||Canon EOS 1Ds||77.6 µm2|
|f/4.0||Canon EOS 1DMkII / 5D||67.1 µm2|
|f/5.6||Nikon D70||61.1 µm2|
|f/8.0||Canon EOS 10D||54.6 µm2|
|f/11||Canon EOS 1DsMkII||52.0 µm2|
|f/16||Canon EOS 20D / 350D||41.2 µm2|
|f/22||Nikon D2X||30.9 µm2|
|f/32||Canon PowerShot G6||5.46 µm2|
Recall that a digital sensor utilizing a bayer array only captures one primary color at each pixel location, and then interpolates these colors to produce the final full color image. As a result of the sensor's anti-aliasing filter (and the Rayleigh criterion above), the airy disk can have a diameter of about 2-3 pixels before diffraction limits resolution (assuming an otherwise perfect lens, when viewed at 100% on-screen). However, diffraction will have a visual impact
As two examples, the Canon EOS 20D begins to show diffraction at around f/11, whereas the Canon PowerShot G6 (compact camera) begins to show its effects at only about f/5.6. On the other hand, the Canon G6 does not require apertures as small as the 20D in order to achieve the same depth of field (for a given angle of view) due to its much smaller total sensor size (more on this later).
Since the size of the airy disk also depends on the wavelength of light, each of the three primary colors will reach its diffraction limit at a different aperture. The calculation above assumes light in the middle of the visible spectrum (~550 nm). Typical digital SLR cameras can capture light with a wavelength of anywhere from 450 to 680 nm, so at best the airy disk would have a diameter of 80% the size shown above (for pure blue light).
Another complication is that bayer arrays allocate twice the fraction of pixels to green as red or blue light. This means that as the diffraction limit is approached, the first signs will be a loss of resolution in green and in pixel-level luminance. Blue light requires the smallest apertures (highest f-stop) in order to reduce its resolution due to diffraction.
- The actual pixels in a camera's digital sensor do not actually occupy 100% of the sensor area, but instead have gaps in between. This calculation assumes that the microlenses are effective enough that this can be ignored.
- Nikon digital SLR cameras have pixels which are slightly rectangular, therefore resolution loss from diffraction may be greater in one direction. This effect should be visually negligible, and only noticeable with very precise measurement software.
- The above chart approximates the aperture as being circular, but in reality these are polygonal with 5-8 sides (a common approximation).
- One final note is that the calculation for pixel area assumes that the pixels extend all the way to the edge of each sensor, and that they all contribute to those seen in the final image. In reality, camera manufacturers leave some pixels unused around the edge of the sensor. Since not all manufacturers provide info on the number of used vs. unused pixels, only used pixels were considered when calculating the fraction of total sensor area. This pixel sizes above are thus slightly larger than is actually the case (by no more than 5% in the worst case scenario).
WHAT IT LOOKS LIKE
The above calculations and diagrams are quite useful for getting a feel for the concept of diffraction, however only real-world photography can show its visual impact. The following series of images were taken on the Canon EOS 20D, which often begins to exhibit softening from diffraction at about f/11. Move your mouse over each f-number and notice the differences in the
|No Overlap of Airy Disks|
|Select Aperture:||f/8.0||f/11||f/16||f/22||Partial Overlap of Airy Disks|
Note how most of the lines in the fabric are still resolved at f/11, but they are shown with slightly lower small-scale contrast or acutance (particularly where the fabric lines are very close). This is because the airy disks are only partially overlapping, similar to the effect on adjacent rows of alternating black and white airy disks (as shown on the right). By f/22, almost all fine lines have been smoothed out because the airy disks are larger than this detail.
CALCULATING THE DIFFRACTION LIMIT
The form below calculates the size of the airy disk and assesses whether the system has become diffraction limited. Sections in dark grey are optional and have the ability to define a custom circle of confusion (CoC).
This calculator decides that the system has become diffraction limited when the diameter of the airy disk exceeds that of the CoC. For a further explanation on each input setting, please see their use in the flexible depth of field calculator.
The "set circle of confusion based on pixels" checkbox is intended to give you an indication of when diffraction will become visible when viewing your digital image at 100% on a computer screen. Understand that the diffraction limit is only a rough limit; there is actually a gradual transition between when diffraction is and is not visible. Real-world results will also depend on the lens being used; this limit is only a best-case scenario for the
NOTES ON REAL-WORLD USE IN PHOTOGRAPHY
Even when a camera system is near or just past its diffraction limit, other factors such as focus accuracy, motion blur and imperfect lenses are likely to be more significant. Softening due to diffraction only becomes a limiting factor for total sharpness when using a sturdy tripod, mirror lock-up and a very high quality lens.
Some diffraction is often ok if you are willing to sacrifice some sharpness at the focal plane, in exchange for a little better sharpness at the extremities of the depth of field. Alternatively, very small apertures may be required to achieve a long exposure where needed, such as to create motion blur in flowing water for waterfall photography. Diffraction is just something to be aware of when choosing your exposure settings, similar to how one would balance other trade-offs such as noise (ISO) vs shutter speed.
This should not lead you to think that "larger apertures are better," even though very small apertures create a soft image. Most lenses are also quite soft when used wide open (at the largest aperture available), and so there is an optimal aperture in between the largest and smallest settings-- usually located right at or near the diffraction limit, depending on the lens. Alternatively, the optimum sharpness may even be below the diffraction limit for some lenses. These calculations only show when diffraction becomes significant, not necessarily the location of optimum sharpness (although both often "camera lens quality: MTF, resolution & contrast"for more on this.
Are smaller pixels somehow worse? Not necessarily. Just because the diffraction limit has been reached with large pixels does not mean the final photo will be any worse than if there were instead smaller pixels and the limit was surpassed; both scenarios still have the same total resolution (although one will produce a larger file). Even though the resolution is the same, the camera with the smaller pixels will render the photo with fewer artifacts (such as color moiré and aliasing). Smaller pixels also provide the flexibility of having better resolution with larger apertures, in situations where the depth of field can be more shallow. When other factors such as noise and depth of field are considered, the answer as to which is better becomes more complicated.
Since the physical size of the lens aperture is larger for telephoto lenses (f/22 is a larger aperture at 200 mm than at 50 mm), why doesn't the size of the airy disk vary with focal length? This is because the distance to the focal plane also increases with focal length, and so the airy disk diverges more over this greater distance. As a result, the two effects of physical aperture size and focal length cancel out. Therefore the size of the airy disk only depends on the f-stop, which describes both focal length and aperture size. The term used to universally describe the lens opening is the "numerical aperture" (inverse of twice the f-stop). There is some variation between lenses though, but this is mostly due more to the different design and distance between the focal plane and "entrance pupil."
For additional reading on this topic, also see the addendum:
Digital Camera Diffraction, Part 2: Resolution, Color & Micro-Contrast
-Back to Photography Tutorials-