Aliasing and anti-aliasing

Timofey Uvarov
Fourier Image Lab
Published in
2 min readJul 7, 2024

Link to original research:

Anti-aliasing is a general problem in computer graphics. Almost any program that displays graphics to a screen or other device includes operation of rasterization.

The problem of aliasing also arises when the image is resized, for example, when we reduce the image, we actually reduce the sampling rate. This leads to the fact that some frequencies that were previously below the Nyquist frequency are now above the new Nyquist frequency. There is a need for anti-aliasing.

It follows from the Nyquist-Shannon sampling theorem that for the correct restoration of the original signal from the digitized one, it is necessary that the spectrum of the original signal does not contain frequencies higher than half the sampling frequency (Nyquist frequency). Therefore, before digitizing the signal, all frequencies above the Nyquist frequency are usually filtered from it. This is called anti-aliasing. For images, this leads to the fact that small details are lost, the picture is blurred. But on the other hand, after restoring the signal to analog form, we get the correct transmission of low frequencies. If we do not use anti-aliasing, then we will not only lose the upper frequencies, but also spoil the lower ones. In this case, frequencies above the Nyquist frequency will float to the lower part of the spectrum and superimpose on the frequencies already present there. This is called aliasing.

The quality of the bitmap is highly dependent on the quality of anti-aliasing. Without proper anti-aliasing, the image looks very unrealistic, with “torn” edges and other artifacts. With the correct anti-aliasing, the picture looks natural, with smooth edges, the text is easy to read, and most of the unwanted effects and artifacts are eliminated. A few years ago, good anti-aliasing took too much CPU time to render, but today programs can significantly improve the quality of their graphics thanks to anti-aliasing.

The anti-aliasing process when rendering an image of XxY resolution is similar to rendering an image of 3Xx3Y and then resampling it to the target resolution of XxY.

Resampling is one of the primary and most common operations in the tasks of pre-press graphics, compositing, digital photography and other tasks in one way or another related to image resizing. The quality of images after resizing strongly depends on the quality of the algorithm.

--

--