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
Fourier Transform – Chapter 13. Fourier Transform – continuous function Apply the Fourier Series to complex- valued functions using Euler’s notation to.
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 Sampling Week 7, Fri 17 Oct 2003 p1 demos sampling.
University of British Columbia CPSC 414 Computer Graphics © Tamara Munzner 1 Scan Conversion Week 6, Fri 10 Oct 2003 sampling.
Advanced Computer Graphics (Spring 2005) COMS 4162, Lecture 3: Sampling and Reconstruction Ravi Ramamoorthi
Computational Photography: Fourier Transform Jinxiang Chai.
Basic Image Processing January 26, 30 and February 1.
Digital Image Processing, 2nd ed. © 2002 R. C. Gonzalez & R. E. Woods Chapter 4 Image Enhancement in the Frequency Domain Chapter.
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.
02/12/02 (c) 2002 University of Wisconsin, CS 559 Filters A filter is something that attenuates or enhances particular frequencies Easiest to visualize.
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.
Image Processing © 2002 R. C. Gonzalez & R. E. Woods Lecture 4 Image Enhancement in the Frequency Domain Lecture 4 Image Enhancement.
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.
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
University of Texas at Austin CS384G - Computer Graphics Fall 2008 Don Fussell Sampling and Reconstruction.
Sampling (Section 4.3) CS474/674 – Prof. Bebis.
Advanced Computer Graphics
… Sampling … … Filtering … … Reconstruction …
Echivalarea sistemelor analogice cu sisteme digitale
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
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
Distributed Ray Tracing
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:

Sampling Week 7, Fri 17 Oct 2003 p1 demos sampling

News hw 1 solutions out next week 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 Munzner

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 Munzner

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

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 Munzner

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

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 Munzner

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

Sampling

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 Munzner

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 Munzner

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 Munzner

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

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

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

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 Munzner

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

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

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

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

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

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

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

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

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 Munzner

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

Sampling in Frequency Domain 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() 2/T  Week 6, Fri 10 Oct 03 © Tamara Munzner

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

Undersampling leads to aliasing. Don’t need to know this Samples are too close together in f. Spurious components : Cause of aliasing. Week 6, Fri 10 Oct 03 © Tamara Munzner

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

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 Munzner

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 Munzner

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

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

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