The main goal of Computer Graphics is to generate 2D images 2D images are continuous 2D functions (or signals)

Similar documents
Motivation. The main goal of Computer Graphics is to generate 2D images. 2D images are continuous 2D functions (or signals)

To Do. Advanced Computer Graphics. Sampling and Reconstruction. Outline. Sign up for Piazza

Sampling and Reconstruction

Reading. 2. Fourier analysis and sampling theory. Required: Watt, Section 14.1 Recommended:

Aliasing. Can t draw smooth lines on discrete raster device get staircased lines ( jaggies ):

Theoretically Perfect Sensor

Theoretically Perfect Sensor

Fourier analysis and sampling theory

Outline. Sampling and Reconstruction. Sampling and Reconstruction. Foundations of Computer Graphics (Fall 2012)

Aliasing and Antialiasing. ITCS 4120/ Aliasing and Antialiasing

Outline. Foundations of Computer Graphics (Spring 2012)

Computer Graphics. Texture Filtering & Sampling Theory. Hendrik Lensch. Computer Graphics WS07/08 Texturing

Computer Graphics. Sampling Theory & Anti-Aliasing. Philipp Slusallek

Lecture 2: 2D Fourier transforms and applications

Advanced Computer Graphics. Aliasing. Matthias Teschner. Computer Science Department University of Freiburg

Lecture 5: Frequency Domain Transformations

Continuous Space Fourier Transform (CSFT)

CS354 Computer Graphics Sampling and Aliasing

Basics. Sampling and Reconstruction. Sampling and Reconstruction. Outline. (Spatial) Aliasing. Advanced Computer Graphics (Fall 2010)

Drawing a Triangle (and an introduction to sampling)

Sampling and Monte-Carlo Integration

Computer Vision and Graphics (ee2031) Digital Image Processing I

Image Filtering, Warping and Sampling

Image Processing, Warping, and Sampling

Sampling: Application to 2D Transformations

Phys. 428, Lecture 6

Drawing a Triangle (and an Intro to Sampling)

Biomedical Image Analysis. Homomorphic Filtering and applications to PET

Signals and Sampling. CMPT 461/761 Image Synthesis Torsten Möller. Machiraju/Möller

Introduction to Computer Vision. Week 3, Fall 2010 Instructor: Prof. Ko Nishino

CoE4TN4 Image Processing. Chapter 5 Image Restoration and Reconstruction

COMP 9517 Computer Vision

Aliasing And Anti-Aliasing Sampling and Reconstruction

1-D Sampling. Letf s = 1/T be the sampling frequency. What is the relationship between S(e jω ) and G(f)? S(e jω ) = 1. Intuition Scale frequencies

Digital Image Processing. Lecture 6

EECS 556 Image Processing W 09. Interpolation. Interpolation techniques B splines

Image warping introduction

Sampling, Aliasing, & Mipmaps

Biomedical Image Analysis. Spatial Filtering

Edges, interpolation, templates. Nuno Vasconcelos ECE Department, UCSD (with thanks to David Forsyth)

DIGITAL IMAGE WARPING. abstract of Digital Image Warping. George Wolberg, IEEE Computer Society Press

Sampling, Resampling, and Warping. COS 426, Spring 2014 Tom Funkhouser

Image Warping: A Review. Prof. George Wolberg Dept. of Computer Science City College of New York

CS4670: Computer Vision

Tutorial 5. Jun Xu, Teaching Asistant March 2, COMP4134 Biometrics Authentication

Fourier Transform and Texture Filtering

Fourier transform of images

Computer Vision. Fourier Transform. 20 January Copyright by NHL Hogeschool and Van de Loosdrecht Machine Vision BV All rights reserved

Lecture 6 Basic Signal Processing

Image preprocessing in spatial domain

Image preprocessing in spatial domain

Central Slice Theorem

Computer Vision: 4. Filtering. By I-Chen Lin Dept. of CS, National Chiao Tung University

Filters and Fourier Transforms

Sampling, Aliasing, & Mipmaps

1. No calculators or other electronic devices are allowed during this exam.

Sampling and Reconstruction

Computer Vision 2. SS 18 Dr. Benjamin Guthier Professur für Bildverarbeitung. Computer Vision 2 Dr. Benjamin Guthier

Image Processing: Discrete Images

Lecture 6: Edge Detection

Image Processing Lecture 10

EECS490: Digital Image Processing. Lecture #16

Image Acquisition Image Digitization Spatial domain Intensity domain Image Characteristics

28 SAMPLING. ALIASING AND ANTI-ALIASING

Anti-aliasing and sampling

Image Reconstruction from Projection

Image Enhancement in Spatial Domain. By Dr. Rajeev Srivastava

The simplest and most obvious method to go from a continuous to a discrete image is by point sampling,

3. Image formation, Fourier analysis and CTF theory. Paula da Fonseca

Image processing in frequency Domain

Edge and local feature detection - 2. Importance of edge detection in computer vision

Image Restoration. Yao Wang Polytechnic Institute of NYU, Brooklyn, NY 11201

ME/CS 132: Introduction to Vision-based Robot Navigation! Low-level Image Processing" Larry Matthies"

Amortized Supersampling

Overview. Spectral Processing of Point- Sampled Geometry. Introduction. Introduction. Fourier Transform. Fourier Transform

Solutions to Midterm Exam

Point and Spatial Processing

PSD2B Digital Image Processing. Unit I -V

convolution shift invariant linear system Fourier Transform Aliasing and sampling scale representation edge detection corner detection

Super-Resolution. Many slides from Miki Elad Technion Yosi Rubner RTC and more

Rasterization. Rasterization (scan conversion) Digital Differential Analyzer (DDA) Rasterizing a line. Digital Differential Analyzer (DDA)

Visual Pathways to the Brain

ELEC Dr Reji Mathew Electrical Engineering UNSW

CPSC 4040/6040 Computer Graphics Images. Joshua Levine

Sampling, Aliasing, & Mipmaps

x' = c 1 x + c 2 y + c 3 xy + c 4 y' = c 5 x + c 6 y + c 7 xy + c 8

Chapter6 Image Reconstruction

Image Processing and Analysis

Digital Image Processing. Image Enhancement in the Frequency Domain

Fourier Transform in Image Processing. CS/BIOEN 6640 U of Utah Guido Gerig (slides modified from Marcel Prastawa 2012)

Sampling II, Anti-aliasing, Texture Filtering

Image restoration. Lecture 14. Milan Gavrilovic Centre for Image Analysis Uppsala University

To Do. Advanced Computer Graphics. Discrete Convolution. Outline. Outline. Implementing Discrete Convolution

Fall CSCI 420: Computer Graphics. 7.1 Rasterization. Hao Li.

Computer Graphics - Week 8

Analysis of Planar Anisotropy of Fibre Systems by Using 2D Fourier Transform

CS4442/9542b Artificial Intelligence II prof. Olga Veksler

Lecture 8: Jointly distributed random variables

Texture. Outline. Image representations: spatial and frequency Fourier transform Frequency filtering Oriented pyramids Texture representation

Distribution Ray-Tracing. Programação 3D Simulação e Jogos

Transcription:

Motivation The main goal of Computer Graphics is to generate 2D images 2D images are continuous 2D functions (or signals) monochrome f(x,y) or color r(x,y), g(x,y), b(x,y) These functions are represented by a 2D set of discrete samples (pixels) Sampling can cause artifacts (=Aliasing) 2

Examples - Moiré Patterns 3

Examples - Jaggies Staircase effect at borders 4

Temporal Aliasing time real (continuous) motion sampled (perceived) motion 5

Aliasing in Computer Graphics Aliasing effects: loss of detail Moiré patterns jaggies Appear in texture mapping scan conversion of geometry raytracing 6

Sampling and Reconstruction 7

Example Point Sampling 8

Signal Processing Aliasing is well understood in signal processing Interpret images as 2D signals Aliasing = sampling of L 2 -functions below the Nyquist frequency u Nyquist = 2 u signal 9

Spectrum of an Image What is u signal of an image f(x,y)? Use Fourier analysis (1D first) Represent f(x) as a sum of harmonic waves: F j 2π u x f(x) = F(u)e du The amplitudes F(u) of waves with frequency u (spectrum) are computed as j 2π u x = f(x)e dx { f(x) } F(u) = 10

Avoiding Aliasing Let W be the maximum u for which F(u) >0 Either choose u sampling > 2W Or zero all F(u) for u > ½ u sampling i.e. low pass filter the signal Smoothing of image before sampling! e.g. Mip mapping: decreasing sampling rate, increased smoothing 11

1D Fourier Transform Fourier transform F Inverse transform F j 2π u x = f(x)e dx { f(x) } F(u) = -1 j 2π u x { F(u) } f(x) = = F(u)e du 12

1D Discrete Fourier Transform Discrete transform F(k) = 1 1 N N i= 0 f(i)e j 2π k i N Discrete inverse x = i x, u = k u N f(i) = = k 1 0 F(k)e Heisenberg resolution bounds j 2π k i N x u 1 4π 13

F F { f(x,y) } -1 Discrete setting = F(u,v) = { F(u,v) } = f(x,y) = 2D Fourier Transforms f(x,y)e f(x,y)e j 2π(u x+ v y) j 2π(u x+ v y) dx dy du dv F(u,v) = 1 1 1 M N M N x= 0 y= 0 f(x,y)e u x v y j 2π( + M N ) f(x,y) = M 1 N 1 u= 0 v= 0 F(u,v)e u x v y j 2π( + M N ) 14

Example: 2D Fourier Transforms rect(x,y) sinc(x,y) sine cardinal: sinc( x) = 1 sin( x) / x x = 0 otherwise 15

Reconstruction f(i x) g(x) x x reconstruction filter x f(x) x f(x) N = i=1 f ( i x) g( x i x) x 16

Convolutions f(x)*g(x) = f(α) g(x α) dα f(x) g(x) x x f(α) g(x-α) x α 17

Convolutions f(x) δ(x) x x Discrete setting f(x)* δ (x) = f(α)δ(x α)dα = f(x) f(x)*g(x) = M 1 m= 0 f(m) g(x m) 18

Convolutions 2D convolution as a separable TP-extension f(x,y)*g(x,y) = f(α, β) g(x α,y β)dα dβ Discrete form f(x,y)*g(x,y) = M 1 N 1 m= 0 n= 0 f(m,n) g(x m,y n) 19

Convolutions Convolution theorem f(x)*g(x) F(u)G(u) f(x)g(x) F(u)*G(u) For function of finite energy (L 2 ) f 2 = f,f = f(x) dx 2 < 20

Aliasing Sampling = multiplication with sequence of delta functions (impulse train) 21

Aliasing Multiplication converts to convolution in Fourier domain 22

Aliasing Convolution with sequence of delta functions = periodization 23

Aliasing Overlap of Fourier transforms leads to aliasing 24

Aliasing Reconstruction = Low pass filtering 25

Aliasing-free Reconstruction Spatial Domain Frequency Domain Spatial Domain Frequency Domain 26

Occurrence of Aliasing Spatial Domain Frequency Domain Spatial Domain Frequency Domain 27

2D Sampling 2D impulse fields f(x,y) δ(x x0,y y0 )dx dy = f(x0,y0 ) 28

Periodic spectrum of band limited sampled function Fourier Domain 29

Reconstruction Antialiasing Windowing spectrum using filters Simple f(x,y) = G(u,v) [ S(u,v)*F(u,v) ] where G(u,v) = 1 0 (u,v) else within Bounding Box of R 30

2D Sampling Theorem Sampling rate is bounded by u v Finite, discrete setting = = x y 1 N x 1 N y 1 2W u 1 2W v 31

32

Spectral Analysis Geometry 33

Antialiasing Filters in Practice Properties of a good low pass filter 34

Antialiasing Filters B-Spline filters of order n x 1 1 sin ω/ 2 sin π f g (x) 2 1 = = = 0 x > 1 ω/ 2 π f 2 sin c f Increase order by repeated convolution g n (x) = g 1(x)*g 1(x)* *g 1(x) sin c n f 35

36 Antialiasing Filters Gaussian filters Sinc-filter > = = c c c c c g x x sin x sinc ω ω ω ω ω ω ω ω 0 1 2 1 ) ( ) ( ) ( π π ) ( ) ( ) ( ω σ π ω π σ /σ / ω σ σ σ / σ 2 2 2 2 2 2 2 1 2 2 2 2 1 g e G e x g x = = =

Filters and Fourier Transforms 37

Filtering in Texture Space and Screen Space 38

The Concept of Resampling Filters Perspective projection of a textured surface Non-uniform sampling pattern on screen Optimal resampling filter is spatially variant 39

Projection and Image Warping Affine Mapping Projective Mapping 40

Relations between Texture and Image Space Texture space Image space warp 1. 4. 2. 3. 41

Spatially Variant Filtering Screen Space Texture Space 42

Antialiasing in Raytracing Supersampling Pixel 43

Jittering Random Perturbation of Sampling Positions 44

Poisson Sampling vs. Jittering 45

Supersampling & Jittering 4 Rays/Pixel Jitter=0.3 46

Supersampling & Jittering Jitter=0.5 Jitter=1.0 47

Supersampling & Jittering 4 Rays/Pixel Jitter=0.3 48

Supersampling & Jittering Jitter=0.5 Jitter=1.0 49

Adaptive Supersampling 50

Adaptive Supersampling 51