0% found this document useful (0 votes)
38 views31 pages

Graphics2 06 Aliasing

The document discusses aliasing in computer graphics and its reduction through antialiasing techniques. It begins by introducing aliasing artifacts that can occur from inappropriate sampling of functions, such as jagged edges and missing details. Fourier analysis is then presented as a way to understand aliasing by analyzing signals in the frequency domain. Specifically, the Nyquist sampling theorem states that a band-limited function must be sampled at least twice the highest frequency to avoid aliasing during reconstruction. The document proceeds to discuss filtering and sampling operations in both the spatial and frequency domains, and how aliasing results from overlapping spectra due to insufficient sampling rates. Antialiasing techniques aim to reduce aliasing artifacts by adapting the sampling or filtering the original signal.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
38 views31 pages

Graphics2 06 Aliasing

The document discusses aliasing in computer graphics and its reduction through antialiasing techniques. It begins by introducing aliasing artifacts that can occur from inappropriate sampling of functions, such as jagged edges and missing details. Fourier analysis is then presented as a way to understand aliasing by analyzing signals in the frequency domain. Specifically, the Nyquist sampling theorem states that a band-limited function must be sampled at least twice the highest frequency to avoid aliasing during reconstruction. The document proceeds to discuss filtering and sampling operations in both the spatial and frequency domains, and how aliasing results from overlapping spectra due to insufficient sampling rates. Antialiasing techniques aim to reduce aliasing artifacts by adapting the sampling or filtering the original signal.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 31

Advanced Computer Graphics

Aliasing
Matthias Teschner
Outline
− Motivation
− Fourier analysis
− Filtering
− Sampling
− Reconstruction / aliasing
− Antialiasing

University of Freiburg – Computer Science Department – 2


Motivation
− Sampling and
reconstruction
− Inappropriate
sampling can
cause artifacts
in reconstructed
functions

[Foley, van Dam, Feiner, Huges]


University of Freiburg – Computer Science Department – 3
Motivation
− Aliasing artifacts, e. g. Moiré pattern

Original signal Sampled signal Reconstructed signal

Red - original signal


Black dots - samples
[Wikipedia:
Blue - reconstructed signal Alias-Effekt]
University of Freiburg – Computer Science Department – 4
Motivation
− Aliasing artifacts, e. g. jaggies

[Suffern]

University of Freiburg – Computer Science Department – 5


Motivation
− Aliasing artifacts, e. g. missing details

[Foley, van Dam, Feiner, Huges]

University of Freiburg – Computer Science Department – 6


Motivation
− Antialiasing
− Reduction of erroneous patterns

Regular artifacts replaced


Aliasing artifacts [Suffern]
by less disturbing noise

University of Freiburg – Computer Science Department – 7


Outline
− Motivation
− Fourier analysis
− Filtering
− Sampling
− Reconstruction / aliasing
− Antialiasing

University of Freiburg – Computer Science Department – 8


Spectrum of a Function
− Fourier transform
− Decomposes a function into
weighted sum of shifted sinusoids
− Computes amplitude and
phase shift of frequencies
contained in the function
− Transforms from the spatial
domain to the frequency domain
[Foley, van Dam, Feiner, Huges]

University of Freiburg – Computer Science Department – 9


Spectrum of a Function - Motivation
− Analysis in the frequency
Appropriate
domain allows to sampling
understand aliasing frequencies

− Aliasing is then reduced by


− Adapting the sampling
− Filtering the original signal Inappropriate
sampling
(for textures) frequencies

[Wikipedia: Nyquist-Shannon-Abtasttheorem]

University of Freiburg – Computer Science Department – 10


Spectrum of a Function - Motivation
− Sampling and reconstruction can be analyzed
in the frequency domain
− A band-limited function with for all
has to be sampled with a frequency in
order to be able to reconstruct the
original function from the samples
(Nyquist-Shannon sampling theorem)
− Nyquist frequency
− Nyquist rate
University of Freiburg – Computer Science Department – 11
Fourier Transform - Examples
− Signals in spatial and
frequency domain

[Foley, van Dam, Feiner, Huges]


University of Freiburg – Computer Science Department – 12
Fourier Transform - Properties
− Fourier transform of the product of two functions
is equivalent to the convolution of the individual
Fourier transforms

− Convolution in the spatial domain is equivalent to


multiplication in the frequency domain

− Important in understanding how filtering and


reconstruction affect the spectrum of a function
University of Freiburg – Computer Science Department – 13
Convolution

− Convolution computes a weighted average


of f using the weighting kernel g

[Wikipedia: Convolution]

University of Freiburg – Computer Science Department – 14


Outline
− Motivation
− Fourier analysis
− Filtering
− Sampling
− Reconstruction / aliasing
− Antialiasing

University of Freiburg – Computer Science Department – 15


Low-Pass Filtering
− Convolution is used to filter and reconstruct functions
Original function

sinc function

Band-limited signal

[Foley, van Dam, Feiner, Huges]


University of Freiburg – Computer Science Department – 16
Low-Pass Filtering
− sinc function in spatial and frequency domain

sinc function Box function

[Foley, van Dam, Feiner, Huges]

University of Freiburg – Computer Science Department – 17


Low-Pass Filtering
− Convolution with sinc function in the spatial
domain corresponds to multiplication with
a box function in the frequency domain
− Given a sampling rate, this low-pass filter
completely suppresses all frequency
components above the Nyquist frequency
− Aliasing is avoided in the reconstruction process
− Applied in texturing
− In ray tracing, the original function
cannot be simply filtered [Foley, van Dam, Feiner, Huges]

University of Freiburg – Computer Science Department – 18


Approximate Low-Pass Filtering
− Truncated sinc
− Gibbs phenomenon

− Triangle

− Gaussian

[Foley, van Dam, Feiner, Huges]


University of Freiburg – Computer Science Department – 19
Outline
− Motivation
− Fourier analysis
− Filtering
− Sampling
− Reconstruction / aliasing
− Antialiasing

University of Freiburg – Computer Science Department – 20


Sampling
− Sampling a function corresponds to multiplying
it in the spatial domain by a Dirac comb function

Original function Dirac comb function Sampled function


(shah function)
[Foley, van Dam, Feiner, Huges]
University of Freiburg – Computer Science Department – 21
Sampling
− In frequency domain, sampling is a convolution of
the function's spectrum with a Dirac comb function
Dirac comb in the Dirac comb in the
spatial domain frequency domain

Spectrum of Spectrum of
the function the sampled
function

[Foley, van Dam, Feiner, Huges]


University of Freiburg – Computer Science Department – 22
Outline
− Motivation
− Fourier analysis
− Filtering
− Sampling
− Reconstruction / aliasing
− Antialiasing

University of Freiburg – Computer Science Department – 23


Reconstruction
− As a result of sampling, F contains an infinite number
of replications of the spectrum of the original function f
at multiples of the sampling frequency
− Reconstruction tries to remove all but the spectrum
of the original function by multiplying with a box filter
in the frequency domain (corresponding to a convolution
of the sampled function with sinc in the spatial domain)
− Our visual system reconstructs a function from pixel values
− In ray tracing, incident radiance at pixels can be reconstructed
from several samples
University of Freiburg – Computer Science Department – 24
Reconstruction
− Sampling and
reconstruction
in spatial and
frequency
domain

[Foley, van Dam, Feiner, Huges]


University of Freiburg – Computer Science Department – 25
Aliasing
− If the sampling frequency is too low, the replicated copies
of the spectra overlap and the spectrum of the original
function cannot be reconstructed
Sufficient
sampling

Non-
overlapping
spectra
Reconstruction

Insufficient
sampling
[Foley, van Dam,
Feiner, Huges]
Overlapping
Original function in case of sufficient sampling
spectra
University of Freiburg – Computer Science Department – 26
Aliasing

Spectrum of a band- [Wikipedia: Nyquist-Shannon-Abtasttheorem]


limited function

Spectrum of sufficiently sampled Spectrum of an insufficiently sampled


band-limited function, a box filter band-limited function, the original spectrum
can reconstruct the original spectrum cannot be reconstructed

University of Freiburg – Computer Science Department – 27


Outline
− Motivation
− Fourier analysis
− Filtering
− Sampling
− Reconstruction / aliasing
− Antialiasing

University of Freiburg – Computer Science Department – 28


Antialiasing
− In texturing, textures are filtered according
to the given sampling rate
− prefiltering
− In ray tracing, the sampling rate and
sampling patterns are adapted
− Nonuniform sampling: tends to turn regular aliasing patterns into noise
− Adaptive sampling: use more samples in case of large variations bet-
ween adjacent samples (might still miss high frequencies, small details)
− In ray tracing, radiance at a pixel position is commonly
reconstructed from samples within the pixel area and
samples in adjacent pixels
University of Freiburg – Computer Science Department – 29
Antialiasing

Regular sampling Non-uniform, random


[Suffern]
with aliasing sampling with noise

University of Freiburg – Computer Science Department – 30


Summary
− Sampling of the continuous radiance function can cause aliasing
− Moiré patterns
− Jaggies
− Missing details
− Fourier analysis helps to understand sampling,
filtering / reconstruction, and aliasing effects
− Fourier transform converts between
spatial and frequency domain
− Fourier transform of the product of two functions is equivalent
to the convolution of the individual Fourier transforms
University of Freiburg – Computer Science Department – 31

You might also like