Sampling - Stanford University

3y ago
24 Views
2 Downloads
1.02 MB
17 Pages
Last View : 1m ago
Last Download : 3m ago
Upload by : Olive Grimm
Transcription

Sampling and ReconstructionThe sampling and reconstruction process Real world: continuous Digital world: discreteBasic signal processing Fourier transforms The convolution theorem The sampling theoremAliasing and antialiasing Uniform supersampling Nonuniform supersamplingCS348B Lecture 8Pat Hanrahan, Spring 2004Imagers Signal SamplingAll imagers convert a continuous image to adiscrete sampled image by integrating overthe active “area” of a sensor.R L(x,ω, t)P(x)S(t)cosθ dAdω dtT Ω AExamples: Retina: photoreceptors CCD arrayVirtual CG cameras do not integrate,they simply sample radiance along rays CS348B Lecture 8Pat Hanrahan, Spring 2004Page 1

Displays Signal ReconstructionAll physical displays recreate a continuous imagefrom a discrete sampled image by using afinite sized source of light for each pixel.Examples: DACs: sample and hold Cathode ray tube: phosphor spot and gridCRTDACCS348B Lecture 8Pat Hanrahan, Spring 2004Sampling in Computer GraphicsArtifacts due to sampling - Aliasing Jaggies Moire Flickering small objects Sparkling highlights Temporal strobingPreventing these artifacts - AntialiasingCS348B Lecture 8Pat Hanrahan, Spring 2004Page 2

JaggiesRetort sequence by Don MitchellStaircase pattern or jaggiesCS348B Lecture 8Pat Hanrahan, Spring 2004Basic Signal ProcessingPage 3

Fourier TransformsSpectral representation treats the function as aweighted sum of sines and cosinesEach function has two representations Spatial domain - normal representation Frequency domain - spectral representationThe Fourier transform converts between thespatial and frequency domainF (ω ) SpatialDomain f ( x )e iω x dx f ( x) 12π F (ω )eiω xdωFrequencyDomain CS348B Lecture 8Pat Hanrahan, Spring 2004Spatial and Frequency DomainSpatial DomainFrequency DomainCS348B Lecture 8Pat Hanrahan, Spring 2004Page 4

ConvolutionDefinitionh( x ) f g f ( x ′)g( x x ′) dx ′Convolution Theorem: Multiplication in thefrequency domain is equivalent to convolutionin the space domain.f g F GSymmetric Theorem: Multiplication in the spacedomain is equivalent to convolution in thefrequency domain.f g F GCS348B Lecture 8Pat Hanrahan, Spring 2004The Sampling TheoremPage 5

Sampling: Spatial Domain III( x ) n δ ( x nT )n CS348B Lecture 8Pat Hanrahan, Spring 2004Sampling: Frequency Domainfs III(ω ) 1Tωs 2π fs 2πT n δ (ω nω )n sCS348B Lecture 8Pat Hanrahan, Spring 2004Page 6

Reconstruction: Frequency Domain 1 x 1 2II( x ) 0 x 1 2CS348B Lecture 8Pat Hanrahan, Spring 2004Reconstruction: Spatial Domain sinc x sin π xπxCS348B Lecture 8Pat Hanrahan, Spring 2004Page 7

Sampling and Reconstruction CS348B Lecture 8Pat Hanrahan, Spring 2004Sampling TheoremThis result if known as the Sampling Theorem andis due to Claude Shannon who first discoveredit in 1949A signal can be reconstructed from its sampleswithout loss of information, if the originalsignal has no frequencies above 1/2 theSampling frequencyFor a given bandlimited function, the rate atwhich it must be sampled is called the NyquistFrequencyCS348B Lecture 8Pat Hanrahan, Spring 2004Page 8

AliasingUndersampling: Aliasing CS348B Lecture 8Pat Hanrahan, Spring 2004Page 9

Sampling a “Zone Plate”yZone plate:sin x 2 y 2Sampled at 128x128Reconstructed to 512x512Using a 30-wideKaiser windowed sincxLeft rings: part of signalRight rings: prealiasingCS348B Lecture 8Pat Hanrahan, Spring 2004Ideal ReconstructionIdeally, use a perfect low-pass filter - the sincfunction - to bandlimit the sampled signal andthus remove all copies of the spectraintroduced by samplingUnfortunately, The sinc has infinite extent and we must usesimpler filters with finite extents. Physicalprocesses in particular do not reconstructwith sincs The sinc may introduce ringing which areperceptually objectionableCS348B Lecture 8Pat Hanrahan, Spring 2004Page 10

Sampling a “Zone Plate”yZone plate:sin x 2 y 2Sampled at 128x128Reconstructed to 512x512Using optimal cubicxLeft rings: part of signalRight rings: prealiasingMiddle rings: postaliasingCS348B Lecture 8Pat Hanrahan, Spring 2004Mitchell Cubic Filter (12 9 B 6C ) x 3 ( 18 12 B 6C ) x 2 (6 2 B)x 11 32h( x ) ( B 6C ) x (6 B 30C ) x ( 12 B 48C ) x (8 B 24C ) 1 x 26 0otherwise Good: (1/ 3,1/ 3)Properties:n h( x ) 1n B-spline: (1, 0)Catmull-Rom: (0,1/ 2)From Mitchell and NetravaliCS348B Lecture 8Pat Hanrahan, Spring 2004Page 11

AntialiasingAntialiasingAntialiasing Preventing aliasing1. Analytically prefilter the signal Solvable for points, lines and polygons Not solvable in generale.g. procedurally defined images2. Uniform supersampling and resample3. Nonuniform or stochastic samplingCS348B Lecture 8Pat Hanrahan, Spring 2004Page 12

Antialiasing by Prefiltering Frequency SpaceCS348B Lecture 8Pat Hanrahan, Spring 2004Uniform SupersamplingIncreasing the sampling rate moves each copy ofthe spectra further apart, potentially reducingthe overlap and thus aliasingResulting samples must be resampled (filtered) toimage sampling ratePixel ws SamplessSamplesPixelCS348B Lecture 8Pat Hanrahan, Spring 2004Page 13

Point vs. SupersampledPoint4x4 SupersampledCheckerboard sequence by Tom DuffCS348B Lecture 8Pat Hanrahan, Spring 2004Analytic vs. SupersampledExact Area4x4 SupersampledCS348B Lecture 8Pat Hanrahan, Spring 2004Page 14

Distribution of Extrafoveal ConesMonkey eyecone distributionFourier transformYellot theory Aliases replaced by noise Visual system less sensitive to high freq noiseCS348B Lecture 8Pat Hanrahan, Spring 2004Non-uniform SamplingIntuitionUniform sampling The spectrum of uniformly spaced samples is also aset of uniformly spaced spikes Multiplying the signal by the sampling patterncorresponds to placing a copy of the spectrum ateach spike (in freq. space) Aliases are coherent, and very noticableNon-uniform sampling Samples at non-uniform locations have a differentspectrum; a single spike plus noise Sampling a signal in this way converts aliases intobroadband noise Noise is incoherent, and much less objectionableCS348B Lecture 8Pat Hanrahan, Spring 2004Page 15

Jittered SamplingAdd uniform random jitter to each sampleCS348B Lecture 8Pat Hanrahan, Spring 2004Jittered vs. Uniform Supersampling4x4 Jittered SamplingCS348B Lecture 84x4 UniformPat Hanrahan, Spring 2004Page 16

Analysis of JitterNon-uniform samplings( x ) Jittered samplingn δ (x x )n jn j( x )n 1 x 1/ 2j( x ) 0 x 1/ 2J (ω ) sinc ωxn nT jnn 1 22π22π n1 J (ω ) 2 J (ω ) δ (ω ) TT Tn 1 1 sinc 2 ω δ (ω )TS(ω ) CS348B Lecture 8Pat Hanrahan, Spring 2004Poisson Disk SamplingDart throwing algorithmCS348B Lecture 8Pat Hanrahan, Spring 2004Page 17

CS348B Lecture 8 Pat Hanrahan, Spring 2004 Sampling Theorem This result if known as the Sampling Theorem and is due to Claude Shannon who first discovered it in 1949 A signal can be reconstructed from its samples without loss of information, if the original signal has no frequencies above 1/2 the Sampling frequency

Related Documents:

SEISMIC: A Self-Exciting Point Process Model for Predicting Tweet Popularity Qingyuan Zhao Stanford University qyzhao@stanford.edu Murat A. Erdogdu Stanford University erdogdu@stanford.edu Hera Y. He Stanford University yhe1@stanford.edu Anand Rajaraman Stanford University anand@cs.stanford.edu Jure Leskovec Stanford University jure@cs.stanford .

Sampling, Sampling Methods, Sampling Plans, Sampling Error, Sampling Distributions: Theory and Design of Sample Survey, Census Vs Sample Enumerations, Objectives and Principles of Sampling, Types of Sampling, Sampling and Non-Sampling Errors. UNIT-IV (Total Topics- 7 and Hrs- 10)

Computer Science Stanford University ymaniyar@stanford.edu Madhu Karra Computer Science Stanford University mkarra@stanford.edu Arvind Subramanian Computer Science Stanford University arvindvs@stanford.edu 1 Problem Description Most existing COVID-19 tests use nasal swabs and a polymerase chain reaction to detect the virus in a sample. We aim to

Domain Adversarial Training for QA Systems Stanford CS224N Default Project Mentor: Gita Krishna Danny Schwartz Brynne Hurst Grace Wang Stanford University Stanford University Stanford University deschwa2@stanford.edu brynnemh@stanford.edu gracenol@stanford.edu Abstract In this project, we exa

Stanford University Stanford, CA 94305 bowang@stanford.edu Min Liu Department of Statistics Stanford University Stanford, CA 94305 liumin@stanford.edu Abstract Sentiment analysis is an important task in natural language understanding and has a wide range of real-world applications. The typical sentiment analysis focus on

1. Principle of Sampling Concept of sampling Sampling: The procedure used to draw and constitute a sample. The objective of these sampling procedures is to enable a representative sample to be obtained from a lot for analysis 3 Main factors affecting accuracy of results Sampling transport preparation determination QC Sampling is an

2.4. Data quality objectives 7 3. Environmental sampling considerations 9 3.1. Types of samples 9 4. Objectives of sampling programs 10 4.1. The process of assessing site contamination 10 4.2. Characterisation and validation 11 4.3. Sampling objectives 11 5. Sampling design 12 5.1. Probabilistic and judgmental sampling design 12 5.2. Sampling .

Stanford Health Care Organizational Overview 3 Contract Administration is a Shared Service of Stanford Health Care to Eight Other Stanford Medicine Entities Stanford Health are ("SH")is the flagship academic medical center associated with the Stanford University School of Medicine. SHC has 15,232 employees and volunteers, 613 licensed