Machine Vision Optics Guide

Lens Aberrations in Machine Vision: Diagnosing Blur, Color Fringes, and Distortion

A sharp center and soft corners are a starting observation. A focus sweep, an aperture change, and a wavelength comparison tell you more than the symptom alone.

By Commonlands engineering team · Updated September 2026 · 6 min read

Lens with focus and aperture rings

Lens aberrations affect image quality before an algorithm ever sees the image. Field curvature and astigmatism can soften off-axis detail, while spherical aberration and axial chromatic aberration can blur the center as well. Understanding these effects helps explain why a lens resolves a feature in one part of the image and struggles elsewhere.

Start With the Image

Even an aberration-free lens blurs a point slightly because light diffracts at its aperture. Aberrations add other changes to sharpness, color registration, or image geometry. Several can act together, so one soft corner does not identify the cause.

The modulation transfer function (MTF) describes how much contrast a lens preserves at different spatial frequencies, or levels of detail. “Good enough” depends on the application. Appearance involves judgment; an inspection task needs a repeatable acceptance test. Sensor pixel pitch is a necessary reference for interpreting lens performance in a sampled image; see the MTF guide.

Start with an aligned, flat target and stable lighting. Adjust focus through its best setting while comparing the center, opposite corners, and detail in two perpendicular orientations. Save raw or minimally processed images so sharpening does not hide the blur.

Chromatic Aberration: Color and Focus

Axial chromatic aberration means different wavelengths focus at different distances. Lateral chromatic aberration means they form images at different sizes, so color edges shift apart away from the center. Kingslake and Johnson explain both in Lens Design Fundamentals, Chapter 5.

Compare focus using the camera's actual illumination. A monochrome sensor can still record chromatic blur because it collects a range of wavelengths. Narrowband lighting reduces that range, but changing its center wavelength can still move focus. Stopping down can reduce axial-color blur; it is not a general correction for lateral color.

Spherical Aberration: Blur at the Center

Spherical aberration occurs when rays from the same on-axis point focus differently depending on whether they pass near the center or edge of the lens aperture. Refocusing chooses a compromise. A lens with aspheric surfaces can still have residual spherical aberration.

Closing the aperture often reduces this blur, although diffraction becomes more limiting as the opening shrinks. Best focus can also move, so refocus at each aperture. Correction can involve aspheres, glass choices, or changing surface curvatures; Kingslake and Johnson describe the last method as lens bending.

Field Curvature and Astigmatism

With field curvature, the best-focus surface is curved. A flat sensor may therefore capture a sharp center and soft corners. Astigmatism gives off-axis detail different best-focus positions in perpendicular orientations. The two effects often occur together; Kingslake and Johnson describe these focus surfaces in Chapter 11.

If both orientations at a corner sharpen together at a different setting from the center, field curvature is a likely contributor. If they sharpen at different settings, investigate astigmatism. Compare opposite corners and check alignment too: a tilted sensor or target can produce a similar focus mismatch.

Stopping down makes some focus differences more tolerable, but does not flatten the focus surfaces. Repeat the test at your intended working distance, because aberrations can change with object distance.

Coma: An Asymmetric Point Image

Coma spreads a point into an asymmetric blur, often with a comet-like tail. Compare a small, unsaturated light source at several positions across the image. A separate disk or duplicate source may instead be a reflection ghost; the stray-light guide explains how to test those paths.

What Aspheric Surfaces Can Improve

An aspheric surface departs from a sphere, giving the designer more control over how rays meet. It can reduce several aberrations, depending on its position in the lens. An aspheric-element count alone tells you little about the finished image.

Aspheres can improve usable edge focus by balancing aberrations, but do not automatically produce a flat field or remove color errors. The MIL-HDBK-141 optical-design reference distinguishes that improvement from changing the Petzval curvature, which depends on refractive indices and surface curvatures at the optical axis.

Three compact threaded lenses with different barrel lengths
Similar mount dimensions can contain different optical prescriptions. Compare measured performance at the same conditions.

Choose a Test From the Symptom

SymptomFirst Comparison
Soft cornersSweep focus at opposite corners and in perpendicular orientations.
Soft centerRefocus at different apertures and illumination wavelengths.
Color edges separateCompare color-channel positions across the image.
Lines bendMeasure the image mapping with a calibration target.
A point has a tail or duplicateMove the source and compare focus changes with ghost motion.

What Software Can Recover

Distortion changes where scene points appear without itself blurring them. Calibration can correct this mapping and reduce lateral color. Resampling changes local sampling and may change contrast, so judge the corrected image.

Image restoration can reduce known blur when the image contains enough signal above the noise. It cannot reliably reconstruct arbitrary detail that the optics or sampling did not record. Correct the focus, aperture, or lens choice first, then check that processing does not create false features.

Compare Lenses at the Working Conditions

Focus a fixed M12 assembly by moving the complete lens in its holder. This changes the image-plane position without rebalancing the lens internally. Some C-mount designs move groups relative to one another to compensate for changing object distance; that mechanism is a design choice, not a mount requirement.

Compare candidate lenses on the same sensor at the working aperture, distance, and illumination band. Include the camera's cover glass and filters. Check the full image area your task uses.

Write a Repeatable Acceptance Test

State the spatial frequencies, minimum contrast transfer, image positions, and detail orientations you need. Record aperture, wavelength, object distance, and the method used to choose focus. Set distortion and color-registration limits separately.

Agree on acceptance limits using representative images and the measurement task. A supplier should be able to repeat your test without guessing what “sharp enough” means.

Frequently Asked Questions

Do soft corners prove that a lens has field curvature?

No. Field curvature, astigmatism, alignment errors, and other aberrations can soften corners. Compare through-focus response in both orientations and at opposite field positions before identifying the cause.

Does stopping down correct field curvature?

Stopping down can reduce blur from a focus mismatch and increase the range that meets an image-quality criterion. It does not flatten the Petzval surface. Diffraction and reduced light throughput limit how far this tradeoff helps.

Does an aspherical lens eliminate spherical aberration?

An aspheric surface gives the designer more control over aberrations, but the complete lens can still have residual spherical aberration. Its performance must be checked at the operating wavelength, aperture, and object distance.

Does a monochrome camera avoid chromatic aberration?

A monochrome sensor still integrates light over its sensitivity band. Different wavelengths can therefore blur at different focus positions. Narrowband illumination reduces that spread, but finite bandwidth and a change of illumination wavelength still need evaluation.

Can software fix lens aberrations?

Geometric calibration corrects distortion and can reduce lateral color. Image restoration can compensate some characterized blur when noise permits. Neither guarantees recovery of clipped, undersampled, or optically suppressed detail. Test the corrected output against the measurement task.

References

  1. Rudolf Kingslake and R. Barry Johnson, Lens Design Fundamentals, 2nd ed. (2010). Academic Press. Chapters 4–6, 9, and 11 cover aberration theory, chromatic and spherical aberration, coma, and oblique aberrations.
  2. Kingslake and Johnson, Chapter 5: Chromatic Aberration. Publisher-hosted excerpt from §5.1 on axial color and the wavelength ordering of a positive singlet.
  3. Kingslake and Johnson, §6.1.4: Effect of Lens Bending. Publisher-hosted excerpt explaining spherical-aberration control through lens shape.
  4. Kingslake and Johnson, Chapter 11: The Oblique Aberrations. Publisher-hosted excerpt from §11.1 on the sagittal and tangential line foci.
  5. Kingslake and Johnson, §11.7.3: Aspheric Surface Corrections. Publisher-hosted excerpt giving primary aspheric contributions and their dependence on stop position.
  6. MIL-HDBK-141, Optical Design, Chapters 7–12. US Department of Defense handbook, hosted by the University of Arizona. Its aspheric-deformation treatment distinguishes aberration correction from the Petzval contribution.

Talk With Commonlands Engineering

Send full-resolution images at several focus settings, along with the sensor model, lens, aperture, and illumination band. We can help choose the measurements needed to compare candidate optics.