Sampling and Reconstruction

Similar documents
Aliasing and Antialiasing. What is Aliasing? What is Aliasing? What is Aliasing?

Module 3 : Sampling and Reconstruction Problem Set 3

SAMPLING THEORY. Representing continuous signals with discrete numbers

Computer Graphics (Fall 2011) Outline. CS 184 Guest Lecture: Sampling and Reconstruction Ravi Ramamoorthi

2D Discrete Fourier Transform

Exercise Problems: Information Theory and Coding

Filters. Materials from Prof. Klaus Mueller

!"!#"#$% Lecture 2: Media Creation. Some materials taken from Prof. Yao Wang s slides RECAP

Sampling and Signal Processing

Multirate Signal Processing Lecture 7, Sampling Gerald Schuller, TU Ilmenau

ECE 2111 Signals and Systems Spring 2012, UMD Experiment 9: Sampling

Chapter-2 SAMPLING PROCESS

Sampling Theory. CS5625 Lecture Steve Marschner. Cornell CS5625 Spring 2016 Lecture 7

Antialiasing and Related Issues

ECE 484 Digital Image Processing Lec 09 - Image Resampling

Sampling and Reconstruction of Analog Signals

Fourier Transform. Any signal can be expressed as a linear combination of a bunch of sine gratings of different frequency Amplitude Phase

Advanced Digital Signal Processing Part 2: Digital Processing of Continuous-Time Signals

06: Thinking in Frequencies. CS 5840: Computer Vision Instructor: Jonathan Ventura

Biomedical Signals. Signals and Images in Medicine Dr Nabeel Anwar

Digital Processing of Continuous-Time Signals

6 Sampling. Sampling. The principles of sampling, especially the benefits of coherent sampling

Digital Processing of

Computer Vision, Lecture 3

Sistemas de Aquisição de Dados. Mestrado Integrado em Eng. Física Tecnológica 2015/16 Aula 3-29 de Setembro

6.02 Practice Problems: Modulation & Demodulation

Image Scaling. This image is too big to fit on the screen. How can we reduce it? How to generate a halfsized

Lecture Schedule: Week Date Lecture Title

DISCRETE FOURIER TRANSFORM AND FILTER DESIGN

+ a(t) exp( 2πif t)dt (1.1) In order to go back to the independent variable t, we define the inverse transform as: + A(f) exp(2πif t)df (1.

ME scope Application Note 01 The FFT, Leakage, and Windowing

Design of FIR Filters

Digital Signal Processing for Audio Applications

Sampling of Continuous-Time Signals. Reference chapter 4 in Oppenheim and Schafer.

Fourier Transform Pairs

Filter Banks I. Prof. Dr. Gerald Schuller. Fraunhofer IDMT & Ilmenau University of Technology Ilmenau, Germany. Fraunhofer IDMT

TRANSFORMS / WAVELETS

Image Processing. Image Processing. What is an Image? Image Resolution. Overview. Sources of Error. Filtering Blur Detect edges

PHYS 352. FFT Convolution. More Advanced Digital Signal Processing Techniques

CT111 Introduction to Communication Systems Lecture 9: Digital Communications

EECE 301 Signals & Systems Prof. Mark Fowler

Overview. M. Xiao CommTh/EES/KTH. Wednesday, Feb. 17, :00-12:00, B23

EE 215 Semester Project SPECTRAL ANALYSIS USING FOURIER TRANSFORM

Choosing the Best ADC Architecture for Your Application Part 3:

YEDITEPE UNIVERSITY ENGINEERING FACULTY COMMUNICATION SYSTEMS LABORATORY EE 354 COMMUNICATION SYSTEMS

Concordia University. Discrete-Time Signal Processing. Lab Manual (ELEC442) Dr. Wei-Ping Zhu

Data Acquisition Systems. Signal DAQ System The Answer?

System Identification & Parameter Estimation

Image Sampling. Moire patterns. - Source: F. Durand

Frequency Domain Enhancement

Digital Image Processing COSC 6380/4393

קורס גרפיקה ממוחשבת 2008 סמסטר ב' Image Processing 1 חלק מהשקפים מעובדים משקפים של פרדו דוראנד, טומס פנקהאוסר ודניאל כהן-אור

Introduction to Wavelets. For sensor data processing

Part 2: Fourier transforms. Key to understanding NMR, X-ray crystallography, and all forms of microscopy

ENGR 210 Lab 12: Sampling and Aliasing

The Fast Fourier Transform

Digital Signal Processing

Digital Image Processing

Transforms and Frequency Filtering

Pulse Code Modulation (PCM)

Chapter 6 CONTINUOUS-TIME, IMPULSE-MODULATED, AND DISCRETE-TIME SIGNALS. 6.6 Sampling Theorem 6.7 Aliasing 6.8 Interrelations

Image Processing. What is an image? קורס גרפיקה ממוחשבת 2008 סמסטר ב' Converting to digital form. Sampling and Reconstruction.

Moving from continuous- to discrete-time

CS4495/6495 Introduction to Computer Vision. 2C-L3 Aliasing

Notes on Fourier transforms

Digital Filters IIR (& Their Corresponding Analog Filters) Week Date Lecture Title

Islamic University of Gaza. Faculty of Engineering Electrical Engineering Department Spring-2011

Topic 2. Signal Processing Review. (Some slides are adapted from Bryan Pardo s course slides on Machine Perception of Music)

Prof. Feng Liu. Fall /04/2018

Outline. Discrete time signals. Impulse sampling z-transform Frequency response Stability INF4420. Jørgen Andreas Michaelsen Spring / 37 2 / 37

G(f ) = g(t) dt. e i2πft. = cos(2πf t) + i sin(2πf t)

Convolution Pyramids. Zeev Farbman, Raanan Fattal and Dani Lischinski SIGGRAPH Asia Conference (2011) Julian Steil. Prof. Dr.

Analysis and design of filters for differentiation

Harmonic Analysis. Purpose of Time Series Analysis. What Does Each Harmonic Mean? Part 3: Time Series I

Multirate Digital Signal Processing

Application of Fourier Transform in Signal Processing

Image Resizing. Reminder no class next Tuesday, but your problem set is due. 9/19/08 Comp 665 Image Resizing 1

Chapter 5 Window Functions. periodic with a period of N (number of samples). This is observed in table (3.1).

Chapter 7. Introduction. Analog Signal and Discrete Time Series. Sampling, Digital Devices, and Data Acquisition

Sampling and Pulse Trains

ELEC Dr Reji Mathew Electrical Engineering UNSW

ANALOGUE AND DIGITAL COMMUNICATION

Fourier Signal Analysis

Understanding Digital Signal Processing

Signals and Systems Lecture 6: Fourier Applications

FFT analysis in practice

The Discrete Fourier Transform. Claudia Feregrino-Uribe, Alicia Morales-Reyes Original material: Dr. René Cumplido

Discrete-Time Signal Processing (DTSP) v14

Wavelet Transform. From C. Valens article, A Really Friendly Guide to Wavelets, 1999

Discrete Fourier Transform (DFT)

Signals and Systems Lecture 6: Fourier Applications

Experiment 8: Sampling

ECEGR Lab #8: Introduction to Simulink

ECE 556 BASICS OF DIGITAL SPEECH PROCESSING. Assıst.Prof.Dr. Selma ÖZAYDIN Spring Term-2017 Lecture 2

Chapter 2: Digitization of Sound

Proceedings of the 5th WSEAS Int. Conf. on SIGNAL, SPEECH and IMAGE PROCESSING, Corfu, Greece, August 17-19, 2005 (pp17-21)

System analysis and signal processing

DFT: Discrete Fourier Transform & Linear Signal Processing

DIGITAL SIGNAL PROCESSING CCC-INAOE AUTUMN 2015

Signal Characteristics

Transcription:

Sampling and Reconstruction Peter Rautek, Eduard Gröller, Thomas Theußl Institute of Computer Graphics and Algorithms Vienna University of Technology

Motivation Theory and practice of sampling and reconstruction Aliasing Understanding the problem Handling the problem Examples: Photography/Video Rendering Computed Tomography Collision detection Eduard Gröller, Thomas Theußl, Peter Rautek 1

Overview Introduction Tools for Sampling and Reconstruction Fourier Transform Convolution (dt.: Faltung) Convolution Theorem Filtering Sampling The mathematical model Reconstruction Sampling Theorem Reconstruction in Practice Eduard Gröller, Thomas Theußl, Peter Rautek 2

Image Data Demo - Scan Lines - Sampling http://www.cs.brown.edu/exploratories/freesoftware/repository/edu/brown/cs/exploratories/applets/sampling/introduction_to_sampling_java_browser.html Eduard Gröller, Thomas Theußl, Peter Rautek 3

Image Storage and Retrieval Eduard Gröller, Thomas Theußl, Peter Rautek 4

Sampling Problems Eduard Gröller, Thomas Theußl, Peter Rautek 5

Overview Introduction Tools for Sampling and Reconstruction Fourier Transform Convolution (dt.: Faltung) Convolution Theorem Filtering Sampling The mathematical model Reconstruction Sampling Theorem Reconstruction in Practice Eduard Gröller, Thomas Theußl, Peter Rautek 6

Sampling Theory Relationship between signal and samples View image data as signals Signals are plotted as intensity vs. spatial domain Signals are represented as sum of sine waves - frequency domain Eduard Gröller, Thomas Theußl, Peter Rautek 7

Square Wave Approximation Eduard Gröller, Thomas Theußl, Peter Rautek 8

Fourier Series Eq1: f( x) a 2 0 An cos( nx n) n1 Eq2: f( x) a 2 0 an cos( nx) bn sin( nx) n1 Eq3: f( x) c e inx n n Euler s identity: e ix cos x i sin x Eduard Gröller, Thomas Theußl, Peter Rautek 9

Fourier Transform Link between spatial and frequency domain F(ω) f( x) f( x) e F(ω) e 2πiωx 2πiωx dx d Eduard Gröller, Thomas Theußl, Peter Rautek 10

Box & Tent Eduard Gröller, Thomas Theußl, Peter Rautek 11

Square Wave & Scanline Eduard Gröller, Thomas Theußl, Peter Rautek 12

Fourier Transform Yields complex functions for frequency domain Extends to higher dimensions Complex part is phase information - usually ignored in explanation and visual analysis Alternative: Hartley transform Wavelet transform Eduard Gröller, Thomas Theußl, Peter Rautek 13

Discrete Fourier Transform For discrete signals (i.e., sets of samples) Complexity for N samples: DFT O(N²) f( x) F(ω) N-1 ω0 1 N F(ω) e N-1 ω0 Fast FT (FFT): O(N log N) 2jx f(x) e N -2jx N Demo - Fast Fourier Transform - Different Frequencies http://www.cs.brown.edu/exploratories/freesoftware/repository/edu/brown/cs/exploratories/applets/fft1dapp/1d_fast_fourier_transform_java_browser.html Eduard Gröller, Thomas Theußl, Peter Rautek 14

Overview Introduction Tools for Sampling and Reconstruction Fourier Transform Convolution (dt.: Faltung) Convolution Theorem Filtering Sampling The mathematical model Reconstruction Sampling Theorem Reconstruction in Practice Eduard Gröller, Thomas Theußl, Peter Rautek 15

Convolution Operation on two functions Result: Sliding weighted average of a function The second function provides the weights ( f g)( x) f ( x ) g( ) d Demo - Copying (Dirac Pulse) - Averaging (Box Filter) http://www.cs.brown.edu/exploratories/freesoftware/repository/edu/brown/cs/exploratories/applets/convolution/convolution_java_browser.html Eduard Gröller, Thomas Theußl, Peter Rautek 16

Convolution - Examples Eduard Gröller, Thomas Theußl, Peter Rautek 17

Convolution Theorem The spectrum of the convolution of two functions is equivalent to the product of the transforms of both input signals, and vice versa. f 1 f 2 F F 1 2 F 1 F 2 f 1 f 2 Eduard Gröller, Thomas Theußl, Peter Rautek 18

Example - Low-Pass Low-pass filtering performed on Mandrill scanline Spatial domain: convolution with sinc function Frequency domain: cutoff of high frequencies - multiplication with box filter Sinc function corresponds to box function and vice versa! Eduard Gröller, Thomas Theußl, Peter Rautek 19

Low-Pass in Spatial Domain 1 Eduard Gröller, Thomas Theußl, Peter Rautek 20

Low-Pass in Spatial Domain 2 Eduard Gröller, Thomas Theußl, Peter Rautek 21

Overview Introduction Tools for Sampling and Reconstruction Fourier Transform Convolution (dt.: Faltung) Convolution Theorem Filtering Sampling The mathematical model Reconstruction Sampling Theorem Reconstruction in Practice Eduard Gröller, Thomas Theußl, Peter Rautek 22

Sampling The process of sampling is a multiplication of the signal with a comb function f s ( x ) f ( x ) comb ( ) T x The frequency response is convolved with a transformed comb function. F s ( ) F( ) comb ( ) 1 T Eduard Gröller, Thomas Theußl, Peter Rautek 23

Base Functions Dirac Pulse Comb Function Eduard Gröller, Thomas Theußl, Peter Rautek 24

FT of Base Functions Comb function: comb T ( x) comb 1 T (ω) Eduard Gröller, Thomas Theußl, Peter Rautek 25

Overview Introduction Tools for Sampling and Reconstruction Fourier Transform Convolution (dt.: Faltung) Convolution Theorem Filtering Sampling The mathematical model Reconstruction Sampling Theorem Reconstruction in Practice Eduard Gröller, Thomas Theußl, Peter Rautek 26

Reconstruction Recovering the original function from a set of samples Sampling theorem Ideal reconstruction Sinc function Reconstruction in practice Eduard Gröller, Thomas Theußl, Peter Rautek 27

Definitions A function is called band-limited if it contains no frequencies outside the interval [-u,u]. u is called the bandwidth of the function The Nyquist frequency of a function is twice its bandwidth, i.e., w = 2u Eduard Gröller, Thomas Theußl, Peter Rautek 28

Sampling Theorem A function f(x) that is band-limited and sampled above the Nyquist frequency is completely determined by its samples. Eduard Gröller, Thomas Theußl, Peter Rautek 29

Sampling at Nyquist Frequency Eduard Gröller, Thomas Theußl, Peter Rautek 30

Sampling Below Nyquist Frequency Demo - Under sampling - Nyquist Frequency http://www.cs.brown.edu/exploratories/freesoftware/repository/edu/brown/cs/exploratories/applets/nyquist/nyquist_limit_java_browser.html Eduard Gröller, Thomas Theußl, Peter Rautek 31

Ideal Reconstruction Replicas in frequency domain must not overlap Multiplying the frequency response with a box filter of the width of the original bandwidth restores original Amounts to convolution with Sinc function Eduard Gröller, Thomas Theußl, Peter Rautek 32

Sinc Function Infinite in extent Ideal reconstruction filter FT of box function sinc( x) sinx πx 1 if if x x 0 0 Eduard Gröller, Thomas Theußl, Peter Rautek 33

Sinc & Truncated Sinc Eduard Gröller, Thomas Theußl, Peter Rautek 34

Reconstruction: Examples Sampling and reconstruction of the Mandrill image scanline signal with adequate sampling rate with inadequate sampling rate demonstration of band-limiting With Sinc and tent reconstruction kernels Eduard Gröller, Thomas Theußl, Peter Rautek 35

Adequate Sampling Rate Eduard Gröller, Thomas Theußl, Peter Rautek 36

Adequate Sampling Rate Eduard Gröller, Thomas Theußl, Peter Rautek 37

Inadequate Sampling Rate Eduard Gröller, Thomas Theußl, Peter Rautek 38

Inadequate Sampling Rate Eduard Gröller, Thomas Theußl, Peter Rautek 39

Band-Limiting a Signal Eduard Gröller, Thomas Theußl, Peter Rautek 40

Band-Limiting a Signal Eduard Gröller, Thomas Theußl, Peter Rautek 41

Reconstruction in Practice Problem: which reconstruction kernel should be used? Genuine Sinc function unusable in practice Truncated Sinc often sub-optimal Various approximations exist; none is optimal for all purposes Eduard Gröller, Thomas Theußl, Peter Rautek 42

Tasks of Reconstruction Filters Remove the extraneous replicas of the frequency response Retain the original undistorted frequency response Eduard Gröller, Thomas Theußl, Peter Rautek 43

Used Reconstruction Filters Nearest neighbour Linear interpolation Symmetric cubic filters Windowed Sinc More sophisticated ways of truncating the Sinc function Eduard Gröller, Thomas Theußl, Peter Rautek 44

Box & Tent Responses Eduard Gröller, Thomas Theußl, Peter Rautek 45

Windowed Sinc Responses Eduard Gröller, Thomas Theußl, Peter Rautek 46

Sampling & Reconstruction Errors Aliasing: due to overlap of original frequency response with replicas - information loss Truncation Error: due to use of a finite reconstruction filter instead of the infinite Sinc filter Non-Sinc error: due to use of a reconstruction filter that has a shape different from the Sinc filter Eduard Gröller, Thomas Theußl, Peter Rautek 47

Interpolation - Zero Insertion Operates on series of n samples Takes advantage of DFT properties Algorithm: Perform DFT on series Append zeros to the sequence Perform the inverse DFT Eduard Gröller, Thomas Theußl, Peter Rautek 48

Zero Insertion - Properties Preserves frequency spectrum Original signal has to be sampled above Nyquist frequency Values can only be interpolated at evenly spaced locations The whole series must be accessible, and it is always completely processed Eduard Gröller, Thomas Theußl, Peter Rautek 49

Zero Insertion - Original Series Eduard Gröller, Thomas Theußl, Peter Rautek 50

Zero Insertion - Interpolation Eduard Gröller, Thomas Theußl, Peter Rautek 51

Conclusion Sampling Going from continuous to discrete signal Mathematically modeled with a multiplication with comb function Sampling theorem: How many samples are needed Reconstruction Sinc is the ideal filter but not practicable Reconstruction in practice Aliasing Eduard Gröller, Thomas Theußl, Peter Rautek 52

Summary (1) Eduard Gröller, Thomas Theußl, Peter Rautek 53

Summary (2) Eduard Gröller, Thomas Theußl, Peter Rautek 54

Summary (3) Eduard Gröller, Thomas Theußl, Peter Rautek 55

Sampling and Reconstruction References: Computer Graphics: Principles and Practice, 2nd Edition, Foley, vandam, Feiner, Hughes, Addison-Wesley, 1990 What we need around here is more aliasing, Jim Blinn, IEEE Computer Graphics and Applications, January 1989 Return of the Jaggy, Jim Blinn, IEEE Computer Graphics and Applications, March 1989 Demo Applets, Brown University, Rhode Island, USA http://www.cs.brown.edu/exploratories/freesoftware/home.html Eduard Gröller, Thomas Theußl, Peter Rautek 56

Questions Eduard Gröller, Thomas Theußl, Peter Rautek 57