University of British Columbia CPSC 414 Computer Graphics © Tamara Munzner 1 Sampling Week 7, Fri 17 Oct 2003 p1 demos sampling.

Slides:



Advertisements
Similar presentations
Sampling and Reconstruction
Advertisements

Sampling theory Fourier theory made easy
David Luebke1/19/99 CS 551/651: Antialiasing David Luebke
CS 551 / CS 645 Antialiasing. What is a pixel? A pixel is not… –A box –A disk –A teeny tiny little light A pixel is a point –It has no dimension –It occupies.
Aliasing & Antialiasing
CSCE 641 Computer Graphics: Image Sampling and Reconstruction Jinxiang Chai.
Sampling (Section 4.3) CS474/674 – Prof. Bebis. Sampling How many samples should we obtain to minimize information loss during sampling? Hint: take enough.
General Functions A non-periodic function can be represented as a sum of sin’s and cos’s of (possibly) all frequencies: F(  ) is the spectrum of the function.
CSCE 641 Computer Graphics: Image Sampling and Reconstruction Jinxiang Chai.
Advanced Computer Graphics (Spring 2006) COMS 4162, Lecture 3: Sampling and Reconstruction Ravi Ramamoorthi
CSCE 641 Computer Graphics: Fourier Transform Jinxiang Chai.
CS5520 Image-Based Rendering © Chun-Fa Chang, Spring 2003 Sampling Theorem & Antialiasing April 15, 2003.
University of British Columbia CPSC 414 Computer Graphics © Tamara Munzner 1 Scan Conversion Week 6, Fri 10 Oct 2003 sampling.
CPSC 641 Computer Graphics: Fourier Transform Jinxiang Chai.
Advanced Computer Graphics (Spring 2005) COMS 4162, Lecture 3: Sampling and Reconstruction Ravi Ramamoorthi
Computational Photography: Fourier Transform Jinxiang Chai.
Leo Lam © Signals and Systems EE235. Transformers Leo Lam ©
Basic Image Processing January 26, 30 and February 1.
First semester King Saud University College of Applied studies and Community Service 1301CT.
The Nyquist–Shannon Sampling Theorem. Impulse Train  Impulse Train (also known as "Dirac comb") is an infinite series of delta functions with a period.
Sampling of Continuous Time Signal Section
CSC418 Computer Graphics n Aliasing n Texture mapping.
Sampling and Antialiasing CMSC 491/635. Abstract Vector Spaces Addition –C = A + B = B + A –(A + B) + C = A + (B + C) –given A, B, A + X = B for only.
Advanced Computer Graphics CSE 190 [Spring 2015], Lecture 3 Ravi Ramamoorthi
Chapter 4: Sampling of Continuous-Time Signals
Echivalarea sistemelor analogice cu sisteme digitale Prof.dr.ing. Ioan NAFORNITA.
… Representation of a CT Signal Using Impulse Functions
G52IIP, School of Computer Science, University of Nottingham 1 Image Transforms Fourier Transform Basic idea.
© Chun-Fa Chang Sampling Theorem & Antialiasing. © Chun-Fa Chang Motivations “ My ray traced images have a lot more pixels than the TV screen. Why do.
Topic 7 - Fourier Transforms DIGITAL IMAGE PROCESSING Course 3624 Department of Physics and Astronomy Professor Bob Warwick.
Chapter 5 Frequency Domain Analysis of Systems. Consider the following CT LTI system: absolutely integrable,Assumption: the impulse response h(t) is absolutely.
Chapter 5 Frequency Domain Analysis of Systems. Consider the following CT LTI system: absolutely integrable,Assumption: the impulse response h(t) is absolutely.
Filtering Robert Lin April 29, Outline Why filter? Filtering for Graphics Sampling and Reconstruction Convolution The Fourier Transform Overview.
ECE 4710: Lecture #6 1 Bandlimited Signals  Bandlimited waveforms have non-zero spectral components only within a finite frequency range  Waveform is.
09/19/2002 (C) University of Wisconsin 2002, CS 559 Last Time Color Quantization Dithering.
Lecture 7: Sampling Review of 2D Fourier Theory We view f(x,y) as a linear combination of complex exponentials that represent plane waves. F(u,v) describes.
Image Processing Basics. What are images? An image is a 2-d rectilinear array of pixels.
CMSC 635 Sampling and Antialiasing. Aliasing in images.
Leo Lam © Signals and Systems EE235 Leo Lam.
2D Sampling Goal: Represent a 2D function by a finite set of points.
Leo Lam © Signals and Systems EE235. Leo Lam © Fourier Transform Q: What did the Fourier transform of the arbitrary signal say to.
Sampling Theorem & Antialiasing
ABE425 Engineering Measurement Systems Fourier Transform, Sampling theorem, Convolution and Digital Filters Dr. Tony E. Grift Dept. of Agricultural.
Lecture 5: Fourier and Pyramids
2D Fourier Transform.
David Luebke 3/17/2016 Advanced Computer Graphics Antialiasing David Luebke
Fourier transform.
The Fourier Transform.
University of Texas at Austin CS384G - Computer Graphics Fall 2008 Don Fussell Sampling and Reconstruction.
Sampling Week 7, Fri 17 Oct 2003 p1 demos sampling.
Advanced Computer Graphics
Image Enhancement in the
Sampling Theorem & Antialiasing
Lecture Signals with limited frequency range
(C) 2002 University of Wisconsin, CS 559
Sampling and Antialiasing
Dr. Nikos Desypris, Oct Lecture 3
Antialiasing Dr. Scott Schaefer.
General Functions A non-periodic function can be represented as a sum of sin’s and cos’s of (possibly) all frequencies: F() is the spectrum of the function.
Joshua Barczak CMSC435 UMBC
CSCE 643 Computer Vision: Image Sampling and Filtering
CSCE 643 Computer Vision: Thinking in Frequency
Sampling and Reconstruction
Interpolation and Pulse Shaping
Basic Image Processing
Signals and Systems Revision Lecture 2
Lesson Week 8 Fourier Transform of Time Functions (DC Signal, Periodic Signals, and Pulsed Cosine)
Chapter 3 Sampling.
CSC418 Computer Graphics Aliasing Texture mapping.
DIGITAL CONTROL SYSTEM WEEK 3 NUMERICAL APPROXIMATION
Presentation transcript:

University of British Columbia CPSC 414 Computer Graphics © Tamara Munzner 1 Sampling Week 7, Fri 17 Oct 2003 p1 demos sampling

Week 6, Fri 10 Oct 03 © Tamara Munzner2 News hw 1 solutions out –no more accepted as of right now next week –Mon: midterm no Mon office hours, I’m away at conferences –Wed: Prof. van de Panne on animation –Fri: TA Ahbijeet Ghosh on textures correct p1 grades posted on web site now project 1 –finish hall of fame demos

Week 6, Fri 10 Oct 03 © Tamara Munzner3 Point Sampling multiply sample grid by image intensity to obtain a discrete set of points, or samples. Sampling Geometry

Week 6, Fri 10 Oct 03 © Tamara Munzner4 Spatial Domain image as spatial signal Examples from Foley, van Dam, Feiner, and Hughes Pixel position across scanline Intensity

Week 6, Fri 10 Oct 03 © Tamara Munzner5 Spatial Domain: Summing Waves represent spatial signal as sum of sine waves (varying frequency and phase shift) very commonly used to represent sound “spectrum”

Week 6, Fri 10 Oct 03 © Tamara Munzner6 Frequencies: Summing Spikes

Week 6, Fri 10 Oct 03 © Tamara Munzner7 Frequency Domain position: frequency height: strength of each frequency –sine wave: impulse –square wave: infinite train of impulses

Week 6, Fri 10 Oct 03 © Tamara Munzner8 Fourier Transform Example spatial domain frequency domain

University of British Columbia CPSC 414 Computer Graphics © Tamara Munzner 9 Sampling

Week 6, Fri 10 Oct 03 © Tamara Munzner10 Sampling Theorem continuous-time signal can be completely recovered from its samples iff the sampling rate is greater than twice the maximum frequency present in the signal. - Claude Shannon

Week 6, Fri 10 Oct 03 © Tamara Munzner11 Nyquist Rate the lower bound on the sampling rate equals twice the highest frequency component in the image’s spectrum this lower bound is the Nyquist Rate

Week 6, Fri 10 Oct 03 © Tamara Munzner12 Falling Below Nyquist Rate when sampling below Nyquist Rate, resulting signal looks like a lower- frequency one –this is aliasing!

Week 6, Fri 10 Oct 03 © Tamara Munzner13 Flaws with Nyquist Rate samples may not align with peaks

Week 6, Fri 10 Oct 03 © Tamara Munzner14 Nyquist Rate

Week 6, Fri 10 Oct 03 © Tamara Munzner15 Nyquist and Checkerboards point sampled 1D checkerboard: aliases unweighted area sample: still have aliasing

Week 6, Fri 10 Oct 03 © Tamara Munzner16 Band-limited Signals if you know a function contains no components of frequencies higher than x –band-limited implies original function will not require any ideal functions with frequencies greater than x –facilitates reconstruction –avoids Nyquist Limit mistakes to lower Nyquist rate, remove high frequencies from image: low-pass filter –only low frequencies remain: band-limited

Week 6, Fri 10 Oct 03 © Tamara Munzner17 Low-Pass Filtering

Week 6, Fri 10 Oct 03 © Tamara Munzner18 Low-Pass Filtering

Week 6, Fri 10 Oct 03 © Tamara Munzner19 Filtering low pass –blur high pass –edge finding

Week 6, Fri 10 Oct 03 © Tamara Munzner20 Filtering in Spatial Domain blurring or averaging pixels together Calculate integral of one function, f(x) by a sliding second function g(x-y). Known as Convolution. g(y) Increment x h(x) Integrate over y f(x)

Week 6, Fri 10 Oct 03 © Tamara Munzner21 Filtering in Frequency Domain Image Frequency domain FilterImage Fourier Transform Fourier Transform Lowpass filter Highpass filter multiply signal’s spectrum by pulse function

Week 6, Fri 10 Oct 03 © Tamara Munzner22 Common Filters

Week 6, Fri 10 Oct 03 © Tamara Munzner23 Dualities –inverse relationship between size T large -> 2π/T small t T  2  /T Spatial domain Frequency domain

Week 6, Fri 10 Oct 03 © Tamara Munzner24 Sinc Function sinc (pulse) function is common filter: –sinc(x) = sin (  x)/  x –infinite in frequency domain Spatial Domain Frequency Domain

Week 6, Fri 10 Oct 03 © Tamara Munzner25 Sampling in Spatial Domain Q: what is sampling (i.e. evaluating a continuous function at evenly spaced points)? A: multiplication of the sample with a regular train of delta functions (spikes).

Week 6, Fri 10 Oct 03 © Tamara Munzner26 Sampling in Frequency Domain multiple copies of spectrum example: given spectrum S (  ) of a signal s(t)  0000 -0-0-0-0 S()S()S()S()

Week 6, Fri 10 Oct 03 © Tamara Munzner27 Sampling in Frequency Domain 2  /T multiple shifted copies of S (  ) are added up during sampling if 2  /T is large enough ( T is small enough) –individual spectrum copies do not overlap –depends on maximum frequency  0 in s(t) S (  )* P (  ) 

Week 6, Fri 10 Oct 03 © Tamara Munzner28 Sampling in Frequency Domain  2  /T if T is too large ( 2  /T is small), overlap occurs –this is aliasing S (  )* P (  )

Week 6, Fri 10 Oct 03 © Tamara Munzner29 Undersampling leads to aliasing. Spurious components : Cause of aliasing. Samples are too close together in f.

Week 6, Fri 10 Oct 03 © Tamara Munzner30 How do we remove aliasing ? perfect solution - prefilter with perfect bandpass filter. Perfect bandpass No aliasing. Aliased example

Week 6, Fri 10 Oct 03 © Tamara Munzner31 How do we remove aliasing ? perfect solution - prefilter with perfect bandpass filter. –difficult/Impossible to do in frequency domain convolve with sinc function in space domain –optimal filter - better than area sampling. –sinc function is infinite !! –computationally expensive

Week 6, Fri 10 Oct 03 © Tamara Munzner32 How do we remove aliasing ? cheaper solution : take multiple samples for each pixel and average them together  supersampling. can weight them towards the centre  weighted average sampling stochastic sampling importance sampling Removing aliasing is called antialiasing

Week 6, Fri 10 Oct 03 © Tamara Munzner33 Weighted Sampling multiple samples per pixel

Week 6, Fri 10 Oct 03 © Tamara Munzner34 Stochastic Supersampling high frequency noise preferable to aliases

Week 6, Fri 10 Oct 03 © Tamara Munzner35 Importance Sampling