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.

Slides:



Advertisements
Similar presentations
Sampling, Aliasing.
Advertisements

Sampling and Reconstruction
David Luebke 1 4/28/2015 Aliasing & Antialiasing.
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
Convolution, Edge Detection, Sampling : Computational Photography Alexei Efros, CMU, Fall 2006 Some slides from Steve Seitz.
CSCE 641 Computer Graphics: Image Sampling and Reconstruction Jinxiang Chai.
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.
Immagini e filtri lineari. Image Filtering Modifying the pixels in an image based on some function of a local neighborhood of the pixels
Advanced Computer Graphics (Spring 2006) COMS 4162, Lecture 3: Sampling and Reconstruction Ravi Ramamoorthi
CS5520 Image-Based Rendering © Chun-Fa Chang, Spring 2003 Sampling Theorem & Antialiasing April 15, 2003.
Advanced Computer Graphics (Spring 2005) COMS 4162, Lecture 7: Review, Reconstruction Ravi Ramamoorthi
University of British Columbia CPSC 414 Computer Graphics © Tamara Munzner 1 Sampling Week 7, Fri 17 Oct 2003 p1 demos sampling.
Sampling COS 323, Spring Signal Processing Sampling a continuous functionSampling a continuous function 
1 Images and Transformations Images by Pawan SinhaPawan Sinha.
Advanced Computer Graphics (Spring 2005) COMS 4162, Lecture 3: Sampling and Reconstruction Ravi Ramamoorthi
CIS 681 Distributed Ray Tracing. CIS 681 Anti-Aliasing Graphics as signal processing –Scene description: continuous signal –Sample –digital representation.
Leo Lam © Signals and Systems EE235. Transformers Leo Lam ©
CSC418 Computer Graphics n Aliasing n Texture mapping.
Leo Lam © Signals and Systems EE235. Leo Lam © Futile Q: What did the monsterous voltage source say to the chunk of wire? A: "YOUR.
Advanced Computer Graphics CSE 190 [Spring 2015], Lecture 3 Ravi Ramamoorthi
Computer Vision Spring ,-685 Instructor: S. Narasimhan Wean 5403 T-R 3:00pm – 4:20pm.
CS 431/636 Advanced Rendering Techniques
… Representation of a CT Signal Using Impulse Functions
© 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.
Fourier representation for discrete-time signals And Sampling Theorem
Antialiasing CptS 548 Advanced Computer Graphics John C. Hart.
Leo Lam © Signals and Systems EE235 Lecture 28.
Signals and Systems Jamshid Shanbehzadeh.
Filtering Robert Lin April 29, Outline Why filter? Filtering for Graphics Sampling and Reconstruction Convolution The Fourier Transform Overview.
09/19/2002 (C) University of Wisconsin 2002, CS 559 Last Time Color Quantization Dithering.
Image Processing Basics. What are images? An image is a 2-d rectilinear array of pixels.
CMSC 635 Sampling and Antialiasing. Aliasing in images.
Fundamentals of Digital Signal Processing. Fourier Transform of continuous time signals with t in sec and F in Hz (1/sec). Examples:
Leo Lam © Signals and Systems EE235 Leo Lam.
Lecture 7 Transformations in frequency domain 1.Basic steps in frequency domain transformation 2.Fourier transformation theory in 1-D.
Sampling Pixel is an area!! – Square, Rectangular, or Circular? How do we approximate the area? – Why bother? Color of one pixel Image Plane Areas represented.
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
1 Dr. Scott Schaefer Antialiasing. 2/70 What is aliasing?
David Luebke 3/17/2016 Advanced Computer Graphics Antialiasing David Luebke
The Fourier Transform.
CIS 681 Distributed Ray Tracing. CIS 681 Anti-Aliasing Graphics as signal processing –Scene description: continuous signal –Sample –digital representation.
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
… Sampling … … Filtering … … Reconstruction …
Distributed Ray Tracing
Sampling Theorem & Antialiasing
Lecture Signals with limited frequency range
Sampling and Reconstruction
(C) 2002 University of Wisconsin, CS 559
Sampling and Antialiasing
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.
Image Acquisition.
Joshua Barczak CMSC435 UMBC
The Z-Transform of a given discrete signal, x(n), is given by:
CSCE 643 Computer Vision: Image Sampling and Filtering
Sampling and Reconstruction
Distributed Ray Tracing
IMAGE SAMPLING AND IMAGE QUANTIZATION 1. Introduction
Chapter 3 Sampling.
CSC418 Computer Graphics Aliasing Texture mapping.
Distributed Ray Tracing
Color Perception of color Color spaces
Presentation transcript:

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 one X Scalar multiply –C = a A –a (A + B) = a A + a B –(a+b) A = a A + b A

Abstract Vector Spaces Inner or Dot Product –b = a (A B) = a A B = A a B –A A ≥ 0; A A = 0 iff A = 0 –A B = (B A) *

Vectors and Discrete Functions VectorDiscrete Function V = (1, 2, 4)V[I] = {1, 2, 4} a V + b Ua V[I] + b U[I] V U∑ (V[I] U * [I])

Vectors and Discrete Functions 2 t in terms of t 0, t 1, t 2 = [1,.5,.5] 2t2t 1tt2t2

Vectors and Discrete Functions 2 t in terms of t 0, t 0.5, t 1, t 1.5, t 2 2t2t 1t 0.5 tt 1.5 t2t2

Vectors and Functions VectorDiscreteContinuous VV[I]V(x) a V + b Ua V[I] + b U[I]a V(x) + b U(x) V U∑ V[I] U * [I]∫ V(x) U * (x) dx

Vectors and Functions 2 t projected onto 1, t, t 2 2t2t 1tt2t2

Function Bases Time:  (t) Polynomial / Power Series: t n Discrete Fourier: e i π t K/N / √2N –K, N integers –t, K  [-N, N] –(where e i  = cos  + i sin  ) Continuous Fourier: e i  t / √2π

Fourier Transforms Discrete Time Continuous Time Discrete Frequency Discrete Fourier Transform Fourier Series Continuous Frequency Discrete-time Fourier Transform Fourier Transform

Convolution f(t) g(t)  F(  ) * G(  ) g(t) * f(t)  F(  ) G(  ) Where f(t) * g(t) = ∫ f(s) g(t-s) ds –Dot product with shifted kernel

Filtering Filter in frequency domain –FT signal to frequency domain –Multiply signal & filter –FT signal back to time domain Filter in time domain –FT filter to time domain –Convolve signal & filter

Sampling Multiply signal by pulse train

Aliasing High frequencies alias as low frequencies

Aliasing in images

Antialiasing Blur away frequencies that would alias Blur preferable to aliasing Filter kernel size –IIR = infinite impulse response –FIR = finite impulse response Windowed filters

“Ideal” Low pass filter eliminates all high freq –box in frequency domain –sinc in spatial domain (sin x / x) –Possible negative results –Infinite kernel Exact reconstruction to Nyquist limit –Sample frequency ≥ 2x highest frequency –Exact only if reconstructing with ideal low- pass filter (=sinc)

Reconstruction Convolve samples & reconstruction filter Sum weighted kernel functions

Ideal Continuous Image Filtering & Reconstruction Sample Reconstruction Filter Sampled Image Pixels Continuous Display

Filtered Continuous Image Ideal Continuous Image Sampled Image Pixels Filtering, Sampling, Reconstruction Continuous Display Filter Sample Reconstruction Filter

Combine Filter & Sample Can combine filter and sample –Evaluate convolution at samples Ideal Continuous Image Sampled Image Pixels Continuous Display Sampling Filter Reconstruction Filter

Analytic Area Sampling Compute “area” of pixel covered Box in spatial domain –Nice finite kernel easy to compute –sinc in freq domain Plenty of high freq still aliases

Analytic higher order filtering Fold better filter into rasterization –Can make rasterization much harder –Usually just done for lines Draw with filter kernel “paintbrush” Only practical for finite filters

Supersampling Numeric integration of filter Grid with equal weight = box filter Push up Nyquist frequency –Edges: ∞ frequency, still alias Other filters: –Grid with unequal weights –Priority sampling

Adaptive sampling Vary numerical integration step More samples in high contrast areas Easy with ray tracing, harder for others Possible bias

Stochastic sampling Monte-Carlo integration of filter Sample distribution –Poisson disk –Jittered grid Aliasing  Noise

Resampling Resampled Image Pixels Continuous Image Reconstruction Filter Sampling Filter Image Pixels

Resampling Resampled Image Pixels Resampling Filter Image Pixels