Anti-aliasing
Encyclopedia
In digital signal processing
Digital signal processing
Digital signal processing is concerned with the representation of discrete time signals by a sequence of numbers or symbols and the processing of these signals. Digital signal processing and analog signal processing are subfields of signal processing...

, spatial anti-aliasing is the technique of minimizing the distortion artifacts known as aliasing
Aliasing
In signal processing and related disciplines, aliasing refers to an effect that causes different signals to become indistinguishable when sampled...

 when representing a high-resolution image at a lower resolution. Anti-aliasing is used in digital photography
Digital photography
Digital photography is a form of photography that uses an array of light sensitive sensors to capture the image focused by the lens, as opposed to an exposure on light sensitive film...

, computer graphics
Computer graphics
Computer graphics are graphics created using computers and, more generally, the representation and manipulation of image data by a computer with help from specialized software and hardware....

, digital audio
Digital audio
Digital audio is sound reproduction using pulse-code modulation and digital signals. Digital audio systems include analog-to-digital conversion , digital-to-analog conversion , digital storage, processing and transmission components...

, and many other applications.

Anti-aliasing means removing signal components that have a higher frequency
Frequency
Frequency is the number of occurrences of a repeating event per unit time. It is also referred to as temporal frequency.The period is the duration of one cycle in a repeating event, so the period is the reciprocal of the frequency...

 than is able to be properly resolved by the recording (or sampling) device. This removal is done before (re)sampling at a lower resolution. When sampling is performed without removing this part of the signal, it causes undesirable artifacts such as the black-and-white noise near the top of figure 1-a below.

In signal acquisition and audio, anti-aliasing is often done using an analog anti-aliasing filter
Anti-aliasing filter
An anti-aliasing filter is a filter used before a signal sampler, to restrict the bandwidth of a signal to approximately satisfy the sampling theorem....

 to remove the out-of-band component of the input signal prior to sampling with an analog-to-digital converter
Analog-to-digital converter
An analog-to-digital converter is a device that converts a continuous quantity to a discrete time digital representation. An ADC may also provide an isolated measurement...

. In digital photography
Digital photography
Digital photography is a form of photography that uses an array of light sensitive sensors to capture the image focused by the lens, as opposed to an exposure on light sensitive film...

, optical anti-aliasing filter
Anti-aliasing filter
An anti-aliasing filter is a filter used before a signal sampler, to restrict the bandwidth of a signal to approximately satisfy the sampling theorem....

s are made of birefringent materials, and smooth the signal in the spatial optical domain. The anti-aliasing filter essentially blurs the image slightly in order to reduce resolution to below the limit of the digital sensor (the larger the pixel pitch, the lower the achievable resolution at the sensor level).

See the articles on signal processing and aliasing
Aliasing
In signal processing and related disciplines, aliasing refers to an effect that causes different signals to become indistinguishable when sampled...

 for more information about the theoretical justifications for anti-aliasing.

Examples

(a)
(b)
(c)
Figure 1

In computer graphics, anti aliasing improves the appearance of polygon edges, so they are not "jagged", but smoothed out on the screen. However, it incurs a performance cost for the graphics card and uses more video memory. The level of anti-aliasing determines how smooth polygon edges are (and how much video memory it consumes).

Figure 1-a illustrates the visual distortion that occurs when anti-aliasing is not used. Notice that near the top of the image, where the checkerboard is very distant, the image is difficult to recognize and is not aesthetically appealing. In contrast, Figure 1-b shows an anti-aliased version of the scene. The checkerboard near the top blends into gray, which is usually the desired effect when the resolution
Image resolution
Image resolution is an umbrella term that describes the detail an image holds. The term applies to raster digital images, film images, and other types of images. Higher resolution means more image detail....

 is insufficient to show the detail. Even near the bottom of the image, the edges appear much smoother in the anti-aliased image. Figure 1-c shows another anti-aliasing algorithm
Algorithm
In mathematics and computer science, an algorithm is an effective method expressed as a finite list of well-defined instructions for calculating a function. Algorithms are used for calculation, data processing, and automated reasoning...

, based on the sinc filter
Sinc filter
In signal processing, a sinc filter is an idealized filter that removes all frequency components above a given bandwidth, leaves the low frequencies alone, and has linear phase...

, which is considered better than the algorithm used in 1-b.

Figure 2 shows magnified portions (interpolated with nearest neighbor algorithm) of Figure 1-a (left) and 1-c (right) for comparison. In Figure 1-c, anti-aliasing has interpolated the brightness of the pixels at the boundaries to produce gray pixel
Pixel
In digital imaging, a pixel, or pel, is a single point in a raster image, or the smallest addressable screen element in a display device; it is the smallest unit of picture that can be represented or controlled....

s since the space is occupied by both black and white tiles. These help make Figure 1-c appear much smoother than Figure 1-a at original magnification.

In Figure 3, anti-aliasing was used to blend the boundary pixels of a sample graphic. This reduced the aesthetically jarring effect of the sharp, step-like boundaries that appear in the aliased graphic at the left. Anti-aliasing is often applied in rendering text on a computer screen to suggest smooth contours that better emulate the appearance of text produced by conventional ink-and-paper printing.

Particularly with fonts
Computer font
A computer font is an electronic data file containing a set of glyphs, characters, or symbols such as dingbats. Although the term font first referred to a set of metal type sorts in one style and size, since the 1990s it is generally used to refer to a scalable set of digital shapes that may be...

 displayed on typical LCD screens, it is common to use subpixel rendering
Subpixel rendering
Subpixel rendering is a way to increase the apparent resolution of a computer's liquid crystal display or Organic Light Emitting Diode display by rendering pixels to take into account the screen type's physical properties...

 techniques like ClearType
ClearType
ClearType is a trademark for Microsoft's implementation of subpixel rendering technology. ClearType attempts to improve the appearance of text on certain types of computer display screens by sacrificing color fidelity for additional intensity variation. This trade-off is asserted to work well on...

. Subpixel rendering requires special color-balanced anti-aliasing filters to turn what would be severe color distortion into barely-noticeable color fringes. Equivalent results can be had by making individual subpixels addressable as if they were full pixels, and supplying a hardware-based anti-aliasing filter as is done in the OLPC XO-1
OLPC XO-1
The XO-1, previously known as the $100 Laptop, Children's Machine, and 2B1, is an inexpensive subnotebook computer intended to be distributed to children in developing countries around the world, to provide them with access to knowledge, and opportunities to "explore, experiment and express...

 laptop's display controller. Pixel geometry
Pixel geometry
The components of the pixels in an image sensor or display can be ordered in different patterns, called pixel geometry....

 affects all of this, no matter if the anti-aliasing and subpixel addressing are done in software or hardware.
In digital signal processing
Digital signal processing
Digital signal processing is concerned with the representation of discrete time signals by a sequence of numbers or symbols and the processing of these signals. Digital signal processing and analog signal processing are subfields of signal processing...

, spatial anti-aliasing is the technique of minimizing the distortion artifacts known as aliasing
Aliasing
In signal processing and related disciplines, aliasing refers to an effect that causes different signals to become indistinguishable when sampled...

 when representing a high-resolution image at a lower resolution. Anti-aliasing is used in digital photography
Digital photography
Digital photography is a form of photography that uses an array of light sensitive sensors to capture the image focused by the lens, as opposed to an exposure on light sensitive film...

, computer graphics
Computer graphics
Computer graphics are graphics created using computers and, more generally, the representation and manipulation of image data by a computer with help from specialized software and hardware....

, digital audio
Digital audio
Digital audio is sound reproduction using pulse-code modulation and digital signals. Digital audio systems include analog-to-digital conversion , digital-to-analog conversion , digital storage, processing and transmission components...

, and many other applications.

Anti-aliasing means removing signal components that have a higher frequency
Frequency
Frequency is the number of occurrences of a repeating event per unit time. It is also referred to as temporal frequency.The period is the duration of one cycle in a repeating event, so the period is the reciprocal of the frequency...

 than is able to be properly resolved by the recording (or sampling) device. This removal is done before (re)sampling at a lower resolution. When sampling is performed without removing this part of the signal, it causes undesirable artifacts such as the black-and-white noise near the top of figure 1-a below.

In signal acquisition and audio, anti-aliasing is often done using an analog anti-aliasing filter
Anti-aliasing filter
An anti-aliasing filter is a filter used before a signal sampler, to restrict the bandwidth of a signal to approximately satisfy the sampling theorem....

 to remove the out-of-band component of the input signal prior to sampling with an analog-to-digital converter
Analog-to-digital converter
An analog-to-digital converter is a device that converts a continuous quantity to a discrete time digital representation. An ADC may also provide an isolated measurement...

. In digital photography
Digital photography
Digital photography is a form of photography that uses an array of light sensitive sensors to capture the image focused by the lens, as opposed to an exposure on light sensitive film...

, optical anti-aliasing filter
Anti-aliasing filter
An anti-aliasing filter is a filter used before a signal sampler, to restrict the bandwidth of a signal to approximately satisfy the sampling theorem....

s are made of birefringent materials, and smooth the signal in the spatial optical domain. The anti-aliasing filter essentially blurs the image slightly in order to reduce resolution to below the limit of the digital sensor (the larger the pixel pitch, the lower the achievable resolution at the sensor level).

See the articles on signal processing and aliasing
Aliasing
In signal processing and related disciplines, aliasing refers to an effect that causes different signals to become indistinguishable when sampled...

 for more information about the theoretical justifications for anti-aliasing.

Examples

(a)
(b)
(c)
Figure 1

In computer graphics, anti aliasing improves the appearance of polygon edges, so they are not "jagged", but smoothed out on the screen. However, it incurs a performance cost for the graphics card and uses more video memory. The level of anti-aliasing determines how smooth polygon edges are (and how much video memory it consumes).

Figure 1-a illustrates the visual distortion that occurs when anti-aliasing is not used. Notice that near the top of the image, where the checkerboard is very distant, the image is difficult to recognize and is not aesthetically appealing. In contrast, Figure 1-b shows an anti-aliased version of the scene. The checkerboard near the top blends into gray, which is usually the desired effect when the resolution
Image resolution
Image resolution is an umbrella term that describes the detail an image holds. The term applies to raster digital images, film images, and other types of images. Higher resolution means more image detail....

 is insufficient to show the detail. Even near the bottom of the image, the edges appear much smoother in the anti-aliased image. Figure 1-c shows another anti-aliasing algorithm
Algorithm
In mathematics and computer science, an algorithm is an effective method expressed as a finite list of well-defined instructions for calculating a function. Algorithms are used for calculation, data processing, and automated reasoning...

, based on the sinc filter
Sinc filter
In signal processing, a sinc filter is an idealized filter that removes all frequency components above a given bandwidth, leaves the low frequencies alone, and has linear phase...

, which is considered better than the algorithm used in 1-b.

Figure 2 shows magnified portions (interpolated with nearest neighbor algorithm) of Figure 1-a (left) and 1-c (right) for comparison. In Figure 1-c, anti-aliasing has interpolated the brightness of the pixels at the boundaries to produce gray pixel
Pixel
In digital imaging, a pixel, or pel, is a single point in a raster image, or the smallest addressable screen element in a display device; it is the smallest unit of picture that can be represented or controlled....

s since the space is occupied by both black and white tiles. These help make Figure 1-c appear much smoother than Figure 1-a at original magnification.

In Figure 3, anti-aliasing was used to blend the boundary pixels of a sample graphic. This reduced the aesthetically jarring effect of the sharp, step-like boundaries that appear in the aliased graphic at the left. Anti-aliasing is often applied in rendering text on a computer screen to suggest smooth contours that better emulate the appearance of text produced by conventional ink-and-paper printing.

Particularly with fonts
Computer font
A computer font is an electronic data file containing a set of glyphs, characters, or symbols such as dingbats. Although the term font first referred to a set of metal type sorts in one style and size, since the 1990s it is generally used to refer to a scalable set of digital shapes that may be...

 displayed on typical LCD screens, it is common to use subpixel rendering
Subpixel rendering
Subpixel rendering is a way to increase the apparent resolution of a computer's liquid crystal display or Organic Light Emitting Diode display by rendering pixels to take into account the screen type's physical properties...

 techniques like ClearType
ClearType
ClearType is a trademark for Microsoft's implementation of subpixel rendering technology. ClearType attempts to improve the appearance of text on certain types of computer display screens by sacrificing color fidelity for additional intensity variation. This trade-off is asserted to work well on...

. Subpixel rendering requires special color-balanced anti-aliasing filters to turn what would be severe color distortion into barely-noticeable color fringes. Equivalent results can be had by making individual subpixels addressable as if they were full pixels, and supplying a hardware-based anti-aliasing filter as is done in the OLPC XO-1
OLPC XO-1
The XO-1, previously known as the $100 Laptop, Children's Machine, and 2B1, is an inexpensive subnotebook computer intended to be distributed to children in developing countries around the world, to provide them with access to knowledge, and opportunities to "explore, experiment and express...

 laptop's display controller. Pixel geometry
Pixel geometry
The components of the pixels in an image sensor or display can be ordered in different patterns, called pixel geometry....

 affects all of this, no matter if the anti-aliasing and subpixel addressing are done in software or hardware.
In digital signal processing
Digital signal processing
Digital signal processing is concerned with the representation of discrete time signals by a sequence of numbers or symbols and the processing of these signals. Digital signal processing and analog signal processing are subfields of signal processing...

, spatial anti-aliasing is the technique of minimizing the distortion artifacts known as aliasing
Aliasing
In signal processing and related disciplines, aliasing refers to an effect that causes different signals to become indistinguishable when sampled...

 when representing a high-resolution image at a lower resolution. Anti-aliasing is used in digital photography
Digital photography
Digital photography is a form of photography that uses an array of light sensitive sensors to capture the image focused by the lens, as opposed to an exposure on light sensitive film...

, computer graphics
Computer graphics
Computer graphics are graphics created using computers and, more generally, the representation and manipulation of image data by a computer with help from specialized software and hardware....

, digital audio
Digital audio
Digital audio is sound reproduction using pulse-code modulation and digital signals. Digital audio systems include analog-to-digital conversion , digital-to-analog conversion , digital storage, processing and transmission components...

, and many other applications.

Anti-aliasing means removing signal components that have a higher frequency
Frequency
Frequency is the number of occurrences of a repeating event per unit time. It is also referred to as temporal frequency.The period is the duration of one cycle in a repeating event, so the period is the reciprocal of the frequency...

 than is able to be properly resolved by the recording (or sampling) device. This removal is done before (re)sampling at a lower resolution. When sampling is performed without removing this part of the signal, it causes undesirable artifacts such as the black-and-white noise near the top of figure 1-a below.

In signal acquisition and audio, anti-aliasing is often done using an analog anti-aliasing filter
Anti-aliasing filter
An anti-aliasing filter is a filter used before a signal sampler, to restrict the bandwidth of a signal to approximately satisfy the sampling theorem....

 to remove the out-of-band component of the input signal prior to sampling with an analog-to-digital converter
Analog-to-digital converter
An analog-to-digital converter is a device that converts a continuous quantity to a discrete time digital representation. An ADC may also provide an isolated measurement...

. In digital photography
Digital photography
Digital photography is a form of photography that uses an array of light sensitive sensors to capture the image focused by the lens, as opposed to an exposure on light sensitive film...

, optical anti-aliasing filter
Anti-aliasing filter
An anti-aliasing filter is a filter used before a signal sampler, to restrict the bandwidth of a signal to approximately satisfy the sampling theorem....

s are made of birefringent materials, and smooth the signal in the spatial optical domain. The anti-aliasing filter essentially blurs the image slightly in order to reduce resolution to below the limit of the digital sensor (the larger the pixel pitch, the lower the achievable resolution at the sensor level).

See the articles on signal processing and aliasing
Aliasing
In signal processing and related disciplines, aliasing refers to an effect that causes different signals to become indistinguishable when sampled...

 for more information about the theoretical justifications for anti-aliasing.

Examples

(a)
(b)
(c)
Figure 1

In computer graphics, anti aliasing improves the appearance of polygon edges, so they are not "jagged", but smoothed out on the screen. However, it incurs a performance cost for the graphics card and uses more video memory. The level of anti-aliasing determines how smooth polygon edges are (and how much video memory it consumes).

Figure 1-a illustrates the visual distortion that occurs when anti-aliasing is not used. Notice that near the top of the image, where the checkerboard is very distant, the image is difficult to recognize and is not aesthetically appealing. In contrast, Figure 1-b shows an anti-aliased version of the scene. The checkerboard near the top blends into gray, which is usually the desired effect when the resolution
Image resolution
Image resolution is an umbrella term that describes the detail an image holds. The term applies to raster digital images, film images, and other types of images. Higher resolution means more image detail....

 is insufficient to show the detail. Even near the bottom of the image, the edges appear much smoother in the anti-aliased image. Figure 1-c shows another anti-aliasing algorithm
Algorithm
In mathematics and computer science, an algorithm is an effective method expressed as a finite list of well-defined instructions for calculating a function. Algorithms are used for calculation, data processing, and automated reasoning...

, based on the sinc filter
Sinc filter
In signal processing, a sinc filter is an idealized filter that removes all frequency components above a given bandwidth, leaves the low frequencies alone, and has linear phase...

, which is considered better than the algorithm used in 1-b.

Figure 2 shows magnified portions (interpolated with nearest neighbor algorithm) of Figure 1-a (left) and 1-c (right) for comparison. In Figure 1-c, anti-aliasing has interpolated the brightness of the pixels at the boundaries to produce gray pixel
Pixel
In digital imaging, a pixel, or pel, is a single point in a raster image, or the smallest addressable screen element in a display device; it is the smallest unit of picture that can be represented or controlled....

s since the space is occupied by both black and white tiles. These help make Figure 1-c appear much smoother than Figure 1-a at original magnification.

In Figure 3, anti-aliasing was used to blend the boundary pixels of a sample graphic. This reduced the aesthetically jarring effect of the sharp, step-like boundaries that appear in the aliased graphic at the left. Anti-aliasing is often applied in rendering text on a computer screen to suggest smooth contours that better emulate the appearance of text produced by conventional ink-and-paper printing.

Particularly with fonts
Computer font
A computer font is an electronic data file containing a set of glyphs, characters, or symbols such as dingbats. Although the term font first referred to a set of metal type sorts in one style and size, since the 1990s it is generally used to refer to a scalable set of digital shapes that may be...

 displayed on typical LCD screens, it is common to use subpixel rendering
Subpixel rendering
Subpixel rendering is a way to increase the apparent resolution of a computer's liquid crystal display or Organic Light Emitting Diode display by rendering pixels to take into account the screen type's physical properties...

 techniques like ClearType
ClearType
ClearType is a trademark for Microsoft's implementation of subpixel rendering technology. ClearType attempts to improve the appearance of text on certain types of computer display screens by sacrificing color fidelity for additional intensity variation. This trade-off is asserted to work well on...

. Subpixel rendering requires special color-balanced anti-aliasing filters to turn what would be severe color distortion into barely-noticeable color fringes. Equivalent results can be had by making individual subpixels addressable as if they were full pixels, and supplying a hardware-based anti-aliasing filter as is done in the OLPC XO-1
OLPC XO-1
The XO-1, previously known as the $100 Laptop, Children's Machine, and 2B1, is an inexpensive subnotebook computer intended to be distributed to children in developing countries around the world, to provide them with access to knowledge, and opportunities to "explore, experiment and express...

 laptop's display controller. Pixel geometry
Pixel geometry
The components of the pixels in an image sensor or display can be ordered in different patterns, called pixel geometry....

 affects all of this, no matter if the anti-aliasing and subpixel addressing are done in software or hardware.
div class="thumb">
Above left: an aliased version of a simple shape. Above right: an anti-aliased version of the same shape. Right: The anti-aliased graphic at 5x magnification.
div style="font-size: 94%; padding: .3em 0 .1em 0;">Figure 3


Signal processing approach to anti-aliasing

In this approach, the ideal image is regarded as a signal. The image displayed on the screen is taken as samples, at each (x,y) pixel position, of a filtered version of the signal. Ideally, we would understand how the human brain would process the original signal, and provide an image on screen that will yield the most similar response by the brain.

The most widely accepted analytic tool for such problems is the Fourier transform
Fourier transform
In mathematics, Fourier analysis is a subject area which grew from the study of Fourier series. The subject began with the study of the way general functions may be represented by sums of simpler trigonometric functions...

. The Fourier transform decomposes a signal into basis function
Basis function
In mathematics, a basis function is an element of a particular basis for a function space. Every continuous function in the function space can be represented as a linear combination of basis functions, just as every vector in a vector space can be represented as a linear combination of basis...

s of different frequencies, known as frequency components, and gives us the amplitude
Amplitude
Amplitude is the magnitude of change in the oscillating variable with each oscillation within an oscillating system. For example, sound waves in air are oscillations in atmospheric pressure and their amplitudes are proportional to the change in pressure during one oscillation...

 of each frequency component in the signal. The waves are of the form:


where j and k are arbitrary non-negative integers. There are also frequency components involving the sine
Sine
In mathematics, the sine function is a function of an angle. In a right triangle, sine gives the ratio of the length of the side opposite to an angle to the length of the hypotenuse.Sine is usually listed first amongst the trigonometric functions....

 functions in one or both dimensions, but for the purpose of this discussion, the cosine will suffice; see Fourier transform
Fourier transform
In mathematics, Fourier analysis is a subject area which grew from the study of Fourier series. The subject began with the study of the way general functions may be represented by sums of simpler trigonometric functions...

 for technical details.

The numbers j and k together are the frequency of the component: j is the frequency in the x direction, and k is the frequency in the y direction.

The goal of an anti-aliasing filter is to greatly reduce frequencies above a certain limit, known as the Nyquist frequency
Nyquist frequency
The Nyquist frequency, named after the Swedish-American engineer Harry Nyquist or the Nyquist–Shannon sampling theorem, is half the sampling frequency of a discrete signal processing system...

, so that the signal will be accurately represented by its samples, or nearly so, in accordance with the sampling theorem; there are many different choices of detailed algorithm, with different filter transfer function
Transfer function
A transfer function is a mathematical representation, in terms of spatial or temporal frequency, of the relation between the input and output of a linear time-invariant system. With optical imaging devices, for example, it is the Fourier transform of the point spread function i.e...

s. Our knowledge of human visual perception is not sufficient, in general, to say what approach will look best.

Two dimensional considerations

The above assumes that the rectangular mesh sampling is the dominant part of the problem.
It should seem odd that the filter usually considered optimal is not rotationally symmetrical, as shown in this first figure. This is due to the fact that we are dealing with data sampled on a square lattice
Square lattice
In mathematics, the square lattice is a type of lattice in a two-dimensional Euclidean space. It is the two-dimensional version of the integer lattice. It is one of the five types of two-dimensional lattices as classified by their symmetry groups; its symmetry group is known symbolically as p4m.Two...

 and not with a continuous image. This must be the justification for doing signal processing, along each axis, as it is traditionally done on one dimensional data. Lanczos resampling
Lanczos resampling
Lanczos resampling is an interpolation method used to compute new values for sampled data. It is often used in multivariate interpolation, for example for image scaling , but can be used for any other digital signal...

 is based on convolution of the data with a discrete representation of the sinc function.

If the resolution is not limited by the rectangular sampling rate of either the source or the target image, then one should ideally use rotationally symmetrical filter or interpolation functions, as though the data were a two dimensional function of continuous x and y. The sinc function of the radius, in the second figure, has too long a tail to make a good filter (it is not even square-integrable). A more appropriate analog to the one-dimensional sinc is the two-dimensional Airy disc
Airy disc
In optics, the Airy disk and Airy pattern are descriptions of the best focused spot of light that a perfect lens with a circular aperture can make, limited by the diffraction of light....

 amplitude, the 2D Fourier transform of a circular region in 2D frequency space, as opposed to a square region.

One might consider a Gaussian plus enough of its second derivative to flatten the top (in the frequency domain) or sharpen it up (in the spatial domain). This function is shown also. Functions based on the Gaussian function are natural choices, because convolution with a Gaussian gives another Gaussian, whether applied to x and y or to the radius. Similar to wavelets, another of its properties is that it is half way between being localized in the configuration (x and y) and in the spectral (j and k) representation. As an interpolation function, a Gaussian alone seems too spread out to preserve the maximum possible detail, which is why the second derivative is added.

As an example, when printing a photographic negative, with plentiful processing capability, on a printer with a hexagonal pattern, there is no reason to use sinc function interpolation. This would treat diagonal lines differently from horizontal and vertical lines, which is like a weak form of aliasing.

Practical real-time anti-aliasing approximations

There are only a handful of primitives
Primitive type
In computer science, primitive data type is either of the following:* a basic type is a data type provided by a programming language as a basic building block...

 used at the lowest level in a real-time rendering
Rendering (computer graphics)
Rendering is the process of generating an image from a model , by means of computer programs. A scene file contains objects in a strictly defined language or data structure; it would contain geometry, viewpoint, texture, lighting, and shading information as a description of the virtual scene...

 engine (either software or hardware accelerated.) These include "points", "lines" and "triangles". If one is to draw such a primitive in white against a black background, it is possible to design such a primitive to have fuzzy edges, achieving some sort of anti-aliasing. However, this approach has difficulty dealing with adjacent primitives (such as triangles that share an edge.)

To approximate the uniform averaging algorithm, one may use an extra buffer for sub-pixel data. The initial, and least memory-hungry approach, used 16 extra bits per pixel, in a 4×4 grid. If one renders the primitives in a careful order, for instance front-to-back, it is possible to create a reasonable image.

Since this requires that the primitives be in some order, and hence interacts poorly with an application programming interface such as OpenGL
OpenGL
OpenGL is a standard specification defining a cross-language, cross-platform API for writing applications that produce 2D and 3D computer graphics. The interface consists of over 250 different function calls which can be used to draw complex three-dimensional scenes from simple primitives. OpenGL...

, the latest attempts simply have two or more full sub-pixels per pixel, including full color information for each sub-pixel. Some information may be shared between the sub-pixels (such as the Z-buffer.)

Mipmapping

There is also an approach specialized for texture mapping
Texture mapping
Texture mapping is a method for adding detail, surface texture , or color to a computer-generated graphic or 3D model. Its application to 3D graphics was pioneered by Dr Edwin Catmull in his Ph.D. thesis of 1974.-Texture mapping:...

 called mipmap
Mipmap
In 3D computer graphics texture filtering, MIP maps are pre-calculated, optimized collections of images that accompany a main texture, intended to increase rendering speed and reduce aliasing artifacts. They are widely used in 3D computer games, flight simulators and other 3D imaging systems. The...

ping, which works by creating lower resolution, prefiltered versions of the texture map. When rendering the image, the appropriate resolution mip-map is chosen and hence the texture pixels (texels) are already filtered when they arrive on the screen. Mipmapping is generally combined with various forms of texture filtering
Texture filtering
In computer graphics, texture filtering or texture smoothing is the method used to determine the texture color for a texture mapped pixel, using the colors of nearby texels . Mathematically, texture filtering is a type of anti-aliasing, but it filters out high frequencies from the texture fill...

 in order to improve the final result.

An example of an image with extreme pseudo-random aliasing

Because fractals have unlimited detail and no noise other than arithmetic roundoff error, they illustrate aliasing more clearly than do photographs or other measured data. The dwells, which are converted to colors at the exact centers of the pixels, go to infinity at the border of the set, so colors from centers near borders are unpredictable, due to aliasing. This example has edge in about half of its pixels, so it shows much aliasing. The first image is uploaded at its original sampling rate. Since most modern software anti-aliases, one may have to download the full size version to see all of the aliasing.
The second image is calculated at five times the sampling rate and down-sampled
Downsampling
In signal processing, downsampling is the process of reducing the sampling rate of a signal. This is usually done to reduce the data rate or the size of the data....

 with anti-aliasing. Assuming that we would really like something like the average color over each pixel, this one is getting closer. It is clearly more orderly than the first.

In order to properly compare these images, click to view them in their original sizes.
It happens that, in this case, there is additional information that can be used. By re-calculating with the distance estimator, points were identified that are very close to the edge of the set, so that unusually fine detail is aliased in from the rapidly changing dwell values near the edge of the set. The colors derived from these calculated points have been identified as unusually unrepresentative of their pixels. Those points were replaced, in the third image, by interpolating the points around them. This reduces the noisiness of the image but has the side effect of brightening the colors. So this image is not exactly the same that would be obtained with an even larger set of calculated points.

To show what was discarded, the rejected points, bled into a grey background, are shown in the fourth image.

Finally, "Budding Turbines" is so regular that systematic (Moiré) aliasing can clearly be seen near the main "turbine axis" when it is downsized by taking the nearest pixel. The aliasing in the first image appears random because it comes from all levels of detail, below the pixel size. When the lower level aliasing is suppressed, to make the third image and then that is down-sampled once more, without anti-aliasing, to make the fifth image, the order on the scale of the third image appears as systematic aliasing in the fifth image.

The best anti-aliasing and down-sampling method here depends on one's point of view. When fitting the most data into a limited array of pixels, as in the fifth image, sinc function anti-aliasing would seem appropriate. In obtaining the second and third images, the main objective is to filter out aliasing "noise", so a rotationally symmetrical function may be more appropriate.

Pure down-sampling of an image has the following effect: (Click on each picture to see it at full scale)

Super sampling / full-scene anti-aliasing

Super sampling anti-aliasing (SSAA), also called full-scene anti-aliasing (FSAA), is used to avoid aliasing
Aliasing
In signal processing and related disciplines, aliasing refers to an effect that causes different signals to become indistinguishable when sampled...

 (or "jaggies
Jaggies
"Jaggies" is the informal name for artifacts in raster images, most frequently from aliasing, which in turn is often caused by non-linear mixing effects producing high-frequency components and/or missing or poor anti-aliasing filtering prior to sampling....

") on full-screen images. SSAA was available with early video cards, up until DirectX
DirectX
Microsoft DirectX is a collection of application programming interfaces for handling tasks related to multimedia, especially game programming and video, on Microsoft platforms. Originally, the names of these APIs all began with Direct, such as Direct3D, DirectDraw, DirectMusic, DirectPlay,...

 7. Beginning with DirectX 8 it has been discontinued by all manufacturers of GPUs due to its tremendous computational cost, and replaced with multisample anti-aliasing
Multisample Anti-Aliasing
Multisample anti-aliasing is a type of anti-aliasing, a technique used in computer graphics to improve image quality.- Definition :The term generally refers to a special case of supersampling. Initial implementations of full-scene anti-aliasing worked conceptually by simply rendering a scene at a...

 (MSAA), which has also since been replaced with other techniques such as CSAA + TrAA/AAA. MSAA provides somewhat lower graphic quality, but also tremendous savings in computational power. Because SSAA provides the highest quality image, it has been recently reintroduced by AMD/ATi and nVidia. The ATi Radeon HD 5000 and onwards included it as a feature (but it was limited to DirectX 9 games only). It was released for all DirectX 9 through 11 games with NVIDIA's drivers.

The resulting image of SSAA may seem softer, and should also appear more realistic. However, while useful for photo-like images, a simple anti-aliasing approach (such as supersampling and then averaging) may actually worsen the appearance of some types of line art or diagrams (making the image appear fuzzy), especially where most lines are horizontal or vertical. In these cases, a prior grid-fitting step may be useful (see hinting).

In general, supersampling is a technique of collecting data points at a greater resolution
Image resolution
Image resolution is an umbrella term that describes the detail an image holds. The term applies to raster digital images, film images, and other types of images. Higher resolution means more image detail....

 (usually by a power of two) than the final data resolution. These data points are then combined (down-sampled) to the desired resolution, often just by a simple average
Average
In mathematics, an average, or central tendency of a data set is a measure of the "middle" value of the data set. Average is one form of central tendency. Not all central tendencies should be considered definitions of average....

. The combined data points have less visible aliasing artifacts (or moiré pattern
Moiré pattern
In physics, a moiré pattern is an interference pattern created, for example, when two grids are overlaid at an angle, or when they have slightly different mesh sizes.- Etymology :...

s).

Full-scene anti-aliasing by supersampling usually means that each full frame is rendered
Rendering (computer graphics)
Rendering is the process of generating an image from a model , by means of computer programs. A scene file contains objects in a strictly defined language or data structure; it would contain geometry, viewpoint, texture, lighting, and shading information as a description of the virtual scene...

 at double (2x) or quadruple (4x) the display
Computer display
A monitor or display is an electronic visual display for computers. The monitor comprises the display device, circuitry, and an enclosure...

 resolution, and then down-sampled to match the display resolution. So a 2x FSAA would render 4 supersampled pixels for each single pixel of each frame. While rendering at larger resolutions will produce better results, more processor power is needed which can degrade performance and frame rate.

Sometimes FSAA is implemented in hardware in such a way that a graphical application is unaware the images are being supersampled and then down-sampled before being displayed.

Object-based anti-aliasing

A graphics rendering system creates an image based on objects constructed of polygonal primitives whereby the aliasing effects in the image are reduced by applying an anti-aliasing scheme only to the areas of the image representing silhouette edges of the objects. The silhouette edges are anti-aliased by creating anti-aliasing primitives which vary in opacity. These anti-aliasing primitives are joined to the silhouetted edges
Silhouette edge
In computer graphics, a silhouette edge on a 3D body projected onto a 2D plane is the collection of points whose outwards surface normal is perpendicular to the view vector. Due to discontinuities in the surface normal, a silhouette edge is also an edge which separates a front facing face from a...

, and create a region in the image where the objects appear to blend into the background. The method has some important advantages over the classical methods based on the accumulation buffer since it generates full-scene anti-aliasing in only two passes and does not require the use of the additional memory required by the accumulation buffer. Object-based anti-aliasing was first developed at Silicon Graphics
Silicon Graphics
Silicon Graphics, Inc. was a manufacturer of high-performance computing solutions, including computer hardware and software, founded in 1981 by Jim Clark...

 for their Indy
SGI Indy
The Indy, code-named "Guinness", is a low-end workstation introduced on 12 July 1993. Developed and manufactured by Silicon Graphics Incorporated , it was the result of their attempt to obtain a share of the low-end computer-aided design market, which was dominated at the time by other workstation...

 workstation.

Anti-aliasing and gamma compression

Digital images are usually stored in a gamma-compressed format, but an optical anti-aliasing filter is linear. So to downsample an image in a way that would match optical blurring, one should first convert it to a linear format, then apply the anti-aliasing filter, and finally convert it back to a gamma compressed format. Computing anti-aliasing directly on the gamma-compressed image will lead to bright details (such as cat's whiskers) becoming visually thinner, and dark details (such as tree branches) becoming thicker, relative to the optically anti-aliased image. Almost all image editing software, including Adobe Photoshop
Adobe Photoshop
Adobe Photoshop is a graphics editing program developed and published by Adobe Systems Incorporated.Adobe's 2003 "Creative Suite" rebranding led to Adobe Photoshop 8's renaming to Adobe Photoshop CS. Thus, Adobe Photoshop CS5 is the 12th major release of Adobe Photoshop...

 and GIMP
GIMP
GIMP is a free software raster graphics editor. It is primarily employed as an image retouching and editing tool and is freely available in versions tailored for most popular operating systems including Microsoft Windows, Apple Mac OS X, and Linux.In addition to detailed image retouching and...

, process images in the gamma-compressed domain.

See also

  • Supersampling
    Supersampling
    Supersampling is an antialiasing technique, the process of eliminating jagged and pixelated edges . It is a method of smoothing images rendered in computer games or other programs that generate imagery.-Overview:...

    , a method of antialiasing
  • Statistical sampling
    Sampling (statistics)
    In statistics and survey methodology, sampling is concerned with the selection of a subset of individuals from within a population to estimate characteristics of the whole population....

  • Temporal anti-aliasing
    Temporal anti-aliasing
    Temporal anti-aliasing seeks to reduce or remove the effects of temporal aliasing. Temporal aliasing is caused by the sampling rate of a scene being too low compared to the transformation speed of objects inside of the scene; this causes objects to appear to jump or appear at a location instead of...

  • Anisotropic filtering
    Anisotropic filtering
    In 3D computer graphics, anisotropic filtering is a method of enhancing the image quality of textures on surfaces that are at oblique viewing angles with respect to the camera where the projection of the texture appears to be non-orthogonal In 3D computer graphics, anisotropic filtering...

    , another method for improving image quality by enhancing textures
  • Measure theory
  • Font rasterization
    Font rasterization
    Font rasterization is the process of converting text from a vector description to a raster or bitmap description. This often involves some anti-aliasing on screen text to make it smoother and easier to read...

  • Color theory
    Color theory
    In the visual arts, color theory is a body of practical guidance to color mixing and the visual impacts of specific color combinations. Although color theory principles first appeared in the writings of Leone Battista Alberti and the notebooks of Leonardo da Vinci , a tradition of "colory theory"...

     for certain physical details pertinent to color images

  • Reconstruction filter
    Reconstruction filter
    In a mixed-signal system , a reconstruction filter is used to construct a smooth analogue signal from a digital input, as in the case of a digital to analogue converter or other sampled data output device....

  • Quincunx
    Quincunx
    A quincunx is a geometric pattern consisting of five points arranged in a cross, that is five coplanar points, four of them forming a square or rectangle and a fifth at its center...

     (pattern used for anti-aliasing)
  • Subpixel rendering
    Subpixel rendering
    Subpixel rendering is a way to increase the apparent resolution of a computer's liquid crystal display or Organic Light Emitting Diode display by rendering pixels to take into account the screen type's physical properties...

    , an application of anti-aliasing using the properties of a color LCD screen
  • Xiaolin Wu's line algorithm
    Xiaolin Wu's line algorithm
    Xiaolin Wu's line algorithm is an algorithm for line antialiasing, which was presented in the article An Efficient Antialiasing Technique in the July 1991 issue of Computer Graphics, as well as in the article Fast Antialiasing in the June 1992 issue of Dr. Dobb's Journal.Bresenham's algorithm draws...

     fast real-time anti-aliasing
  • Multisample anti-aliasing
    Multisample Anti-Aliasing
    Multisample anti-aliasing is a type of anti-aliasing, a technique used in computer graphics to improve image quality.- Definition :The term generally refers to a special case of supersampling. Initial implementations of full-scene anti-aliasing worked conceptually by simply rendering a scene at a...

  • Alpha to coverage
    Alpha to coverage
    Alpha to coverage is a multisampling computer graphics technique useful for situations where dense foliage or grass must be rendered in a video game.This technique uses the alpha channel of textures as a coverage mask for anti-aliasing....

  • Jaggies
    Jaggies
    "Jaggies" is the informal name for artifacts in raster images, most frequently from aliasing, which in turn is often caused by non-linear mixing effects producing high-frequency components and/or missing or poor anti-aliasing filtering prior to sampling....

    , the informal name for aliasing artifacts in raster images
  • Saffron Type System
    Saffron Type System
    The Saffron Type System is a system for rendering high-quality scalable type on digital displays. Developed by Mitsubishi Electric Research Laboratories , Saffron is built on a core of adaptively-sampled distance field technology...

    , an anti-aliased text-rendering engine

External links

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK