QuickStudy: Anti-aliasing
May 27, 2002 (Computerworld)
Anti-aliasing smooths the raw and haggard edges on digital type and images on computer and handheld displays, wireless phones, printers, even digital cameras.
Aliasing - jagged or stair-stepped edges - appears when there are too few pixels in an image or on a display to represent it realistically.
Spectral aliasing - moire or herringbone patterns where none should be - appears as a result of interference between digital signals, such as color and brightness.
How It Works
In graphics or type, anti-aliasing algorithms sample, or examine and evaluate, the colors and shades of pixels adjoining curved or diagonal lines. They also shade some pixels to create a softer line. The eye no longer clearly sees the stair-stepped edge and, paradoxically, it reads the softer line as clearer.
Some anti-aliasing algorithms create a similar effect by jittering. Instead of changing a pixel's color or tone, the filter slightly offsets, or jitters, the pixel by a random amount from its normal placement. This creates a more gradual transition between an object and its background.
Dithering, or creating a similar shaded effect using patterns of dots of colors, can create an anti-aliasing effect for photographs and shaded drawings.
Increasing the resolution and thus reducing the pixel size can create an effect similar to that of anti-aliasing, but this may not always be feasible.
Fractal compression lets you store thousands of large image files on a single CD.
Fractal compression works by reducing each shape or pattern to an equation. When the fractal image is reconstructed, there's often more information than the display can show, and artifacts - bits of white debris - are created. Anti-aliasing eliminates these artifacts and creates smoother edges.
High-end graphics hardware maker Silicon Graphics Inc. in Mountain View, Calif., developed an anti-aliasing method that uses special accumulation buffers that temporarily store rendered frames. When several frames have accumulated, the graphics chip blends them together.
To counter aliasing, some devices, such as Intel Corp.'s Pentium III chip and many printers and digital cameras, incorporate anti-aliasing filters. High-end graphics cards may contain more sophisticated anti-aliasing filters.
Most anti-aliasing filters sample adjoining pixels between two and 16 times at different locations, then combine and average the different readings to get the most realistic color. More samples result in subtler gradations between image edges and along curved or diagonal lines and type. But a higher sample rate takes more time and memory.
Some cards use supersampling, which renders the image at a resolution higher than the display can support and then scales down and filters the image - in effect, adding new pixels, before sending it to the display. But such brute-force techniques take a toll on performance.
Trade-offs
Some graphics cards makers use anti-aliasing filters with distinctive sampling patterns that create a high-sample effect with a modest sampling rate.
The GeForce4 Ti 4600 graphics card from Nvidia Corp. in Santa Clara, Calif., uses a multisampling technique, which embeds the anti-aliasing in hardware. The performance decline is much less with this technique, Nvidia says, because some of the samples on which it bases the anti-aliasing are virtual rather than actual pixels.
Edge anti-aliasing, such as in San Jose-based Adobe Systems Inc.'s Photoshop software, doesn't anti-alias an entire photograph or drawing, but only where an object of one color and tone meets another such object or the background.
Experienced users can take advantage of Photoshop's sharpen and blur tools to simulate the anti-aliasing effect.
Visual disruption caused by aliasing is even more obvious with video. As stills, each frame may look fine. But as a video image, artifacts could make the edge of a building appear to crawl or twinkle. Anti-aliasing can eliminate most of these problems.
But while anti-aliasing an image may smooth edges to give it a less harsh appearance, photographers may prefer the sharper image.
As with photographic detail, type smaller than 14 pixels high (about one-seventh of an inch on a normal display screen) doesn't benefit from anti-aliasing fuzzy edges.
Generally, anti-aliasing helps with display type, logos, graphics and some photographs, but it doesn't help text-size type or when maximum sharpness and detail is needed.
Lais is a freelance writer in Takoma Park, Md.
![]()



Imagine that each square in the grid is a pixel. If you were to draw a diagonal line, it wouldnt look like the line on the left but rather like the one in the middle. To disguise the jagged look, anti-aliasing samples pixels at the edge and creates new shaded pixels that blur the jagged line. If you squint, youll see the line at the right looks straighter than the line in the middle.


The letters on the left look ragged. By adding pixels to curved and diagonal lines in type, anti-aliasing makes the letters on the right look smoother and more legible. This effect works best on type thats more than 14 pixels high.
See additional Computerworld QuickStudies