Closing a lens aperture can bring more of a part into focus while making its finest features less distinct. That is not necessarily a focusing mistake: diffraction becomes stronger as the aperture closes. For inspection systems, the useful setting balances diffraction, aberrations, depth of field and exposure. You can estimate the physical limit before selecting hardware, then verify it with your actual feature and lighting. The calculations below separate that theoretical limit from the contrast your inspection algorithm really needs.
What diffraction changes at the image plane
A lens cannot reproduce an ideal point as an infinitely small point. With an ideal circular aperture, monochromatic light produces a central bright spot surrounded by weaker rings. The central region, measured between the first dark rings, is the Airy disk.
Closing the aperture increases the f-number and enlarges this pattern. Nearby details overlap more strongly, reducing contrast at fine spatial frequencies. Refocusing cannot remove this physical spreading.
For an ideal, unobstructed circular pupil under paraxial conditions:
Use the same length unit for wavelength and disk diameter. For example, wavelength in micrometres gives a disk diameter in micrometres.
The entrance pupil is the apparent aperture viewed through the front optics, not necessarily the physical iris opening. The effective f-number also matters at close working distances, as explained below.
These equations describe an ideal optical limit, not guaranteed lens performance. Aberrations, defocus, motion and sampling can reduce detail further. For the broader evaluation method, use lens contrast and resolution.
Compare diffraction with pixel pitch, not megapixels alone
The following estimates use monochromatic light at 550 nm, equivalent to 0.55 µm. They assume low magnification, where effective f-number is approximately the marked f-number.
| F-number | Airy disk diameter | Diameter across 3.45 µm pixels | Incoherent diffraction cutoff |
|---|---|---|---|
| f/4 | 5.4 µm | 1.6 pixels | 455 lp/mm |
| f/5.6 | 7.5 µm | 2.2 pixels | 325 lp/mm |
| f/8 | 10.7 µm | 3.1 pixels | 227 lp/mm |
| f/11 | 14.8 µm | 4.3 pixels | 165 lp/mm |
| f/16 | 21.5 µm | 6.2 pixels | 114 lp/mm |
The cutoff is the image-plane spatial frequency at which the ideal incoherent optical response reaches zero contrast. It is not a recommended operating resolution.
For 3.45 µm pixels, Nyquist is 1000 / (2 × 3.45) ≈ 145 lp/mm. Frequencies approaching this sampling limit are sensitive to feature alignment and aliasing.
An Airy disk wider than one pixel does not automatically make the image unusable. Conversely, a disk narrower than two pixels does not guarantee reliable inspection. The relevant question is how much contrast remains at your required feature frequency. The small-pixel camera selection guide explains why smaller pixels do not automatically deliver more usable detail.
Worked example: cutoff is not usable resolution
Consider an illustrative sensor with 3.45 µm pixels imaging a repeating pattern at 100 lp/mm in the image plane. One bright-and-dark cycle occupies:
The pattern is below the sensor's Nyquist frequency, but that only addresses sampling. It does not establish adequate optical contrast.
At 550 nm and f/8:
For an ideal circular pupil under incoherent imaging, the diffraction modulation transfer function, or MTF, is:
At f/8, u = 100 / 227 ≈ 0.44, giving approximately 46% diffraction MTF. At f/16, the cutoff falls to approximately 114 lp/mm. The same pattern then has u ≈ 0.88 and only about 5% diffraction MTF.
Both settings place the pattern below the theoretical cutoff. However, the second leaves much less contrast before accounting for sensor integration, noise, aberrations or motion.
Translate the calculation to the part
Inspection requirements usually describe dimensions on the part, while diffraction calculations describe dimensions at the sensor. Magnification connects the two.
Suppose an illustrative sensor has 2048 pixels across its width, with 3.45 µm pixel pitch. Its active width is 2048 × 3.45 / 1000 ≈ 7.07 mm. Covering a 35.3 mm field gives a magnification of approximately 0.20.
A repeating object pattern with a 0.10 mm cycle then forms a 0.020 mm image cycle. Its image frequency is 1 / 0.020 = 50 lp/mm, with about 20 / 3.45 ≈ 5.8 pixels per cycle.
The object-space sampling is also 35.3 × 1000 / 2048 ≈ 17.2 µm per pixel. Use the object-space pixel size calculation guide to distinguish sampling from optical resolution.
At finite magnification, a common approximation for a lens with unity pupil magnification is:
At 0.20 magnification, marked f/8 becomes approximately effective f/9.6. The estimated Airy diameter becomes 2.44 × 0.55 × 9.6 ≈ 12.9 µm. This correction is approximate; use lens-specific effective aperture data when available, especially for asymmetric or specialist optics.
Balance diffraction against depth of field and exposure
Opening the aperture reduces diffraction, but it can expose aberrations and reduce the acceptable depth range. Closing it can improve off-axis performance initially, then reduce fine-detail contrast as diffraction grows. The most useful aperture is therefore often between the extremes.
Depth of field is an acceptable-sharpness range, not a region with identical image quality. Its value depends on magnification, aperture and the blur criterion used.
Judge the full part-height range, not just a flat target at the nominal plane. An aperture that resolves the smallest feature at the centre plane may fail on raised or recessed surfaces.
Stopping down also reduces light reaching the sensor. At unchanged magnification and scene illumination, moving from f/4 to f/8 requires approximately four times the exposure to recover the same signal, neglecting transmission differences.
An exposure of 0.25 ms would therefore become approximately 1 ms. On moving parts, that change can introduce more motion blur than the aperture adjustment removes through improved focus tolerance.
Keep gain, exposure and illumination under control during testing. Otherwise, automatic adjustments can hide the trade-off. The automatic iris, exposure and gain guide explains how these controls interact.
Choose wavelength for the inspection, not diffraction alone
Diffraction blur scales directly with wavelength. At the same effective f-number, changing from 550 nm to 850 nm enlarges the theoretical Airy disk by 850 / 550 ≈ 1.55 times.
At effective f/8, the estimated diameters are:
- 550 nm: 2.44 × 0.55 × 8 ≈ 10.7 µm.
- 850 nm: 2.44 × 0.85 × 8 ≈ 16.6 µm.
Shorter wavelengths can therefore support finer diffraction-limited detail. That does not make them the right choice for every inspection. Surface reflectance, material penetration, camera sensitivity and lens correction may matter more.
A wavelength that produces strong defect contrast can outperform a shorter wavelength with weak material contrast. Consult the machine vision optical filter guide when selecting a narrow illumination band.
For broadband illumination, a single wavelength calculation is only a representative estimate. The recorded image combines wavelength-dependent diffraction, lens behaviour and sensor response. Laser or strongly coherent illumination also needs a different transfer model; the incoherent cutoff calculation above should not be applied unchanged.
Select a lens without assuming an aperture guarantee
Start with machine vision lenses that cover the sensor and provide the required field at the available working distance. Then evaluate their aperture options and fine-detail performance. The lens finder helps narrow the mechanical and optical requirements.
The LS-FFL-0567 is listed with a 16 mm focal length and an F2.8-22 aperture range. That range permits aperture trials, but the catalog information does not establish an optimum setting for your inspection.
- Type
- Machine vision fixed
- Sensor format
- 1.1"
- Mount
- C-mount
- Resolution
- 16-25 MP
The LS-FFL-0602 is listed as an 8.5 mm, 1", C-mount machine vision lens. Treat it as a different field-coverage candidate, not as a direct substitute selected on diffraction alone.
- Type
- Machine vision fixed
- Sensor format
- 1"
- Mount
- C-mount
- Resolution
- 6-10 MP
Neither example should be assigned an application-specific resolution from focal length or nominal megapixel rating alone. Confirm sensor coverage using the lens sensor format guide, then request relevant performance information where catalog data does not answer the question.
Verify the aperture on the actual inspection
Use a controlled comparison rather than judging general visual sharpness.
- Define the limiting feature. Record its size, contrast, orientation and permitted measurement error. Include both centre and corner locations.
- Establish the depth range. Capture the nearest, nominal and farthest permitted part surfaces. Include expected positioning variation.
- Compare several apertures. A sequence such as f/4, f/5.6, f/8 and f/11 is a useful generic trial where the lens permits those settings.
- Refocus at each setting. First compare each aperture at its own best focus, then assess performance across the required depth range.
- Match signal levels. Adjust illumination or exposure without clipping highlights. Repeat at production speed to reveal motion blur.
- Measure task performance. Compare edge stability, defect detection and false decisions, not only an overall sharpness score.
- Lock and repeat. Recheck after securing the lens settings and after normal operating conditions have stabilised.
Use a fixed, relevant region of interest for numerical comparisons. The image sharpness measurement guide explains why different focus metrics can favour different image content.
When stopping down is the wrong answer
Do not keep closing the iris when fine-detail contrast is already falling and the extra depth range is unnecessary. Instead, investigate focus position, part presentation, illumination angle or a different optical arrangement.
Likewise, do not open the iris solely to make the calculated Airy disk smaller. If corners become unacceptable or part-height variation causes failures, the theoretical diffraction improvement has not improved the inspection.
Before ordering, record field of view, sensor dimensions, pixel pitch, wavelength, working distance, part-height range and exposure limit. Start the lens configuration with those requirements, or contact the applications team to review the aperture trade-off and any missing lens performance data.
Questions
Which aperture gives the sharpest machine vision image?
No single f-number is sharpest for every inspection. Opening the aperture reduces diffraction but may increase aberrations and reduce depth of field. Compare several settings using the smallest required feature at the centre, corners and permitted part heights, then verify the result at production speed.
Is an Airy disk larger than a pixel always unacceptable?
Not necessarily. The Airy disk diameter describes a point-spread pattern, not a strict pass-or-fail pixel requirement. Useful contrast can remain when the disk spans several pixels. Evaluate the feature's spatial frequency, available contrast, sampling and noise together rather than rejecting an aperture from disk diameter alone.
Can stronger illumination remove diffraction blur?
More illumination does not reduce the diffraction pattern at a fixed wavelength and aperture. It can let you use a shorter exposure or lower gain, reducing other image limitations. It may also make a smaller aperture practical, but that aperture still carries its own diffraction penalty.
Why can near-infrared illumination soften fine detail?
Longer wavelengths produce a larger diffraction pattern at the same effective f-number. However, changing wavelength also changes material contrast, lens correction and sensor response. Compare complete inspection results with focus adjusted appropriately rather than assuming a wavelength change affects diffraction alone.
Should close-up diffraction calculations use the marked f-number?
Use the effective f-number when evaluating diffraction at appreciable magnification. For a lens with unity pupil magnification, marked f-number multiplied by one plus magnification is a common approximation. Specialist or asymmetric optics may require lens-specific information because their pupil geometry changes that relationship.

