before we begin
play

Before we begin Paper summaries for today? Intro to Sampling Theory - PDF document

Before we begin Paper summaries for today? Intro to Sampling Theory Announcement Announcement SIGGRAPH animation screenings Career Fair Every Monday The straight dope 12:30pm -- 2pm Fair: Tuesday, September 26th


  1. Before we begin  Paper summaries for today? Intro to Sampling Theory Announcement Announcement  SIGGRAPH animation screenings  Career Fair  Every Monday  The straight dope  12:30pm -- 2pm  Fair: Tuesday, September 26th  10am -- 4pm  07-1315  Interviews: Wednesday, September 27th  Sponsored by RIT digital studio program (College Imaging Arts and Sciences) and  http://www.rit.edu/co-op/careers Rochester Chapter of SIGGRAPH. Announcement Plan for today  We’re looking for a few good programmers!  Sampling Theory  ACM Programming Contest  Teams up to 3 people  Local Tryouts: Sept 22nd at 5pm (ICL4)  Free food will be served  Contact : Paul Tymann (ptt@cs.rit.edu)  By Sept 18th (if interested)  http://www.cs.rit.edu/~icpc 1

  2. Approaches to modeling in CG Sampling Theory  The world is continuous  How does one describe reality?  Like it or not, CG is discrete.  Empirical -- Use measured data  We work using a discrete array of pixels  Fixed model  We use discrete values for color  Procedural Modeling  We use discrete arrays and subdivisions for  Physical simulation specifying textures and surfaces  Heuristic  Process of going from continuous to discrete is called sampling. Sampling in modeling Sampling in modeling Digibotics Laser Scanner 3D Scanner Surface subdivision Sampling in reflectance modeling Sampling in textures goniometer www.sharkyextreme.com 2

  3. Sampling in textures Sampling in image generation Point sampled textures Filtered textures www.sharkyextreme.com Sampling Theory Sampling Theory  Signal - function that conveys  Point Sampling information  start with continuous signal  Audio signal (1D - function of time)  calculate values of signal at discrete,  Image (2D - function of space) evenly spaced points (sampling)  Continuous vs. Discrete  convert back to continuous signal for  Continuous - defined for all values in range display or output (reconstruction)  Discrete - defined for a set of discrete points in range. Sampling Theory Sampling Theory  Sampling can be described as creating a set of values representing a function evaluated at evenly spaced samples f n f ( i ) i 0 , 1 , 2 , , n K = � = Δ = interval between samples = range / n. Foley/VanDam 3

  4. Sampling Theory Issues:  Sampling Rate = number of samples per unit  Important features of a scene may be missed = 1 f  If view changes slightly or objects move slightly, objects may move in and out of � visibility.  Example -- CD Audio  To fix, sample at a higher rate, but how  sampling rate of 44,100 samples/sec high does it need to be?  Δ = 1 sample every 2.26x10 -5 seconds Sampling Theory Sampling Theory  Rich mathematical foundation for  Spatial vs frequency domains sampling theory  Most well behaved functions can be described as a sum of sin waves (possibly  Hope to give an “intuitive” notion of offset) at various frequencies these mathematical concepts  Frequency specturm - a function by the contribution (and offset) at each frequency is describing the function in the frequency domain  Higher frequencies equate to greater detail Sampling Theory Sampling Theory  Interactive wave builder  http://www.sunsite.ubc.ca/LivingMathe matics/V001N01/UBCExamples/Fourier/f ourier.html Foley/VanDam 4

  5. Sampling Theory Sampling Theory  Nyquist Theorum  Annoying audio applet 1  A signal can be properly reconstructed if the signal  Fourier Synthesis -- Graphic Equalizer is sampled at a frequency (rate) that is greater than twice the highest frequency component of the signal.  http://www.phy.ntnu.edu.tw/ntnujava/vie  Said another way, if you have a signal with wtopic.php?t=33 highest frequency component of f h , you need at lease 2f h samples to represent this signal accurately. Sampling Theory Sampling Theory  Aliasing  Example -- CD Audio  Failure to follow the Nyquist Theorum results in  sampling rate of 44,100 samples/sec aliasing .  Δ = 1 sample every 2.26x10 -5 seconds  Aliasing is when high frequency components of a signal appear as low frequency due to inadequate  Using Nyquist Theorem sampling.  CDs can accurately reproduce sounds with  In CG: frequencies as high as 22,050 Hz.  Jaggies (edges)  Textures  Missed objects Sampling Theory Sampling Theory  Aliasing - example  Annoying Audio Applet 2  Aliasing  http://ptolemy.eecs.berkeley.edu/eecs20/week13/ aliasing.html Foley/VanDam(628) High frequencies masquerading as low frequencies 5

  6. Anti-Aliasing Fourier analysis  What to do in an aliasing situation  Given f(x) we can generate a function  Increase your sampling rate (supersampling) F(u) which indicates how much  Decrease the frequency range of your signal contribution each frequency u has on (Filtering) the function f.  F(u) is the Fourier Transform  How do we determine the contribution of each frequency on our signal?  Fourier Transform has an inverse Sampling Theory Sampling Theory  The Fourier transform is defined as:  Fourier Transforms f(x) � Inverse i � 2 ut F ( u ) f ( t ) e � dt = � Fourier Fourier F(u) Transform Transform � � f(x) Note: the Fourier Transform is defined in the complex plane Signals in the frequency Sampling Theory domain  The Inverse Fourier transform is defined as:  http://www.falstad.com/fourier/ � i � 2 ut f ( t ) F ( u ) e du = � � � 6

  7. Sampling Theory Anti-Aliasing  How do we calculate the Fourier Transform?  What to do in an aliasing situation  Increase your sampling rate  Use Mathematics (supersampling)  For discrete functions, use the Fast Fourier Transform algorithm (FFT)  Decrease the frequency range of your signal (Filtering)  Break… Supersampling Supersampling  Increase your sampling rate  Examples  Resolution in images  Number of subdivisions in modeling  Number of sample points  Number of rays per pixel.  May not always have this luxury Wikipedia Anti-aliasing -- Filtering Getting rid of High Frequencies  Can filter the transform to remove  Filtering -- Frequency domain offending high frequencies - partial  Place function into frequency domain F(u) solution to anti-aliasing  Simple multiplication with box filter S(u), aka pulse function , band(width) limiting or low-pass  Removes high component frequencies from filter. a signal. 1 , when k u k � � � �  Removing high frequencies results in S ( u ) = � removing detail from the signal. 0 , elsewhere �  Can be done in the frequency or spatial domain  Suppress all frequency components above some specified cut-off point k 7

  8. Filtering – Frequency Domain Getting Rid of High Frequencies Original Spectrum  Filtering -- Spatial Domain  Convolution (* operator) - equivalent to Low-Pass Filter multiplying two Fourier transforms � Spectrum with Filter h ( x ) f ( x ) g ( x ) f ( ) g ( x ) d = � = � � � � � � � Taking a weighted average of the neighborhood Filtered Spectrum around each point of f , weighted by g (the convolution or filter kernel ) centered at that point. Foley/VanDam(631) Filtering using Convolution Convultion sinc Function Original Spectrum  Convolving with a sinc function in the spatial domain is the same as using a box filter in the Sinc Filter frequency domain FT → Spectrum with Filter value of filtered signal Filtered Spectrum ← FT -1 Foley/VanDam (634) Foley/VanDam (633) Convolution Sampling Theory  Joy of Convolution applet  Anti-aliasing -- Filtering  Removes high component frequencies from a signal.  Removing high frequencies results in http://www.jhu.edu/~signals/convolve/index. removing detail from the signal. html  Can be done in the frequency or spatial domain 8

  9. Sampling Theory Sampling Theory  2D Sampling  2D Aliasing  Images are examples of sampling in 2- dimensions.  2D Fourier Transforms provides strength of signals at frequencies in the horizontal and vertical directions aliased image anti-aliased image Foley/VanDam Sampling Theory Sampling Theory  2D Fourier Transform     � � i 2 ( ux vy ) F ( u , v ) f ( x , y ) e dxdy � � + = � � � � � � Castleman Sampling Theory Sampling Theory  Filtering - Convolution in 2D  Filtering – Convolution with images Castleman Castleman 9

Recommend


More recommend