# Anti-aliasing filter

> Mediated Wiki article. Canonical URL: https://mediated.wiki/source/Anti-aliasing_filter
> Markdown URL: https://mediated.wiki/source/Anti-aliasing_filter.md
> Source: https://en.wikipedia.org/wiki/Anti-aliasing_filter
> Source revision: 1305736640
> License: Creative Commons Attribution-ShareAlike 4.0 International (https://creativecommons.org/licenses/by-sa/4.0/)

An **anti-aliasing filter** (**AAF**) is a [filter](/source/Filter_(signal_processing)) used before a [signal sampler](/source/Sampling_(signal_processing)) to restrict the [bandwidth](/source/Bandwidth_(signal_processing)) of a [signal](/source/Signal) to satisfy the [Nyquist–Shannon sampling theorem](/source/Nyquist%E2%80%93Shannon_sampling_theorem) over the [band of interest](/source/Frequency_band). Since the theorem states that unambiguous reconstruction of the signal from its samples is possible when the [power of frequencies](/source/Spectral_density) above the [Nyquist frequency](/source/Nyquist_frequency) is zero, a [brick wall filter](/source/Brick_wall_filter) is an idealized but impractical AAF.[a] A practical AAF makes a trade off between reduced [bandwidth](/source/Bandwidth_(signal_processing)) and increased [aliasing](/source/Aliasing). A practical anti-aliasing filter will typically permit some aliasing to occur or attenuate or otherwise distort some in-band frequencies close to the Nyquist limit. For this reason, many practical systems sample higher than would be theoretically required by a perfect AAF in order to ensure that all frequencies of interest can be reconstructed, a practice called [oversampling](/source/Oversampling).

## Optical applications

See also: [Spatial anti-aliasing](/source/Spatial_anti-aliasing)

In the case of [optical](/source/Optical) image sampling, as by [image sensors](/source/Image_sensor) in [digital cameras](/source/Digital_camera), the anti-aliasing filter is also known as an **optical low-pass filter** (**OLPF**), **blur filter**, or **AA filter**. The mathematics of sampling in [two spatial dimensions](/source/Plane_(mathematics)) is similar to the mathematics of [time-domain](/source/Time-domain) sampling, but the filter implementation technologies are different.

The typical implementation in [digital cameras](/source/Digital_camera) is two layers of [birefringent](/source/Birefringent) material such as [lithium niobate](/source/Lithium_niobate), which spreads each optical point into a cluster of four points.[1] The choice of spot separation for such a filter involves a tradeoff among sharpness, aliasing, and fill factor (the ratio of the active refracting area of a [microlens array](/source/Microlens_array) to the total contiguous area occupied by the array). In a [monochrome](/source/Monochrome) or [three-CCD](/source/Three-CCD) or [Foveon X3](/source/Foveon_X3) camera, the microlens array alone, if near 100% effective, can provide a significant [anti-aliasing](/source/Anti-aliasing) function,[2] while in color filter array (e.g. [Bayer filter](/source/Bayer_filter)) cameras, an additional filter is generally needed to reduce aliasing to an acceptable level.[3][4][5]

Alternative implementations include the [Pentax K-3](/source/Pentax_K-3)'s anti-aliasing filter, which applies small [vibrations](/source/Vibration) to the sensor element.[6]

## Audio applications

Anti-aliasing filters are used at the input of an [analog-to-digital converter](/source/Analog-to-digital_converter). Similar filters are used as [reconstruction filters](/source/Reconstruction_filter) at the output of a [digital-to-analog converter](/source/Digital-to-analog_converter). In the latter case, the filter prevents imaging, the reverse process of aliasing where in-band frequencies are mirrored out of band.

### Oversampling

Main article: [Oversampling](/source/Oversampling)

With [oversampling](/source/Oversampling), a higher intermediate digital sample rate is used, so that a nearly ideal [digital filter](/source/Digital_filter) can [sharply](/source/Selectivity_(radio)) [cut off](/source/Cutoff_frequency) aliasing near the original low [Nyquist frequency](/source/Nyquist_frequency) and give better [phase response](/source/Phase_response), while a much simpler [analog filter](/source/Analog_filter) can stop frequencies above the new higher Nyquist frequency. Because analog filters have relatively high cost and limited performance, relaxing the demands on the analog filter can greatly reduce both aliasing and cost. Furthermore, because some [noise](/source/Noise_(signal_processing)) is averaged out, the higher sampling rate can moderately improve [signal-to-noise ratio](/source/Signal-to-noise_ratio).

A signal may be intentionally sampled at a higher rate to reduce the requirements and distortion of the anti-alias filter. For example, compare [CD audio](/source/CD_audio) with [high-resolution audio](/source/High-resolution_audio). CD audio filters the signal to a passband edge of 20 kHz, with a stopband Nyquist frequency of 22.05 kHz and sample rate of 44.1 kHz. The narrow 2.05 kHz transition band requires a compromise between filter complexity and performance. High-resolution audio uses a higher sample rate, providing both a higher passband edge and larger transition band, which allows better filter performance with reduced aliasing, reduced attenuation of higher audio frequencies and reduced time and phase domain signal distortion.[7][8][failed verification] [9][10]

### Bandpass signals

See also: [Undersampling](/source/Undersampling)

Often, an anti-aliasing filter is a [low-pass filter](/source/Low-pass_filter); this is not a requirement, however. Generalizations of the Nyquist–Shannon sampling theorem allow sampling of other band-limited [passband](/source/Passband) signals instead of [baseband](/source/Baseband) signals.

For signals that are bandwidth limited, but not centered at zero, a [band-pass filter](/source/Band-pass_filter) can be used as an anti-aliasing filter. For example, this could be done with a [single-sideband modulated](/source/Single-sideband_modulation) or [frequency modulated](/source/Frequency_modulated) signal. If one desired to sample an [FM radio](/source/FM_radio) broadcast centered at 87.9 MHz and bandlimited to a 200 kHz band, then an appropriate anti-alias filter would be centered on 87.9 MHz with 200 kHz bandwidth (or [passband](/source/Passband) of 87.8 MHz to 88.0 MHz), and the sampling rate would be no less than 400 kHz, but should also satisfy other constraints to prevent [aliasing](/source/Aliasing).[specify]

### Signal overload

It is very important to avoid input signal overload when using an anti-aliasing filter. If the signal is strong enough, it can cause [clipping](/source/Clipping_(signal_processing)) at the [analog-to-digital converter](/source/Analog-to-digital_converter), even after filtering. When [distortion](/source/Distortion) due to clipping occurs after the anti-aliasing filter, it can create components outside the [passband](/source/Passband) of the anti-aliasing filter; these components can then alias, causing the reproduction of other non-[harmonically](/source/Harmonic) related frequencies.[11]

## Notes

1. Brick-wall filters that run in realtime are not physically realizable as they have infinite latency and infinite [order](/source/Order_(differential_equation)).

## References

1. Adrian Davies and Phil Fennessy (2001). [*Digital imaging for photographers*](https://books.google.com/books?id=wsxk03-gceUC&q=anti-aliasing+lithium-niobate&pg=PA30). Fourth ed. Focal Press. ISBN 0-240-51590-0.

1. S. B. Campana and D. F. Barbe (1974). "Tradeoffs between aliasing and MTF". *Proceedings of the Electro-Optical Systems Design Conference – 1974 West International Laser Exposition – San Francisco, Calif., November 5-7, 1974*. *Electro-Optical Systems Design Conference - 1974 West International Laser Exposition*. Chicago: Industrial and Scientific Conference Management, Inc. [Bibcode:1974eosd.conf....1C](https://ui.adsabs.harvard.edu/abs/1974eosd.conf....1C)

1. Brian W. Keelan (2004). [*Handbook of Image Quality: Characterization and Prediction*](https://books.google.com/books?id=E45MTZn17gEC&q=spot+separation+in+optical+anti-aliasing+filters&pg=RA1-PA388). Marcel–Dekker. ISBN 0-8247-0770-2.

1. Sidney F. Ray (1999). [*Scientific photography and applied imaging*](https://books.google.com/books?id=AEFPNfghI3QC&q=aliasing+fill-factor&pg=PA61). Focal Press. p. 61. ISBN 978-0-240-51323-2.

1. Michael Goesele (2004). [*New Acquisition Techniques for Real Objects and Light Sources in Computer Graphics*](https://books.google.com/books?id=ZTJJ8QzNv1wC&q=aliasing+fill-factor+100%25+bayer&pg=PA34). Books on Demand. p. 34. ISBN 978-3-8334-1489-3.

1. ["Pentax K-3"](http://www.dpreview.com/products/Pentax/slrs/pentax_k3). Retrieved November 29, 2013.

1. Kester, Walt. ["Oversampling Interpolating DACs"](https://www.analog.com/media/en/training-seminars/tutorials/MT-017.pdf). Analog Devices. Retrieved 17 January 2015.

1. Nauman Uppal (30 August 2004). ["Upsampling vs. Oversampling for Digital Audio"](http://www.audioholics.com/education/audio-formats-technology/upsampling-vs-oversampling-for-digital-audio). *[Audioholics](/source/Audioholics)*. Retrieved 6 October 2012.

1. Story, Mike (September 1997). ["A Suggested Explanation For (Some Of) The Audible Differences Between High Sample Rate And Conventional Sample Rate Audio Material"](http://sdg-master.com:80/lesestoff/aes97ny.pdf). dCS Ltd. [Archived](https://web.archive.org/web/20091128021651/http://sdg-master.com:80/lesestoff/aes97ny.pdf) 28 November 2009 at the Wayback Machine.

1. Lavry, Dan (1997). ["Sampling, Oversampling, Imaging and Aliasing - a basic tutorial"](http://lavryengineering.com/pdfs/lavry-sampling-oversampling-imaging-aliasing.pdf). Lavry Engineering. [Archived](https://web.archive.org/web/20150621202254/http://lavryengineering.com/pdfs/lavry-sampling-oversampling-imaging-aliasing.pdf) 21 June 2015 at the Wayback Machine.

1. ["Level and distortion in digital broadcasting"](https://tech.ebu.ch/docs/techreview/trev_310-lund.pdf), retrieved 2021-05-11

---
Adapted from the Wikipedia article [Anti-aliasing filter](https://en.wikipedia.org/wiki/Anti-aliasing_filter) by Wikipedia contributors ([contributor history](https://en.wikipedia.org/wiki/Anti-aliasing_filter?action=history)). Available under [Creative Commons Attribution-ShareAlike 4.0 International](https://creativecommons.org/licenses/by-sa/4.0/). Changes may have been made.
