SlideShare a Scribd company logo
1 of 40
Sampling and Aliasing
Kurt Akeley
CS248 Lecture 3
2 October 2007
http://graphics.stanford.edu/courses/cs248-07/
CS248 Lecture 3 Kurt Akeley, Fall 2007
Aliasing
Aliases are low frequencies in a rendered
image that are due to higher frequencies
in the original image.
CS248 Lecture 3 Kurt Akeley, Fall 2007
Jaggies
Are jaggies due to aliasing? How?
Original:
Rendered:
CS248 Lecture 3 Kurt Akeley, Fall 2007
Demo
CS248 Lecture 3 Kurt Akeley, Fall 2007
What is a point sample (aka sample)?
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
CS248 Lecture 3 Kurt Akeley, Fall 2007
Why point samples?
Clear and unambiguous semantics
Matches theory well (as we’ll see)
Supports image assembly in the framebuffer
 will need to resolve visibility based on distance,
and this works well with point samples
Anything else just puts the problem off
 Exchange one large, complex scene for many
small, complex scenes
CS248 Lecture 3 Kurt Akeley, Fall 2007
Fourier theory
“Fourier’s theorem is not only one of the most
beautiful results of modern analysis, but it
may be said to furnish an indispensable
instrument in the treatment of nearly every
recondite question in modern physics.”
-- Lord Kelvin
CS248 Lecture 3 Kurt Akeley, Fall 2007
Reference sources
Marc Levoy’s notes
Ronald N. Bracewell, The Fourier Transform and its
Applications, Second Edition, McGraw-Hill, Inc.,
1978.
Private conversations with Pat Hanrahan
MATLAB
CS248 Lecture 3 Kurt Akeley, Fall 2007
Ground rules
You don’t have to be an engineer to get this
 We’re looking to develop instinct / understanding
 Not to be able to do the mathematics
We’ll make minimal use of equations
 No integral equations
 No complex numbers
Plots will be consistent
 Tick marks at unit distances
 Signal on left, Fourier transform on the right
CS248 Lecture 3 Kurt Akeley, Fall 2007
Dimensions
1-D
 Audio signal (time)
 Generic examples (x)
2-D
 Image (x and y)
3-D
 Animation (x, y, and time)
All examples in this presentation are 1-D
CS248 Lecture 3 Kurt Akeley, Fall 2007
Fourier series
Any periodic function can be exactly
represented by a (typically infinite) sum
of harmonic sine and cosine functions.
Harmonics are integer multiples of the
fundamental frequency
CS248 Lecture 3 Kurt Akeley, Fall 2007
Fourier series example: sawtooth wave
…
…
( )
( )
( )
1
1
1
2
sin
n
n
f x n x
n
p
p
+
¥
=
-
= å
1
1
-1
CS248 Lecture 3 Kurt Akeley, Fall 2007
Sawtooth wave summation
Harmonics Harmonic sums
1
2
3
n
CS248 Lecture 3 Kurt Akeley, Fall 2007
Sawtooth wave summation (continued)
Harmonics Harmonic sums
5
10
50
n
CS248 Lecture 3 Kurt Akeley, Fall 2007
Fourier integral
Any function (that matters in graphics)
can be exactly represented by an
integration of sine and cosine functions.
Continuous, not harmonic
But the notion of harmonics will
continue to be useful
CS248 Lecture 3 Kurt Akeley, Fall 2007
Basic Fourier transform pairs
1 ( )
s
d
f(x) F(s)
( )
cos x
p II(s)
CS248 Lecture 3 Kurt Akeley, Fall 2007
Reciprocal property
Swapped
left/right from
previous slide
f(x) F(s)
1
( )
cos x
p
( )
s
d
II(s)
CS248 Lecture 3 Kurt Akeley, Fall 2007
Scaling theorem
( )
cos 2 x
p
cos
2
x
p
æ ö
÷
ç ÷
ç ÷
ç
è ø
II(2s)
II(s/2)
f(x) F(s)
CS248 Lecture 3 Kurt Akeley, Fall 2007
Band-limited transform pairs
( )
s
Ù
F(s)
f(x)
sinc(x)
( )
sin x
x
p
p
( )
s
Õ
sinc
2
(x)
CS248 Lecture 3 Kurt Akeley, Fall 2007
Finite / infinite extent
If one member of the transform pair is finite, the other
is infinite
 Band-limited  infinite spatial extent
 Finite spatial extent  infinite spectral extent
CS248 Lecture 3 Kurt Akeley, Fall 2007
Convolution
( ) ( ) ( ) ( )
f x g x f u g x u du
¥
- ¥
* = -
ò
CS248 Lecture 3 Kurt Akeley, Fall 2007
Convolution example
*
=
CS248 Lecture 3 Kurt Akeley, Fall 2007
Convolution theorem
Let f and g be the transforms of f and g. Then
f g f g
* = ×
f g f g
× = *
f g f g
* = ×
f g f g
× = *
Something difficult to do in one domain
(e.g., convolution) may be easy to do in the
other (e.g., multiplication)
CS248 Lecture 3 Kurt Akeley, Fall 2007
Sampling theory
x
=
*
=
F(s)
f(x)
Spectrum is
replicated an
infinite number of
times
CS248 Lecture 3 Kurt Akeley, Fall 2007
Reconstruction theory
x
=
*
=
F(s)
f(x)
sinc
CS248 Lecture 3 Kurt Akeley, Fall 2007
Sampling at the Nyquist rate
x
=
*
=
F(s)
f(x)
CS248 Lecture 3 Kurt Akeley, Fall 2007
Reconstruction at the Nyquist rate
x
=
*
=
F(s)
f(x)
CS248 Lecture 3 Kurt Akeley, Fall 2007
Sampling below the Nyquist rate
x
=
*
=
F(s)
f(x)
CS248 Lecture 3 Kurt Akeley, Fall 2007
Reconstruction below the Nyquist rate
x
=
*
=
F(s)
f(x)
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(s)
f(x)
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(s)
f(x)
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(s)
f(x)
CS248 Lecture 3 Kurt Akeley, Fall 2007
Reconstructing a rectangle (jaggies)
x
=
*
=
F(s)
f(x)
CS248 Lecture 3 Kurt Akeley, Fall 2007
Sampling and reconstruction
Aliasing is caused by
 Sampling below the Nyquist rate,
 Improper reconstruction, or
 Both
We can distinguish between
 Aliasing of fundamentals (demo)
 Aliasing of harmonics (jaggies)
CS248 Lecture 3 Kurt Akeley, Fall 2007
Summary
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
CS248 Lecture 3 Kurt Akeley, Fall 2007
Assignments
Before Thursday’s class, read
 FvD 3.17 Antialiasing
Project 1:
 Breakout: a simple interactive game
 Demos Wednesday 10 October
CS248 Lecture 3 Kurt Akeley, Fall 2007
End

More Related Content

What's hot

Random process.pptx
Random process.pptxRandom process.pptx
Random process.pptx
Neetha K
 
Pulse amplitude modulation
Pulse amplitude modulationPulse amplitude modulation
Pulse amplitude modulation
Vishal kakade
 

What's hot (20)

Lti system
Lti systemLti system
Lti system
 
DSP_2018_FOEHU - Lec 03 - Discrete-Time Signals and Systems
DSP_2018_FOEHU - Lec 03 - Discrete-Time Signals and SystemsDSP_2018_FOEHU - Lec 03 - Discrete-Time Signals and Systems
DSP_2018_FOEHU - Lec 03 - Discrete-Time Signals and Systems
 
Gamma, Expoential, Poisson And Chi Squared Distributions
Gamma, Expoential, Poisson And Chi Squared DistributionsGamma, Expoential, Poisson And Chi Squared Distributions
Gamma, Expoential, Poisson And Chi Squared Distributions
 
Forward error correction
Forward error correctionForward error correction
Forward error correction
 
Ece formula sheet
Ece formula sheetEce formula sheet
Ece formula sheet
 
Fast Fourier Transform
Fast Fourier TransformFast Fourier Transform
Fast Fourier Transform
 
Information theory
Information theoryInformation theory
Information theory
 
Digital Signal Processing[ECEG-3171]-Ch1_L03
Digital Signal Processing[ECEG-3171]-Ch1_L03Digital Signal Processing[ECEG-3171]-Ch1_L03
Digital Signal Processing[ECEG-3171]-Ch1_L03
 
Bisection method
Bisection methodBisection method
Bisection method
 
Ordinary differential equation
Ordinary differential equationOrdinary differential equation
Ordinary differential equation
 
Digital Communication: Information Theory
Digital Communication: Information TheoryDigital Communication: Information Theory
Digital Communication: Information Theory
 
Random process.pptx
Random process.pptxRandom process.pptx
Random process.pptx
 
Error Control Coding -Introduction
Error Control Coding -IntroductionError Control Coding -Introduction
Error Control Coding -Introduction
 
Pulse amplitude modulation
Pulse amplitude modulationPulse amplitude modulation
Pulse amplitude modulation
 
Fourier series Introduction
Fourier series IntroductionFourier series Introduction
Fourier series Introduction
 
Introdução à Amostragem Compressiva
Introdução à Amostragem CompressivaIntrodução à Amostragem Compressiva
Introdução à Amostragem Compressiva
 
Gram schmidt orthogonalization | Orthonormal Process
Gram schmidt orthogonalization | Orthonormal Process Gram schmidt orthogonalization | Orthonormal Process
Gram schmidt orthogonalization | Orthonormal Process
 
Channel coding
Channel coding  Channel coding
Channel coding
 
Convolutional Codes And Their Decoding
Convolutional Codes And Their DecodingConvolutional Codes And Their Decoding
Convolutional Codes And Their Decoding
 
Numerical Analysis (Solution of Non-Linear Equations)
Numerical Analysis (Solution of Non-Linear Equations)Numerical Analysis (Solution of Non-Linear Equations)
Numerical Analysis (Solution of Non-Linear Equations)
 

Similar to Sampling and Aliasing.ppt

8.6 reflections and symmetry 1
8.6 reflections and symmetry 18.6 reflections and symmetry 1
8.6 reflections and symmetry 1
bweldon
 

Similar to Sampling and Aliasing.ppt (20)

The power and Arnoldi methods in an algebra of circulants
The power and Arnoldi methods in an algebra of circulantsThe power and Arnoldi methods in an algebra of circulants
The power and Arnoldi methods in an algebra of circulants
 
ADA - Minimum Spanning Tree Prim Kruskal and Dijkstra
ADA - Minimum Spanning Tree Prim Kruskal and Dijkstra ADA - Minimum Spanning Tree Prim Kruskal and Dijkstra
ADA - Minimum Spanning Tree Prim Kruskal and Dijkstra
 
cheb_conf_aksenov.pdf
cheb_conf_aksenov.pdfcheb_conf_aksenov.pdf
cheb_conf_aksenov.pdf
 
Small updates of matrix functions used for network centrality
Small updates of matrix functions used for network centralitySmall updates of matrix functions used for network centrality
Small updates of matrix functions used for network centrality
 
Imprecision in learning: an overview
Imprecision in learning: an overviewImprecision in learning: an overview
Imprecision in learning: an overview
 
Matlab Assignment Help
Matlab Assignment HelpMatlab Assignment Help
Matlab Assignment Help
 
Modeling quadratic fxns
Modeling quadratic fxnsModeling quadratic fxns
Modeling quadratic fxns
 
Elliptic Curves
Elliptic CurvesElliptic Curves
Elliptic Curves
 
Lesson 14: Derivatives of Exponential and Logarithmic Functions (Section 021 ...
Lesson 14: Derivatives of Exponential and Logarithmic Functions (Section 021 ...Lesson 14: Derivatives of Exponential and Logarithmic Functions (Section 021 ...
Lesson 14: Derivatives of Exponential and Logarithmic Functions (Section 021 ...
 
8.6 reflections and symmetry 1
8.6 reflections and symmetry 18.6 reflections and symmetry 1
8.6 reflections and symmetry 1
 
Lundi 16h15-copules-charpentier
Lundi 16h15-copules-charpentierLundi 16h15-copules-charpentier
Lundi 16h15-copules-charpentier
 
0A-02-ACA-Fundamentals-Convolution.pdf
0A-02-ACA-Fundamentals-Convolution.pdf0A-02-ACA-Fundamentals-Convolution.pdf
0A-02-ACA-Fundamentals-Convolution.pdf
 
Program on Quasi-Monte Carlo and High-Dimensional Sampling Methods for Applie...
Program on Quasi-Monte Carlo and High-Dimensional Sampling Methods for Applie...Program on Quasi-Monte Carlo and High-Dimensional Sampling Methods for Applie...
Program on Quasi-Monte Carlo and High-Dimensional Sampling Methods for Applie...
 
preTEST3A Double Integrals
preTEST3A Double IntegralspreTEST3A Double Integrals
preTEST3A Double Integrals
 
WEEK-1.pdf
WEEK-1.pdfWEEK-1.pdf
WEEK-1.pdf
 
exponential functions and their graphs.ppt
exponential functions and their graphs.pptexponential functions and their graphs.ppt
exponential functions and their graphs.ppt
 
2020 preTEST3A
2020 preTEST3A2020 preTEST3A
2020 preTEST3A
 
1988 FRQs AP Calculus
1988 FRQs AP Calculus1988 FRQs AP Calculus
1988 FRQs AP Calculus
 
1988 FRQ
1988 FRQ1988 FRQ
1988 FRQ
 
1984 FRQ
1984 FRQ1984 FRQ
1984 FRQ
 

Recently uploaded

如何办理(UMN毕业证书)明尼苏达大学毕业证成绩单本科硕士学位证留信学历认证
如何办理(UMN毕业证书)明尼苏达大学毕业证成绩单本科硕士学位证留信学历认证如何办理(UMN毕业证书)明尼苏达大学毕业证成绩单本科硕士学位证留信学历认证
如何办理(UMN毕业证书)明尼苏达大学毕业证成绩单本科硕士学位证留信学历认证
ugzga
 
如何办理(UAL毕业证书)伦敦艺术大学毕业证成绩单本科硕士学位证留信学历认证
如何办理(UAL毕业证书)伦敦艺术大学毕业证成绩单本科硕士学位证留信学历认证如何办理(UAL毕业证书)伦敦艺术大学毕业证成绩单本科硕士学位证留信学历认证
如何办理(UAL毕业证书)伦敦艺术大学毕业证成绩单本科硕士学位证留信学历认证
ugzga
 
如何办理(UCL毕业证书)伦敦大学学院毕业证成绩单本科硕士学位证留信学历认证
如何办理(UCL毕业证书)伦敦大学学院毕业证成绩单本科硕士学位证留信学历认证如何办理(UCL毕业证书)伦敦大学学院毕业证成绩单本科硕士学位证留信学历认证
如何办理(UCL毕业证书)伦敦大学学院毕业证成绩单本科硕士学位证留信学历认证
ugzga
 
如何办理(Columbia College毕业证书)纽约市哥伦比亚大学毕业证成绩单本科硕士学位证留信学历认证
如何办理(Columbia College毕业证书)纽约市哥伦比亚大学毕业证成绩单本科硕士学位证留信学历认证如何办理(Columbia College毕业证书)纽约市哥伦比亚大学毕业证成绩单本科硕士学位证留信学历认证
如何办理(Columbia College毕业证书)纽约市哥伦比亚大学毕业证成绩单本科硕士学位证留信学历认证
ugzga
 
如何办理(RUG毕业证书)格罗宁根大学毕业证成绩单本科硕士学位证留信学历认证
如何办理(RUG毕业证书)格罗宁根大学毕业证成绩单本科硕士学位证留信学历认证如何办理(RUG毕业证书)格罗宁根大学毕业证成绩单本科硕士学位证留信学历认证
如何办理(RUG毕业证书)格罗宁根大学毕业证成绩单本科硕士学位证留信学历认证
ugzga
 
如何办理(Birmingham毕业证书)伯明翰大学学院毕业证成绩单本科硕士学位证留信学历认证
如何办理(Birmingham毕业证书)伯明翰大学学院毕业证成绩单本科硕士学位证留信学历认证如何办理(Birmingham毕业证书)伯明翰大学学院毕业证成绩单本科硕士学位证留信学历认证
如何办理(Birmingham毕业证书)伯明翰大学学院毕业证成绩单本科硕士学位证留信学历认证
ugzga
 
如何办理(UB毕业证书)纽约州立大学水牛城分校毕业证成绩单本科硕士学位证留信学历认证
如何办理(UB毕业证书)纽约州立大学水牛城分校毕业证成绩单本科硕士学位证留信学历认证如何办理(UB毕业证书)纽约州立大学水牛城分校毕业证成绩单本科硕士学位证留信学历认证
如何办理(UB毕业证书)纽约州立大学水牛城分校毕业证成绩单本科硕士学位证留信学历认证
ugzga
 
NO1 Best Best Black Magic Specialist Near Me Spiritual Healer Powerful Love S...
NO1 Best Best Black Magic Specialist Near Me Spiritual Healer Powerful Love S...NO1 Best Best Black Magic Specialist Near Me Spiritual Healer Powerful Love S...
NO1 Best Best Black Magic Specialist Near Me Spiritual Healer Powerful Love S...
Amil baba
 
Abortion Clinic in Springs +27791653574 Springs WhatsApp Abortion Clinic Serv...
Abortion Clinic in Springs +27791653574 Springs WhatsApp Abortion Clinic Serv...Abortion Clinic in Springs +27791653574 Springs WhatsApp Abortion Clinic Serv...
Abortion Clinic in Springs +27791653574 Springs WhatsApp Abortion Clinic Serv...
mikehavy0
 
如何办理(UoB毕业证书)伯明翰大学毕业证成绩单本科硕士学位证留信学历认证
如何办理(UoB毕业证书)伯明翰大学毕业证成绩单本科硕士学位证留信学历认证如何办理(UoB毕业证书)伯明翰大学毕业证成绩单本科硕士学位证留信学历认证
如何办理(UoB毕业证书)伯明翰大学毕业证成绩单本科硕士学位证留信学历认证
ugzga
 
一模一样英国德比大学毕业证(derby毕业证书)本科学历-国外大学文凭办理
一模一样英国德比大学毕业证(derby毕业证书)本科学历-国外大学文凭办理一模一样英国德比大学毕业证(derby毕业证书)本科学历-国外大学文凭办理
一模一样英国德比大学毕业证(derby毕业证书)本科学历-国外大学文凭办理
thubko
 
NO1 Best Best Amil In Rawalpindi Bangali Baba In Rawalpindi jadu tona karne w...
NO1 Best Best Amil In Rawalpindi Bangali Baba In Rawalpindi jadu tona karne w...NO1 Best Best Amil In Rawalpindi Bangali Baba In Rawalpindi jadu tona karne w...
NO1 Best Best Amil In Rawalpindi Bangali Baba In Rawalpindi jadu tona karne w...
Amil baba
 

Recently uploaded (20)

And that's about to change! (Service Design Drinks Berlin May 2024)
And that's about to change! (Service Design Drinks Berlin May 2024)And that's about to change! (Service Design Drinks Berlin May 2024)
And that's about to change! (Service Design Drinks Berlin May 2024)
 
如何办理(UMN毕业证书)明尼苏达大学毕业证成绩单本科硕士学位证留信学历认证
如何办理(UMN毕业证书)明尼苏达大学毕业证成绩单本科硕士学位证留信学历认证如何办理(UMN毕业证书)明尼苏达大学毕业证成绩单本科硕士学位证留信学历认证
如何办理(UMN毕业证书)明尼苏达大学毕业证成绩单本科硕士学位证留信学历认证
 
如何办理(UAL毕业证书)伦敦艺术大学毕业证成绩单本科硕士学位证留信学历认证
如何办理(UAL毕业证书)伦敦艺术大学毕业证成绩单本科硕士学位证留信学历认证如何办理(UAL毕业证书)伦敦艺术大学毕业证成绩单本科硕士学位证留信学历认证
如何办理(UAL毕业证书)伦敦艺术大学毕业证成绩单本科硕士学位证留信学历认证
 
如何办理(UCL毕业证书)伦敦大学学院毕业证成绩单本科硕士学位证留信学历认证
如何办理(UCL毕业证书)伦敦大学学院毕业证成绩单本科硕士学位证留信学历认证如何办理(UCL毕业证书)伦敦大学学院毕业证成绩单本科硕士学位证留信学历认证
如何办理(UCL毕业证书)伦敦大学学院毕业证成绩单本科硕士学位证留信学历认证
 
Morgenbooster: Storytelling in Identity Design
Morgenbooster: Storytelling in Identity DesignMorgenbooster: Storytelling in Identity Design
Morgenbooster: Storytelling in Identity Design
 
如何办理(Columbia College毕业证书)纽约市哥伦比亚大学毕业证成绩单本科硕士学位证留信学历认证
如何办理(Columbia College毕业证书)纽约市哥伦比亚大学毕业证成绩单本科硕士学位证留信学历认证如何办理(Columbia College毕业证书)纽约市哥伦比亚大学毕业证成绩单本科硕士学位证留信学历认证
如何办理(Columbia College毕业证书)纽约市哥伦比亚大学毕业证成绩单本科硕士学位证留信学历认证
 
CADD 141 - Puzzle Cube Project - Product Photos
CADD 141 - Puzzle Cube Project - Product PhotosCADD 141 - Puzzle Cube Project - Product Photos
CADD 141 - Puzzle Cube Project - Product Photos
 
如何办理(RUG毕业证书)格罗宁根大学毕业证成绩单本科硕士学位证留信学历认证
如何办理(RUG毕业证书)格罗宁根大学毕业证成绩单本科硕士学位证留信学历认证如何办理(RUG毕业证书)格罗宁根大学毕业证成绩单本科硕士学位证留信学历认证
如何办理(RUG毕业证书)格罗宁根大学毕业证成绩单本科硕士学位证留信学历认证
 
如何办理(Birmingham毕业证书)伯明翰大学学院毕业证成绩单本科硕士学位证留信学历认证
如何办理(Birmingham毕业证书)伯明翰大学学院毕业证成绩单本科硕士学位证留信学历认证如何办理(Birmingham毕业证书)伯明翰大学学院毕业证成绩单本科硕士学位证留信学历认证
如何办理(Birmingham毕业证书)伯明翰大学学院毕业证成绩单本科硕士学位证留信学历认证
 
Game Pitch- Heroes of Niflheim (a mobile game).pdf
Game Pitch- Heroes of Niflheim (a mobile game).pdfGame Pitch- Heroes of Niflheim (a mobile game).pdf
Game Pitch- Heroes of Niflheim (a mobile game).pdf
 
如何办理(UB毕业证书)纽约州立大学水牛城分校毕业证成绩单本科硕士学位证留信学历认证
如何办理(UB毕业证书)纽约州立大学水牛城分校毕业证成绩单本科硕士学位证留信学历认证如何办理(UB毕业证书)纽约州立大学水牛城分校毕业证成绩单本科硕士学位证留信学历认证
如何办理(UB毕业证书)纽约州立大学水牛城分校毕业证成绩单本科硕士学位证留信学历认证
 
GBU INDOOR STADIUM CASE STUDY DESCRIBING ITS STRUCTURE
GBU INDOOR STADIUM CASE STUDY DESCRIBING ITS STRUCTUREGBU INDOOR STADIUM CASE STUDY DESCRIBING ITS STRUCTURE
GBU INDOOR STADIUM CASE STUDY DESCRIBING ITS STRUCTURE
 
Design Portofolios - Licensed Architect / BIM Specialist
Design Portofolios - Licensed Architect / BIM SpecialistDesign Portofolios - Licensed Architect / BIM Specialist
Design Portofolios - Licensed Architect / BIM Specialist
 
Latest Trends in Home and Building Design
Latest Trends in Home and Building DesignLatest Trends in Home and Building Design
Latest Trends in Home and Building Design
 
NO1 Best Best Black Magic Specialist Near Me Spiritual Healer Powerful Love S...
NO1 Best Best Black Magic Specialist Near Me Spiritual Healer Powerful Love S...NO1 Best Best Black Magic Specialist Near Me Spiritual Healer Powerful Love S...
NO1 Best Best Black Magic Specialist Near Me Spiritual Healer Powerful Love S...
 
Abortion Clinic in Springs +27791653574 Springs WhatsApp Abortion Clinic Serv...
Abortion Clinic in Springs +27791653574 Springs WhatsApp Abortion Clinic Serv...Abortion Clinic in Springs +27791653574 Springs WhatsApp Abortion Clinic Serv...
Abortion Clinic in Springs +27791653574 Springs WhatsApp Abortion Clinic Serv...
 
如何办理(UoB毕业证书)伯明翰大学毕业证成绩单本科硕士学位证留信学历认证
如何办理(UoB毕业证书)伯明翰大学毕业证成绩单本科硕士学位证留信学历认证如何办理(UoB毕业证书)伯明翰大学毕业证成绩单本科硕士学位证留信学历认证
如何办理(UoB毕业证书)伯明翰大学毕业证成绩单本科硕士学位证留信学历认证
 
一模一样英国德比大学毕业证(derby毕业证书)本科学历-国外大学文凭办理
一模一样英国德比大学毕业证(derby毕业证书)本科学历-国外大学文凭办理一模一样英国德比大学毕业证(derby毕业证书)本科学历-国外大学文凭办理
一模一样英国德比大学毕业证(derby毕业证书)本科学历-国外大学文凭办理
 
Levi's Advertisement and camapign design
Levi's Advertisement and camapign designLevi's Advertisement and camapign design
Levi's Advertisement and camapign design
 
NO1 Best Best Amil In Rawalpindi Bangali Baba In Rawalpindi jadu tona karne w...
NO1 Best Best Amil In Rawalpindi Bangali Baba In Rawalpindi jadu tona karne w...NO1 Best Best Amil In Rawalpindi Bangali Baba In Rawalpindi jadu tona karne w...
NO1 Best Best Amil In Rawalpindi Bangali Baba In Rawalpindi jadu tona karne w...
 

Sampling and Aliasing.ppt

  • 1. Sampling and Aliasing Kurt Akeley CS248 Lecture 3 2 October 2007 http://graphics.stanford.edu/courses/cs248-07/
  • 2. CS248 Lecture 3 Kurt Akeley, Fall 2007 Aliasing Aliases are low frequencies in a rendered image that are due to higher frequencies in the original image.
  • 3. CS248 Lecture 3 Kurt Akeley, Fall 2007 Jaggies Are jaggies due to aliasing? How? Original: Rendered:
  • 4. CS248 Lecture 3 Kurt Akeley, Fall 2007 Demo
  • 5. CS248 Lecture 3 Kurt Akeley, Fall 2007 What is a point sample (aka sample)? 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
  • 6. CS248 Lecture 3 Kurt Akeley, Fall 2007 Why point samples? Clear and unambiguous semantics Matches theory well (as we’ll see) Supports image assembly in the framebuffer  will need to resolve visibility based on distance, and this works well with point samples Anything else just puts the problem off  Exchange one large, complex scene for many small, complex scenes
  • 7. CS248 Lecture 3 Kurt Akeley, Fall 2007 Fourier theory “Fourier’s theorem is not only one of the most beautiful results of modern analysis, but it may be said to furnish an indispensable instrument in the treatment of nearly every recondite question in modern physics.” -- Lord Kelvin
  • 8. CS248 Lecture 3 Kurt Akeley, Fall 2007 Reference sources Marc Levoy’s notes Ronald N. Bracewell, The Fourier Transform and its Applications, Second Edition, McGraw-Hill, Inc., 1978. Private conversations with Pat Hanrahan MATLAB
  • 9. CS248 Lecture 3 Kurt Akeley, Fall 2007 Ground rules You don’t have to be an engineer to get this  We’re looking to develop instinct / understanding  Not to be able to do the mathematics We’ll make minimal use of equations  No integral equations  No complex numbers Plots will be consistent  Tick marks at unit distances  Signal on left, Fourier transform on the right
  • 10. CS248 Lecture 3 Kurt Akeley, Fall 2007 Dimensions 1-D  Audio signal (time)  Generic examples (x) 2-D  Image (x and y) 3-D  Animation (x, y, and time) All examples in this presentation are 1-D
  • 11. CS248 Lecture 3 Kurt Akeley, Fall 2007 Fourier series Any periodic function can be exactly represented by a (typically infinite) sum of harmonic sine and cosine functions. Harmonics are integer multiples of the fundamental frequency
  • 12. CS248 Lecture 3 Kurt Akeley, Fall 2007 Fourier series example: sawtooth wave … … ( ) ( ) ( ) 1 1 1 2 sin n n f x n x n p p + ¥ = - = å 1 1 -1
  • 13. CS248 Lecture 3 Kurt Akeley, Fall 2007 Sawtooth wave summation Harmonics Harmonic sums 1 2 3 n
  • 14. CS248 Lecture 3 Kurt Akeley, Fall 2007 Sawtooth wave summation (continued) Harmonics Harmonic sums 5 10 50 n
  • 15. CS248 Lecture 3 Kurt Akeley, Fall 2007 Fourier integral Any function (that matters in graphics) can be exactly represented by an integration of sine and cosine functions. Continuous, not harmonic But the notion of harmonics will continue to be useful
  • 16. CS248 Lecture 3 Kurt Akeley, Fall 2007 Basic Fourier transform pairs 1 ( ) s d f(x) F(s) ( ) cos x p II(s)
  • 17. CS248 Lecture 3 Kurt Akeley, Fall 2007 Reciprocal property Swapped left/right from previous slide f(x) F(s) 1 ( ) cos x p ( ) s d II(s)
  • 18. CS248 Lecture 3 Kurt Akeley, Fall 2007 Scaling theorem ( ) cos 2 x p cos 2 x p æ ö ÷ ç ÷ ç ÷ ç è ø II(2s) II(s/2) f(x) F(s)
  • 19. CS248 Lecture 3 Kurt Akeley, Fall 2007 Band-limited transform pairs ( ) s Ù F(s) f(x) sinc(x) ( ) sin x x p p ( ) s Õ sinc 2 (x)
  • 20. CS248 Lecture 3 Kurt Akeley, Fall 2007 Finite / infinite extent If one member of the transform pair is finite, the other is infinite  Band-limited  infinite spatial extent  Finite spatial extent  infinite spectral extent
  • 21. CS248 Lecture 3 Kurt Akeley, Fall 2007 Convolution ( ) ( ) ( ) ( ) f x g x f u g x u du ¥ - ¥ * = - ò
  • 22. CS248 Lecture 3 Kurt Akeley, Fall 2007 Convolution example * =
  • 23. CS248 Lecture 3 Kurt Akeley, Fall 2007 Convolution theorem Let f and g be the transforms of f and g. Then f g f g * = × f g f g × = * f g f g * = × f g f g × = * Something difficult to do in one domain (e.g., convolution) may be easy to do in the other (e.g., multiplication)
  • 24. CS248 Lecture 3 Kurt Akeley, Fall 2007 Sampling theory x = * = F(s) f(x) Spectrum is replicated an infinite number of times
  • 25. CS248 Lecture 3 Kurt Akeley, Fall 2007 Reconstruction theory x = * = F(s) f(x) sinc
  • 26. CS248 Lecture 3 Kurt Akeley, Fall 2007 Sampling at the Nyquist rate x = * = F(s) f(x)
  • 27. CS248 Lecture 3 Kurt Akeley, Fall 2007 Reconstruction at the Nyquist rate x = * = F(s) f(x)
  • 28. CS248 Lecture 3 Kurt Akeley, Fall 2007 Sampling below the Nyquist rate x = * = F(s) f(x)
  • 29. CS248 Lecture 3 Kurt Akeley, Fall 2007 Reconstruction below the Nyquist rate x = * = F(s) f(x)
  • 30. CS248 Lecture 3 Kurt Akeley, Fall 2007 Reconstruction error Original Signal Undersampled Reconstruction
  • 31. CS248 Lecture 3 Kurt Akeley, Fall 2007 Reconstruction with a triangle function x = * = F(s) f(x)
  • 32. CS248 Lecture 3 Kurt Akeley, Fall 2007 Reconstruction error Original Signal Triangle Reconstruction
  • 33. CS248 Lecture 3 Kurt Akeley, Fall 2007 Reconstruction with a rectangle function x = * = F(s) f(x)
  • 34. CS248 Lecture 3 Kurt Akeley, Fall 2007 Reconstruction error Original Signal Rectangle Reconstruction
  • 35. CS248 Lecture 3 Kurt Akeley, Fall 2007 Sampling a rectangle x = * = F(s) f(x)
  • 36. CS248 Lecture 3 Kurt Akeley, Fall 2007 Reconstructing a rectangle (jaggies) x = * = F(s) f(x)
  • 37. CS248 Lecture 3 Kurt Akeley, Fall 2007 Sampling and reconstruction Aliasing is caused by  Sampling below the Nyquist rate,  Improper reconstruction, or  Both We can distinguish between  Aliasing of fundamentals (demo)  Aliasing of harmonics (jaggies)
  • 38. CS248 Lecture 3 Kurt Akeley, Fall 2007 Summary 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
  • 39. CS248 Lecture 3 Kurt Akeley, Fall 2007 Assignments Before Thursday’s class, read  FvD 3.17 Antialiasing Project 1:  Breakout: a simple interactive game  Demos Wednesday 10 October
  • 40. CS248 Lecture 3 Kurt Akeley, Fall 2007 End