Professional Documents
Culture Documents
Sampling and Aliasing
Sampling and Aliasing
Kurt Akeley
CS248 Lecture 3
2 October 2007
http://graphics.stanford.edu/courses/cs248-07/
Aliasing
Original:
Rendered:
An evaluation
At an infinitesimal point (2-D)
Or along a ray (3-D)
What is evaluated
Inclusion (2-D) or intersection (3-D)
Attributes such as distance and color
-- Lord Kelvin
1-D
Audio signal (time)
Generic examples (x)
2-D
Image (x and y)
3-D
Animation (x, y, and time)
… …
-1 1
n+ 1
2 ¥
(- 1)
f ( x) = å sin (np x )
p n= 1 n
10
50
1 d(s)
cos (p x ) II(s)
f(x) F(s)
CS248 Lecture 3 Kurt Akeley, Fall 2007
Reciprocal property
d(s) 1
Swapped
left/right from
previous slide
II(s) cos (p x )
f(x) F(s)
CS248 Lecture 3 Kurt Akeley, Fall 2007
Scaling theorem
æp x ö÷
cos çç ÷ II(2s)
çè 2 ø÷
f(x) F(s)
CS248 Lecture 3 Kurt Akeley, Fall 2007
Band-limited transform pairs
sin (p x)
sinc(x) Õ (s)
px
sinc2(x) Ù( s )
f(x) F(s)
CS248 Lecture 3 Kurt Akeley, Fall 2007
Finite / infinite extent
f ( x)* g ( x) = ò f (u )g ( x - u ) du
- ¥
f * g = f ×g f * g = f ×g
f ×g = f * g f ×g = f * g
x
*
Spectrum is
replicated an
= =
infinite number
of times
f(x) F(s)
CS248 Lecture 3 Kurt Akeley, Fall 2007
Reconstruction theory
x
* sinc
= =
f(x) F(s)
CS248 Lecture 3 Kurt Akeley, Fall 2007
Sampling at the Nyquist rate
x
*
= =
f(x) F(s)
CS248 Lecture 3 Kurt Akeley, Fall 2007
Reconstruction at the Nyquist rate
x
*
= =
f(x) F(s)
CS248 Lecture 3 Kurt Akeley, Fall 2007
Sampling below the Nyquist rate
x
*
= =
f(x) F(s)
CS248 Lecture 3 Kurt Akeley, Fall 2007
Reconstruction below the Nyquist rate
x
*
= =
f(x) F(s)
CS248 Lecture 3 Kurt Akeley, Fall 2007
Reconstruction error
Original Signal
Undersampled
Reconstruction
CS248 Lecture 3 Kurt Akeley, Fall 2007
Reconstruction with a triangle function
x
*
= =
f(x) F(s)
CS248 Lecture 3 Kurt Akeley, Fall 2007
Reconstruction error
Original Signal
Triangle
Reconstruction
CS248 Lecture 3 Kurt Akeley, Fall 2007
Reconstruction with a rectangle function
x
*
= =
f(x) F(s)
CS248 Lecture 3 Kurt Akeley, Fall 2007
Reconstruction error
Original Signal
Rectangle
Reconstruction
CS248 Lecture 3 Kurt Akeley, Fall 2007
Sampling a rectangle
x
*
= =
f(x) F(s)
CS248 Lecture 3 Kurt Akeley, Fall 2007
Reconstructing a rectangle (jaggies)
x
*
= =
f(x) F(s)
CS248 Lecture 3 Kurt Akeley, Fall 2007
Sampling and reconstruction
Aliasing is caused by
Sampling below the Nyquist rate,
Improper reconstruction, or
Both
Jaggies matter
Create false cues
Violate rule 1
Sampling is done at points (2-D) or along rays (3-D)
Sufficient for depth sorting
Matches theory
Fourier theory explains jaggies as aliasing. For correct
reconstruction:
Signal must be band-limited
Sampling must be at or above Nyquist rate
Reconstruction must be done with a sinc function