Aliasing - A phenomenon that occurs when something is reconstructed from data that was not sampled frequently enough. The classic example of this is the television shot of a wheel (or helicopter blades) that seems to be spinning very slowly or turning backwards. Such shots happen because the television image you see is composed of individual frames sampled at a rate of only 30 per second. The object being viewed is rotating at a rate significantly faster than that, but is displayed at only 30 discrete positions - so your brain perceives a different rate of rotation. 3D Computer Graphics by Alan Watt has a section on this (Chapter 11) that is an excellent resource.

The Java applet below lets you experiment with this phenomenon as it applies to images. Because the applet cannot re-sample the images you give it (which would be the ideal demonstration of aliasing), things are handled differently. When you specify an image to use, the applet downloads the image and performs some modifications to it (such as removing transparency information). It pretends the resulting image represents the full information available and samples it using the chosen anti-aliasing method (as well as providing a version of the original for comparison). The two sampling methods used by the applet are super-sampling and stochastic super-sampling and can be performed at a variety of resolutions.

As an example, if you have chosen the 2×2 averaging method, the image is divided into 2×2 blocks, each of which is used to generate one pixel of the anti-aliased image. In the case of 2×2 averaging, the RGB values of the four pixels are averaged with the result becoming the anti-aliased pixel for that block of the image. This block-based process is repeated for the remaining blocks of the image. If you elected to scale the original image to match the size of the anti-aliased image, the applet simulates the "original" image that would have been generated if no anti-aliasing method were used. This simulation is accomplished by choosing one pixel from each block to become the representative for that block and using that pixel to generate the pixel of the anti-aliased image. If you have not chosen to scale the original, an unaltered version of the original image is displayed.

The result is that you can compare the original and anti-aliased images and examine the effects of using different anti-aliasing methods. To allow closer inspection, the applet can zoom in (or out) on each image independently.


This applet requires Java


Interesting Images To Try:
Type (or copy) these URLs into the "Image location" box and hit Enter. Note: Due to Java security restrictions, most web browsers will allow this applet to access only those images hosted by the same site as the applet. But there are plenty of interesting images around, so go exploring!

The Anti-Aliasing Filters Used:
None 2×2 Average 3×3 Average 3×3 Bartlett Window
None
1 1
1 1
1 1 1
1 1 1
1 1 1
1 2 1
2 4 2
1 2 1
5×5 Average 5×5 Bartlett Window
1 1 1 1 1
1 1 1 1 1
1 1 1 1 1
1 1 1 1 1
1 1 1 1 1
1 2 3 2 1
2 4 6 4 2
3 6 9 6 3
2 4 6 4 2
1 2 3 2 1
2×2 Stochastic, 3×3 Stochastic, 5×5 Stochastic
These are similar to the corresponding averaging filters except that the pixel locations are selected randomly from the area under the filter.
In each case, the filter is placed over a block of pixels and the RGB values of each pixel are multiplied by the corresponding number in the filter. The resulting RGB values are added together and then divided by the sum of the values in the filter. This operation gives the RGB values for the new pixel.


A project description is available.