# Chromatic aberration

In optics, chromatic aberration (CA), also called chromatic distortion, color aberration, color fringing, or purple fringing, is a failure of a lens to focus all colors to the same point. It is caused by dispersion: the refractive index of the lens elements varies with the wavelength of light. The refractive index of most transparent materials decreases with increasing wavelength. Since the focal length of a lens depends on the refractive index, this variation in refractive index affects focusing. Since the focal length of the lens varies with the color of the light different colors of light are brought to focus at different distances from the lens or with different levels of magnification. Chromatic aberration manifests itself as "fringes" of color along boundaries that separate dark and bright parts of the image.

## Types

There are two types of chromatic aberration: axial (longitudinal), and transverse (lateral). Axial aberration occurs when different wavelengths of light are focused at different distances from the lens (focus shift). Longitudinal aberration is typical at long focal lengths. Transverse aberration occurs when different wavelengths are focused at different positions in the focal plane, because the magnification and/or distortion of the lens also varies with wavelength. Transverse aberration is typical at short focal lengths. The ambiguous acronym LCA is sometimes used for either longitudinal or lateral chromatic aberration.
The two types of chromatic aberration have different characteristics, and may occur together. Axial CA occurs throughout the image and is specified by optical engineers, optometrists, and vision scientists in diopters. It can be reduced by stopping down, which increases depth of field so that though the different wavelengths focus at different distances, they are still in acceptable focus. Transverse CA does not occur on the optical axis of an optical system (which is typically the center of the image) and increases away from the optical axis. It is not affected by stopping down since it is caused by the different magnification of the lens with each color of light.
In digital sensors, axial CA results in the red and blue planes being defocused (assuming that the green plane is in focus), which is relatively difficult to remedy in post-processing, while transverse CA results in the red, green, and blue planes being at different magnifications (magnification changing along radii, as in geometric distortion), and can be corrected by radially scaling the planes appropriately so they line up.

## Minimization

In the earliest uses of lenses, chromatic aberration was reduced by increasing the focal length of the lens where possible. For example, this could result in extremely long telescopes such as the very long aerial telescopes of the 17th century. Isaac Newton's theories about white light being composed of a spectrum of colors led him to the conclusion that uneven refraction of light caused chromatic aberration (leading him to build the first reflecting telescope, his Newtonian telescope, in 1668.)
Modern telescopes, as well as other catoptric and catadioptric systems, continue to use mirrors, which have no chromatic aberration.
There exists a point called the circle of least confusion, where chromatic aberration can be minimized. It can be further minimized by using an achromatic lens or achromat, in which materials with differing dispersion are assembled together to form a compound lens. The most common type is an achromatic doublet, with elements made of crown and flint glass. This perfectly corrects the aberration at two wavelengths and reduces the amount of chromatic aberration over a range of nearby wavelengths. By combining more than two lenses of different composition, the degree of correction can be further increased, as seen in an apochromatic lens or apochromat, which provides perfect correction at three wavelengths. In general, correcting at three wavelengths will make the error on other wavelengths quite small, but an achromat made with low dispersion glass may still provide better correction than an apochromat made with more conventional glass.
Many types of glass have been developed to reduce chromatic aberration. These are low dispersion glass, most notably, glasses containing fluorite. These hybridized glasses have a very low level of optical dispersion; only two compiled lenses made of these substances can yield a high level of correction.
The use of achromats was an important step in the development of optical microscopes and telescopes.
An alternative to achromatic doublets is the use of diffractive optical elements. Diffractive optical elements are able to generate arbitrary complex wave fronts from a sample of optical material which is essentially flat. Diffractive optical elements have negative dispersion characteristics, complementary to the positive Abbe numbers of optical glasses and plastics. Specifically, in the visible part of the spectrum diffractives have a negative Abbe number of −3.5. Diffractive optical elements can be fabricated using diamond turning techniques.
Telephoto lenses using diffractive elements to minimize chromatic aberration are commercially available from Canon and Nikon for interchangeable-lens cameras; these include 800mm f/6.3, 500mm f/5.6, and 300mm f/4 models by Nikon (branded as "phase fresnel" or PF), and 800mm f/11, 600mm f/11, and 400mm f/4 models by Canon (branded as "diffractive optics" or DO). They produce sharp images with reduced chromatic aberration at a lower weight and size than traditional optics of similar specifications and are generally well-regarded by wildlife photographers.

### Mathematics of chromatic aberration minimization

For a doublet consisting of two thin lenses in contact, the Abbe number of the lens materials is used to calculate the correct focal length of the lenses to ensure correction of chromatic aberration. If the focal lengths of the two lenses for light at the yellow Fraunhofer D-line (589.2 nm) are f$_1$ and f$_2$, then best correction occurs for the condition:
    $f_{1}\cdot V_{1}+f_{2}\cdot V_{2}=0$
where V$_1$ and V$_2$ are the Abbe numbers of the materials of the first and second lenses, respectively. Since Abbe numbers are positive, one of the focal lengths must be negative, i.e., a diverging lens, for the condition to be met.
The overall focal length of the doublet f is given by the standard formula for thin lenses in contact:
    ${\frac {1}{f}}={\frac {1}{f_{1}}}+{\frac {1}{f_{2}}}$
and the above condition ensures this will be the focal length of the doublet for light at the blue and red Fraunhofer F and C lines (486.1 nm and 656.3 nm respectively). The focal length for light at other visible wavelengths will be similar but not exactly equal to this.
Chromatic aberration is used during a duochrome eye test to ensure that a correct lens power has been selected. The patient is confronted with red and green images and asked which is sharper. If the prescription is right, then the cornea, lens and prescribed lens will focus the red and green wavelengths just in front, and behind the retina, appearing of equal sharpness. If the lens is too powerful or weak, then one will focus on the retina, and the other will be much more blurred in comparison.

## Image processing to reduce the appearance of lateral chromatic aberration

In some circumstances, it is possible to correct some of the effects of chromatic aberration in digital post-processing. However, in real-world circumstances, chromatic aberration results in permanent loss of some image detail. Detailed knowledge of the optical system used to produce the image can allow for some useful correction. In an ideal situation, post-processing to remove or correct lateral chromatic aberration would involve scaling the fringed color channels, or subtracting some of a scaled versions of the fringed channels, so that all channels spatially overlap each other correctly in the final image.
As chromatic aberration is complex (due to its relationship to focal length, etc.) some camera manufacturers employ lens-specific chromatic aberration appearance minimization techniques. Almost every major camera manufacturer enables some form of chromatic aberration correction, both in-camera and via their proprietary software. Third-party software tools such as PTLens are also capable of performing complex chromatic aberration appearance minimization with their large database of cameras and lens.
In reality, even theoretically perfect post-processing based chromatic aberration reduction-removal-correction systems do not increase image detail as well as a lens that is optically well-corrected for chromatic aberration would for the following reasons:
* Rescaling is only applicable to lateral chromatic aberration but there is also longitudinal chromatic aberration
* Rescaling individual color channels result in a loss of resolution from the original image
* Most camera sensors only capture a few and discrete (e.g., RGB) color channels but chromatic aberration is not discrete and occurs across the light spectrum
* The dyes used in the digital camera sensors for capturing color are not very efficient so cross-channel color contamination is unavoidable and causes, for example, the chromatic aberration in the red channel to also be blended into the green channel along with any green chromatic aberration.
The above are closely related to the specific scene that is captured so no amount of programming and knowledge of the capturing equipment (e.g., camera and lens data) can overcome these limitations.

## Photography

The term "purple fringing" is commonly used in photography, although not all purple fringing can be attributed to chromatic aberration. Similar colored fringing around highlights may also be caused by lens flare. Colored fringing around highlights or dark regions may be due to the receptors for different colors having differing dynamic range or sensitivity – therefore preserving detail in one or two color channels, while "blowing out" or failing to register, in the other channel or channels. On digital cameras, the particular demosaicing algorithm is likely to affect the apparent degree of this problem. Another cause of this fringing is chromatic aberration in the very small microlenses used to collect more light for each CCD pixel; since these lenses are tuned to correctly focus green light, the incorrect focusing of red and blue results in purple fringing around highlights. This is a uniform problem across the frame, and is more of a problem in CCDs with a very small pixel pitch such as those used in compact cameras. Some cameras, such as the Panasonic Lumix series and newer Nikon and Sony DSLRs, feature a processing step specifically designed to remove it.
On photographs taken using a digital camera, very small highlights may frequently appear to have chromatic aberration where in fact the effect is because the highlight image is too small to stimulate all three color pixels, and so is recorded with an incorrect color. This may not occur with all types of digital camera sensor. Again, the de-mosaicing algorithm may affect the apparent degree of the problem.
* Color shifting through corner of eyeglasses
* Severe purple fringing can be seen at the edges of the horse's forelock, mane, and ear.
* This photo taken with the lens aperture wide open resulting in a narrow depth-of-field and strong axial CA. The pendant has purple fringing in the near out-of-focus area and green fringing in the distance. Taken with a Nikon D7000 camera and an AF-S Nikkor 50mm f/1.8G lens.

### Black-and-white photography

Chromatic aberration also affects black-and-white photography. Although there are no colors in the photograph, chromatic aberration will blur the image. It can be reduced by using a narrow-band color filter, or by converting a single color channel to black and white. This will, however, require longer exposure (and change the resulting image). (This is only true with panchromatic black-and-white film, since orthochromatic film is already sensitive to only a limited spectrum.)

## Electron microscopy

Chromatic aberration also affects electron microscopy, although instead of different colors having different focal points, different electron energies may have different focal points.