Optics in Computer Vision. Article 2: Aberrations
2. Article 2 — Aberrations (you are here)
3. Article 3 — Apertures and vignetting (the link will appear later)
4. Article 4 — Optical resolution (the link will appear later)
Introduction
My name is Andrew, and I work as a senior optical engineer, combining optical design, mechanical design, and alignment responsibilities, while also consulting other departments on optical matters.
This is the second article I initially wrote for internal training of junior- and mid-level developers in the neural network and computer vision team of my company.
This article is about optical aberrations. We will explore how a real lens element forms an image, what deviations from the perfect image occur in the process, and how aberrations are taken into account when working with images in computer vision.
Disclaimer:
Remember, this course is neither comprehensive nor exhaustive. It covers only a specific set of theoretical and practical topics that non-specialists in optics most commonly encounter when using off-the-shelf lenses.
The detailed theory of optical aberrations is a complex field. Therefore, this article provides only a simplified explanation of the third-order Seidel aberrations, chromatic aberration, and not beyond these.
Aberrations in Optical Systems
Let us look at Figure 1:
Now imagine that we start reducing the pixel size in the left part of the illustration. As the pixels shrink, the image becomes sharper and more detailed. Once the pixels become so small that pixelation is no longer visible, both halves of the illustration become equal in quality. In mathematical terms, the left half of the image is treated as an array of elements with dimensions ∆x and ∆y, and then impose the condition (∆x, ∆y) → 0. In this case, individual areas become infinitely small points.
The converse is also true: if a point in the original image is blurred into a spot, the image becomes less and less sharp.
Any image can be considered as a collection of an infinite number of infinitely small points.
The perfect lens from the first article forms a perfect image. An image is considered perfect when all rays originating from an infinitely small point of the object A converge at an infinitely small image point A′ (see the section “Formation of Image in Perfect Lens”). A perfect lens would focus every point to a point, producing a perfectly sharp image. However, a real lens focuses ray bundles not to points, but to so-called blur spots (or circles of confusion):
As a result, the image formed by a real lens is degraded: the circles of confusion from closely spaced object points overlap, reducing the sharpness and contrast of the image. A real camera lens consisting of real lens elements follows the same principle and never form a perfectly sharp image.
The causes of image degradation can be divided into several groups and subgroups, as shown in Figure 3:
When discussing aberrations, two simplifications are made for clarity:
1. Aberrations and circles of confusion will be shown at an enlarged scale
2. A single-element lens is used because its aberrations are large enough to be illustrative
There are exceptions to the second statement, such as aspheric lenses or laser optics. But for simplicity, the article does not cover exceptions or edge cases.
Aperture-Dependent Aberrations
This group of aberrations depends on the diameter of the lens’s entrance pupil. As discussed in the first article, the entrance pupil determines the diameter of ray bundle passing through the lens.
Spherical aberration
Essence: A parallel ray bundle, after passing through the lens, does not focus to a single point; it forms a circle of confusion of finite size. The symmetry of the ray bundle relative to the optical axis is preserved.
The transverse spherical aberration (shown in Figure 4 as Δy, the radius of the circle of confusion) is proportional to the third power of the entrance pupil diameter increment: if the entrance pupil diameter doubles, the circle of confusion increases by a factor of 23 = 8. For this reason, stopping down the aperture (reducing the entrance pupil diameter) improves sharpness of the image.
The two circles of confusion in Figure 4 are shown at the same scale.
Coma
The word coma derives from the Ancient Greek κόμη, meaning “hair.”
Essence: When a wide ray bundle passes through the lens at an angle to the optical axis, the circle of confusion loses its symmetry. In the absence of spherical aberration, the circle of confusion across the field looks like a cone that expands toward the edge of the frame:
Figure 5 shows an aspheric lens in which spherical aberration has been corrected. In such a lens, coma is absent on the optical axis (in the center of the frame), but it causes blurring closer to the edges, increasing with distance from the center.
The mathematics of coma and spherical aberration are different, but for simplicity, coma can be viewed as a violation of the symmetry of the circular zones of spherical aberration:
Interesting fact. The word comet is etymologically derived from the same root κόμη. Coma gets its name because its circle of confusion resembles a comet — a bright core with a fading tail.
Coma is one of the most common aberrations in reflecting telescopes and astrophotography. In Figure 5, the blurring of the three stars is caused by this aberration.
Special coma correctors are manufactured for telescopes to reduce coma:
Field-Dependent Aberrations
Field-dependent aberrations get their name from their dependence on the field-of-view angle: the larger the field angle, the stronger their effect. These aberrations manifest even for extremely narrow ray bundles (at very small apertures).
Astigmatism
The word astigmatism derives from Ancient Greek a — “negation” and stigma — “point.”
Essence: Off-axis ray bundles do not focus to a point or even a simple spot, but into a three-dimensional figure of complex shape located near the focal plane.
Astigmatism is the most difficult aberration to comprehend. Let’s examine it step by step:
1. Stop the lens down to such a small entrance pupil diameter that the aperture-dependent aberrations — spherical aberration and coma — become negligible.
2. Consider a narrow ray bundle incident on this entrance pupil at an angle to the optical axis, and examine the ray paths in two mutually perpendicular lens sections: one in the plane of the drawing (tangential plane) and the other in the plane normal to the drawing (sagittal plane).
3. It turns out that the bundle section in the tangential plane focuses at point t, while the bundle section in the sagittal plane, perpendicular to the first one, focuses at point s. Points t and s are the astigmatic focal points of the lens. Because of astigmatism, off-axis ray bundles do not have a single focus.
By varying the angle of inclination of the ray bundle, we can find that the geometric loci of points t and s in space form the surfaces of revolution TOT and SOS around the optical axis:
The essence of astigmatism is shown clearly in the illustration below: in the front and side projections it may appear that the red beam focuses at points t or s, but the isometric view reveals that the beam does not actually focus to a point anywhere, and the loci of points t and s are separated in space:
Since t and s are, in fact, not points but lines, they are correctly called astigmatic focal lines or tangential and sagittal focuses.
Figure 11 is a screenshot from Zemax, an optical design software. In a real lens, off-axis rays propagate exactly as shown, without converging to a single point.
What would we see if we placed a sensor behind the lens? As we already know, off-axis ray bundles cannot form a point-like image of a point object. Suppose we want to image a point object (a star, for example) near the edge of the field of view. In that case, astigmatism becomes apparent: at the tangential focus t the star appears as a thin line perpendicular to the plane of the drawing, and at the sagittal focus s it appears as a line lying in that plane.
The complete transformation of the ray bundles due to astigmatism is shown in the illustration below as a sequence of cross-sections. If a sensor is placed behind the lens and then moved closer to the lens while observing the images of points at the edges of the field of view, their images will successively take the shapes of the cross-sections shown in the box:
Figure 12 shows the blur spots of infinitely narrow ray bundles under pure astigmatism, without any other aberrations. First, the appearance of the blur spots on the sensor is shown, then how the blur spots change as the sensor approaches the lens. At the largest field angle (red rays), the astigmatic foci t and s are clearly visible.
Quantitatively, astigmatism is the distance between the astigmatic foci t and s for a particular field angle. Astigmatism reduces image sharpness at the edges of the frame, and the directions of blurring can change depending on whether the sensor is positioned closer to section T or section S:
Note. Do not confuse optical astigmatism (an aberration) with ocular astigmatism (a refractive error of the eye). Ocular astigmatism occurs because the astigmatic eye has an asymmetric, non-spherical shape. As a result, the cornea has different radii of curvature in different meridians, and hence different focal lengths. What unites these two types of astigmatism is the general property of different focusing in different sections, but the similarity ends there.
Field curvature
This is one of the most problematic aberrations to correct because sensors are flat.
Essence: The best image lies not on a plane but on a concave surface.
Let us look back to Figure 10, which explains astigmatism. Notice that between the TOT and SOS surfaces lies another surface, COC. Point images on this surface appear as small circular spots. Moving away from the COC surface in either direction causes these spots to grow larger, turning into ovals and eventually into astigmatic lines. These spots are not true points — due to astigmatism, the lens cannot form point images near the edges of the frame. However, these small circles of confusion approximate point images best because of their symmetry and minimal size. This means that the region of best focus lies not in the focal plane FOF, but on a concave surface that touches the focal plane only at point O on the optical axis:
The COC surface is not spherical, but at small field angles, it differs only slightly from a sphere.
Field curvature, like astigmatism, depends on the field angle and causes a loss of sharpness at the frame edges, because the sharpest region (the COC surface) is displaced from the sensor’s photosensitive plane.
In optical literature, field curvature is sometimes called Petzval curvature, after the Hungarian optician Joseph Petzval.
Interesting fact. This is precisely why the human eye has a spherical shape:
Field curvature is usually considered together with astigmatism because they are linked: in general, the surface of best image sharpness COC lies between the astigmatic surfaces TOT and SOS. However, in certain special cases, a lens can be corrected for astigmatism alone or for field curvature alone.
If the SOS surface coincides with the TOT surface, the lens has no astigmatism, but field curvature remains:
If the SOS surface is symmetric to the TOT surface with respect to the focal plane FOF, the lens has no field curvature, but astigmatism remains:
Distortion
The most well-known aberration derives its name from the Latin word distorsio — “twisting” or “bending.”
Essence: a loss of geometric similarity between the object and its image.
Distortion is defined as the percentage difference between the perfect and the real image size, with the sign taken into account. With pincushion (positive) distortion, the image magnification increases toward the edge of the frame; with barrel (negative) distortion, it decreases.
Distortion is the only aberration that does not reduce image sharpness. It is relatively easy to correct using digital image processing; standard tools exist, such as chessboard calibration in the OpenCV library.
Significant distortion occurs primarily in wide-angle and ultra-wide-angle (fisheye) lenses. In such lenses, high barrel distortion is intentionally introduced during optical design so that an extremely wide field of view fits onto a sensor of limited size. This makes lenses with fields of view exceeding 180° possible. However, in this case, the standard formulas for the perfect lens — based on similar triangles and arctangent relations — no longer apply. This is because distorting lenses deviate from the ideal, distortion‑free projection model (described by the tangent function).
Get Andrey Winter’s stories in your inbox
Join Medium for free to get updates from this writer.
Distortion plots are often included in the lens datasheets. On these plots, the vertical (Y) axis shows the angular field of view, and the horizontal (X) axis shows distortion in percent:
Alongside the plot, it is sometimes possible to obtain tabulated distortion data from the lens manufacturer. This table allows distortion to be corrected fully and directly by digital processing, with no calibration required.
There is also complex distortion (also called mustache distortion), whose geometric dependence is not as straightforward, but it is rare in ordinary lenses.
Interesting fact. Do not confuse optical distortion (an aberration) with distortion as an image-processing filter (blurring or loss of sharpness). Optical distortion does not reduce image sharpness — it concerns geometry only.
Chromatic Aberration
All the aberrations discussed earlier are called Seidel aberrations (named for Philipp Ludwig von Seidel, who decomposed the third-order aberrations into these five types), and they are monochromatic. We did not specify the color of the light passing through the lens. However, each color corresponds to its own wavelength:
White light results from mixing all spectral colors. The refractive index of glass depends on wavelength, so any refraction at the boundary between two transparent media splits white light into its spectral components. This phenomenon is called dispersion (from the Latin dispersio — “scattering”). Violet light (short wavelengths) refracts the most, and red light (long wavelengths) refracts the least:
Interesting fact. The cover of Pink Floyd’s album The Dark Side of the Moon is drawn incorrectly. In reality, the dispersion occurs at the first face of the prism. Inside the prism, the white beam must split into a spectrum. The second face only increases the angular separation between different colors:
A lens element can be imagined as a pyramid built from prisms, or even as a prism with its flat faces replaced by curved surfaces:
Therefore, any lens element, like a prism, disperses white light into a spectrum, although in most lenses the effect is much weaker because prisms typically have a larger refracting angle (the angle between their faces).
Chromatic aberrations exist only in lens-based optical systems; reflection from mirrors does not cause dispersion.
Interesting fact. A rainbow in the sky after rain or in fountain spray is the sunlight dispersed by tiny water droplets.
As a result, when switching from monochromatic light to real white light, the image is further degraded by chromatic aberrations, also called chromatism. All manifestations of dispersion in lenses can be conveniently described by two types of chromatic aberrations: longitudinal chromatic aberration and lateral chromatic aberration, also known as axial color and lateral color.
Longitudinal chromatic aberration (axial color)
Essence: When a beam of white light passes through a lens, it splits into a spectrum of colored rays due to dispersion. These rays intersect the optical axis at different distances from the lens. As a result, a number of images of different colors are formed at consecutive positions along the axis. In optical terms, the focal length of a lens is slightly different for each color:
As a result, a mixture of several colors is formed in the image plane:
In Figure 27, the circle of confusion of a white-light beam in the focal plane demonstrates longitudinal chromatic aberration (combined with spherical aberration). Spots of different colors and sizes overlap, restoring white light at the core and producing colored halos around it. Shifting the sensor along the axis changes the size and color of these halos.
Unlike spherical aberration, longitudinal chromatic aberration appears even for infinitely narrow light bundles. However, its presence amplifies the effect of spherical aberration, causing an additional loss of sharpness and introducing colored halos around point images in the center of the field of view:
Lateral chromatic aberration (lateral color)
Essence: For the same field angle, rays of different wavelengths pass through the lens at slightly different angles due to dispersion. This causes colors to spread into a spectrum in the direction from the center of the frame toward the edges and produces asymmetric colored fringes along the borders of images:
Red fringes appear closer to the edge of the frame, while blue ones appear closer to the center:
Aberrations Overview
To demonstrate all discussed aberrations, Figure 31 shows the effect of each of the seven aberrations individually on image quality. In each case, we assume that only the depicted aberration is present, while all others are perfectly corrected. A square grid of points is used as the object for each aberration:
Any real blur spot is the result of the combined effects of all the aberrations present in the lens.
Aberration Correction
So how do real photographic lenses achieve high image quality? Let us examine the formula describing a real thick lens:
Suppose we have chosen a specific type of optical glass and a fixed lens thickness. In that case, the refractive index (n) and the center thickness (d) become constants, and the focal length of the lens depends only on its surface radii. For a given focal length (f’), there exists an infinite number of radius pairs (R₁ and R₂) that yield the same focal length. While keeping the focal length — and thus the optical power — unchanged, the lens can take on different shapes. This variation is known as lens bending:
Lenses with the same focal length but different shapes have different aberration values, including a reversal of the aberration sign (from positive to negative, or vice versa). By combining several lens elements and additionally adjusting their thicknesses (d) and glass types (n) through selective choice of optical glasses, optical designers achieve a configuration that fulfills the target specifications (such as focal length and f-number) while holding aberrations within acceptable limits. Such an assembly of lens elements is called an objective (or simply a camera lens).
A single lens has only four variable parameters: two radii, thickness, and glass type. The higher the demands for image quality, aperture (f-number), and field angle, the more lens elements are required to find a successful combination. This forces optical designers to use an increasing number of lens elements in objectives:
Interesting fact. It is precisely the lack of variable parameters in a single lens that makes it impossible to correct all aberrations in it and use it as a camera lens.
In some especially complex optical systems, the number of lens elements reaches astonishing values. For example, older-generation deep-ultraviolet (DUV) photolithography objectives — used in semiconductor manufacturing to produce chips — contained a staggering number of elements:
In modern optical systems, spherical surfaces no longer provide sufficient degrees of freedom to achieve the required performance. Hence, advanced lens designs often employ aspherical surfaces and even freeform surfaces:
The design of optical systems — determining the number of lenses, their radii, positions, glass types, and so on — is conducted by optical designers. Optical design is a specialized and science-intensive area, representing one of several core optical disciplines; specialists in other fields, such as opto-mechanical design or testing, rarely engage in detailed optical calculations.
Image Quality Across the Frame
Which aberration values are acceptable?
It is impossible to eliminate all aberrations completely. Reducing one aberration often causes another to increase. Therefore, an optical designer must balance them, minimizing their combined effect to acceptable limits while avoiding an excessive number of elements (which would increase the size, weight, assembly complexity, and cost of the optical system).
Now, equipped with knowledge of aberrations, we can analyze their impact on image quality in different parts of the frame. First, consider the table below, which shows how each aberration depends on aperture and field angle:
Spherical aberration is proportional to the cube of the entrance pupil diameter. If the diameter is doubled, the circle of confusion on the sensor increases by ²³ = 8 times. Spherical aberration does not depend on field angle, because it is defined to on-axis points only.
Coma is proportional to the square of the entrance pupil diameter and to the first power of the field angle. When the diameter is doubled, the coma-induced circle of confusion on the sensor increases by ²² = 4 times. As the field angle increases, coma grows in direct proportion to the distance from the frame center to the edges.
Astigmatism is proportional to the first power of the entrance pupil diameter and to the square of the field angle. When the diameter is doubled, the astigmatism-induced circle of confusion on the sensor increases by ²¹ = 2 times. As the field angle increases, astigmatism grows proportionally to the square of the distance from the frame center to the edges.
Field curvature, being a direct consequence of astigmatism, exhibits similar dependence.
Distortion is proportional to the cube of the field angle. As the field angle increases, distortion grows proportionally to the cube of the distance from the frame center to the edges. Distortion does not depend on the diameter of the entrance pupil because it is an aberration that changes the image size, and the image size for a ray bundle of any diameter is determined by a single central (chief) ray.
Note. To simplify the estimation of field-dependent aberration effects, we neglect the tangential dependence between field angle and distance from the frame center.
Interesting fact. This article covers the third-order (Seidel) monochromatic aberrations. Higher-order aberrations also exist, but their influence is generally much smaller and is relevant only to optical designers.
Let us examine image quality across the frame from the perspective of aberration theory. The center of the optical image is defined by the point where the optical axis intersects the sensor plane, and this almost always happens at the center of the frame. Since field-dependent aberrations vary with the distance from the optical axis, any points at the same radius from the center of the frame exhibit identical image quality. Thus, the frame can be mentally divided into an arbitrary number of concentric zones, with image quality degrading in each zone as its distance from the center increases:
Near the optical axis the image quality is the highest because field aberrations are absent and vignetting is minimal (we will discuss vignetting in detail in the third article of the course). The farther a point lies from the center of the frame, the lower the image quality: field aberrations increase, and vignetting becomes more pronounced. For a lens itself (without a camera), the usable field of view is limited by the acceptable loss of sharpness and brightness.
Let us illustrate how image quality degrades across the frame using the modulation transfer function (MTF) plot. MTF plots visualize the relationship between spatial frequency and contrast for a particular lens.
MTF plots are explained in detail in the final article of the course, “Optical resolution.”
· Black line: diffraction limit of the lens (theoretical maximum)
· Blue line: on-axis performance (frame center)
· Red lines: performance at 2° field angle (mid-frame)
· Green lines: performance at 4° field angle (frame edge)
Due to astigmatism, image quality at different field angles is given separately for the tangential (T) and sagittal (S) planes. Consequently, for each field angle, the MTF is plotted as a pair of curves: one for the tangential plane and one for the sagittal plane.
The higher the curve on the MTF plot, the better the image quality for that particular field. As the MTF chart shows, the greater the field angle, the lower the contrast and, consequently, the lower the image quality. The best image quality is achieved on the optical axis (at the center of the frame) and decreases toward the edges.
MTF plots provide a quick and convenient way to evaluate lens performance. Reputable manufacturers include these plots in their lens datasheets. These plots can be presented in various formats; for a detailed guide on how to interpret them, please refer to the Carl Zeiss article “How to Read MTF Charts.” A shorter explanation of how to read MTF charts is given in the fourth article in this course, but in general, remember one simple rule: the higher the curve, the better the image quality.
Remember: Image quality is generally highest at the center of the frame. In computer vision, the region of interest should be kept close to the center of the frame, if possible.
So why do we not usually notice image degradation toward the edges in real photos? There are several reasons:
- High-quality lens design. Modern lenses are carefully optimized so aberrations are minimized.
- Aberrations are balanced across the field of view. Image quality near the edges is improved at the expense of a slight reduction in quality around the optical axis.
- Discrete sensor resolution. Image sensors are discrete, and many of the aberrations’ effects are lost during sampling.
- Lens resolution is often higher than sensor resolution. When a lens and sensor are from a similar price class, the lens resolution — at least in the center of the field of view — frequently exceeds what the sensor can capture.
- In machine vision, additional illumination of the object can be introduced, allowing the iris diaphragm to be closed down further, thereby increasing sharpness through the reduction of aperture-dependent aberrations.
- Sometimes the observed object lacks detail of sufficiently high spatial frequency for blur to be visible. This is why lens quality is measured using specialized MTF test equipment:
Key Takeaways
· Aberrations in real lenses reduce image quality.
· Image quality is always better around the center of the frame.
· The higher the curve on an MTF plot, the better the image quality.
The next article is Apertures and Vignetting
This is the second article in the course on optics for computer vision developers.
Original Russian version is available at the link.
Translated by the author.








