Sampling and Reconstruction

Similar documents
Sampling and reconstruction

Sampling and reconstruction

Sampling and reconstruction. CS 4620 Lecture 13

Sampling and Reconstruction

Image Filtering and Gaussian Pyramids

Sampling and Reconstruction

Texture mapping from 0 to infinity

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

CS 4501: Introduction to Computer Vision. Filtering and Edge Detection

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

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

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

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

Aliasing and Antialiasing. What is Aliasing? What is Aliasing? What is Aliasing?

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

ECE 484 Digital Image Processing Lec 09 - Image Resampling

Antialiasing and Related Issues

Motion illusion, rotating snakes

Last Lecture. photomatix.com

Motivation: Image denoising. How can we reduce noise in a photograph?

Last Lecture. photomatix.com

Motivation: Image denoising. How can we reduce noise in a photograph?

CSCI 1290: Comp Photo

Filters. Materials from Prof. Klaus Mueller

02/02/10. Image Filtering. Computer Vision CS 543 / ECE 549 University of Illinois. Derek Hoiem

CS 775: Advanced Computer Graphics. Lecture 12 : Antialiasing

Announcements. Image Processing. What s an image? Images as functions. Image processing. What s a digital image?

1.Discuss the frequency domain techniques of image enhancement in detail.

Filters. Motivating Example. Tracking a fly, oh my! Moving Weighted Average Filter. General Picture

CS 465 Prelim 1. Tuesday 4 October hours. Problem 1: Image formats (18 pts)

DIGITAL SIGNAL PROCESSING. Chapter 1 Introduction to Discrete-Time Signals & Sampling

>>> from numpy import random as r >>> I = r.rand(256,256);

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

Filtering in the spatial domain (Spatial Filtering)

Lecture Schedule: Week Date Lecture Title

Module 3 : Sampling and Reconstruction Problem Set 3

Image Pyramids. Sanja Fidler CSC420: Intro to Image Understanding 1 / 35

Image Processing for Mechatronics Engineering For senior undergraduate students Academic Year 2017/2018, Winter Semester

PROBLEM SET 6. Note: This version is preliminary in that it does not yet have instructions for uploading the MATLAB problems.

Raster Graphics. Overview קורס גרפיקה ממוחשבת 2008 סמסטר ב' What is an image? What is an image? Image Acquisition. Image display 5/19/2008.

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

Image features: Histograms, Aliasing, Filters, Orientation and HOG. D.A. Forsyth

CEE598 - Visual Sensing for Civil Infrastructure Eng. & Mgmt.

Image Filtering. Median Filtering

ELEC Dr Reji Mathew Electrical Engineering UNSW

Fourier analysis of images

Image Processing (EA C443)

CS534 Introduction to Computer Vision. Linear Filters. Ahmed Elgammal Dept. of Computer Science Rutgers University

Advanced Audiovisual Processing Expected Background

image Scanner, digital camera, media, brushes,

Sampling and Pyramids

4/9/2015. Simple Graphics and Image Processing. Simple Graphics. Overview of Turtle Graphics (continued) Overview of Turtle Graphics

Filip Malmberg 1TD396 fall 2018 Today s lecture

Image Enhancement using Histogram Equalization and Spatial Filtering

MULTIMEDIA SYSTEMS

Image Interpolation. Image Processing

Unit 1.1: Information representation

ELEC Dr Reji Mathew Electrical Engineering UNSW

Sampling and pixels. CS 178, Spring Marc Levoy Computer Science Department Stanford University. Begun 4/23, finished 4/25.

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

High Dynamic Range Imaging

Signals and Systems. Lecture 13 Wednesday 6 th December 2017 DR TANIA STATHAKI

Image filtering, image operations. Jana Kosecka

Multirate DSP, part 1: Upsampling and downsampling

Prof. Feng Liu. Fall /04/2018

IMAGE ENHANCEMENT IN SPATIAL DOMAIN

Image Processing COS 426

Matlab (see Homework 1: Intro to Matlab) Linear Filters (Reading: 7.1, ) Correlation. Convolution. Linear Filtering (warm-up slide) R ij

Sampling and Signal Processing

Image Filtering in Spatial domain. Computer Vision Jia-Bin Huang, Virginia Tech

Signals and Systems Using MATLAB

>>> from numpy import random as r >>> I = r.rand(256,256);

Sampling and Reconstruction of Analog Signals

Computer Vision, Lecture 3

Prof. Vidya Manian Dept. of Electrical and Comptuer Engineering

The Intuitions of Signal Processing (for Motion Editing)

Sampling Rate = Resolution Quantization Level = Color Depth = Bit Depth = Number of Colors

A Spatial Mean and Median Filter For Noise Removal in Digital Images

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

Images and Filters. EE/CSE 576 Linda Shapiro

FFT analysis in practice

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

Developing a Versatile Audio Synthesizer TJHSST Senior Research Project Computer Systems Lab

Table of contents. Vision industrielle 2002/2003. Local and semi-local smoothing. Linear noise filtering: example. Convolution: introduction

Frequency Domain Enhancement

Subband coring for image noise reduction. Edward H. Adelson Internal Report, RCA David Sarnoff Research Center, Nov

Transforms and Frequency Filtering

Image Processing for feature extraction

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

Part II Data Communications

DOWNLOAD PDF THEORY AND AUDIO APPLICATION OF DIGITAL SIGNAL PROCESSING

Experiments #6. Convolution and Linear Time Invariant Systems

Non Linear Image Enhancement

Study guide for Graduate Computer Vision

SECTION I - CHAPTER 2 DIGITAL IMAGING PROCESSING CONCEPTS

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

The Scientist and Engineer's Guide to Digital Signal Processing By Steven W. Smith, Ph.D.

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

Multirate Digital Signal Processing

CoE4TN4 Image Processing. Chapter 3: Intensity Transformation and Spatial Filtering

Transcription:

Sampling and reconstruction COMP 575/COMP 770 Fall 2010 Stephen J. Guy 1

Review What is Computer Graphics? Computer graphics: The study of creating, manipulating, and using visual images in the computer. Computer graphics: Mathematics made visible. 2

Review Types of graphics Imaging Modeling Rendering Animation Hardware 3

Topics What is an image? Trade-offs in representations What is Sampling? What is Reconstruction? What is Filtering? What does any of this have to do with computer graphics? 4

[FvDFH fig.14.14b / Wolberg] Sampled representations How to store and compute with continuous functions? Common scheme for representation: samples write down the function s values at many points 5

[FvDFH fig.14.14b / Wolberg] Reconstruction Making samples back into a continuous function for output (need realizable method) for analysis or processing (need mathematical method) amounts to guessing what the function did in between 6

Filtering Processing done on a function can be executed in continuous form (e.g. analog circuit) but can also be executed using sampled representation Simple example: smoothing by averaging 7

What s a digital image? A (rectilinear) 2D array of pixels What s a pixel? A little square? NO! A pixel is a discrete sample of a continuous image! 8 Continuous Image Digital Image

Image Acquisition Pixels are samples from a continuous function Photoreceptors in your eyes CCD in camera Rays in a virtual camera 9

Image Reconstruction Generate continuous image from discrete samples Example: cathode ray tube 10

Image Resolution Intensity Resolution Each pixel has Depth bits to represent color or intensity Spatial Resolution Image has Width x Height pixels Temporal resolution Monitors refresh at Rate Hz 11

Sources of Error Intensity quantization Not enough intensity resolution Spatial aliasing Not enough spatial resolution Temporal aliasing Not enough temporal resolution 12

Topics What is an image? Trade-offs in representations What is Sampling? What is Reconstruction? What is Filtering? What does any of this have to do with computer graphics? 13

Roots of sampling Nyquist 1928; Shannon 1949 famous results in information theory 1940s: first practical uses in telecommunications 1960s: first digital audio systems 1970s: commercialization of digital audio 1982: introduction of the Compact Disc the first high-profile consumer application This is why all the terminology has a communications or audio flavor early applications are 1D; for us 2D (images) is important 14

Sampling in digital audio Recording: sound to analog to samples to disc Playback: disc to samples to analog to sound again how can we be sure we are filling in the gaps correctly? 15

Undersampling What if we missed things between the samples? Simple example: undersampling a sine wave unsurprising result: information is lost surprising result: indistinguishable from lower frequency also was always indistinguishable from higher frequencies aliasing: signals traveling in disguise as other frequencies 16

Preventing aliasing Introduce lowpass filters: remove high frequencies leaving only safe, low frequencies choose lowest frequency in reconstruction (disambiguate) 17

Topics What is an image? Trade-offs in representations What is Sampling? What is Reconstruction? What is Filtering? What does any of this have to do with computer graphics? 18

Linear filtering: a key idea Transformations on signals; e.g.: bass/treble controls on stereo blurring/sharpening operations in image editing smoothing/noise reduction in tracking Key properties linearity: filter(f + g) = filter(f) + filter(g) shift invariance: behavior invariant to shifting the input delaying an audio signal sliding an image around Can be modeled mathematically by convolution 19

Convolution warm-up basic idea: define a new function by averaging over a sliding window a simple example to start off: smoothing 20

Convolution warm-up Same moving average operation, expressed mathematically: 21

Discrete convolution Simple averaging: every sample gets the same weight Convolution: same idea but with weighted average each sample gets its own weight (normally zero far away) This is all convolution is: it is a moving weighted average 22

Filters Sequence of weights a[j] is called a filter Filter is nonzero over its region of support usually centered on zero: support radius r Filter is normalized so that it sums to 1.0 this makes for a weighted average, not just any old weighted sum Most filters are symmetric about 0 since for images we usually want to treat left and right the same a box filter 23

Convolution and filtering Can express sliding average as convolution with a box filter a box = [, 0, 1, 1, 1, 1, 1, 0, ] 24

Example: box and step 25

Convolution and filtering Convolution applies with any sequence of weights Example: bell curve (gaussian-like) [, 1, 4, 6, 4, 1, ]/16 26

And in pseudocode 27

Discrete convolution Notation: Convolution is a multiplication-like operation commutative associative distributes over addition scalars factor out identity: unit impulse e = [, 0, 0, 1, 0, 0, ] Conceptually no distinction between filter and signal 28

Discrete filtering in 2D Same equation, one more index now the filter is a rectangle you slide around over a grid of numbers Commonly applied to images blurring (using box, using gaussian, ) sharpening (impulse minus blur) Usefulness of associativity often apply several filters one after another: (((a * b 1 ) * b 2 ) * b 3 ) this is equivalent to applying one filter: a * (b 1 * b 2 * b 3 ) 29

And in pseudocode 30

hilip Greenspun] original box blur sharpened gaussian blur 31

Optimization: separable filters basic alg. is O(r 2 ): large filters get expensive fast! definition: a 2 (x,y) is separable if it can be written as: this is a useful property for filters because it allows factoring: 32

Separable filtering - Gausian second, convolve with this first, convolve with this 33

Topics What is an image? Trade-offs in representations What is Sampling? What is Reconstruction? What is Filtering? What does any of this have to do with computer graphics? 34

AntiAliasing in RayTracing Aliased Image Mathematical Truth 35

AntiAliasing in RayTracing Aliased Image Fix Aliasing with More Samples! Mathematical Truth 36

AntiAliasing in RayTracing Aliased Image Mathematical Truth 37

Comparison 1 Sample / Pixel 9 Samples / Pixel 38

Continuous convolution: warm-up Can apply sliding-window average to a continuous function just as well output is continuous integration replaces summation 39

Continuous convolution Sliding average expressed mathematically: note difference in normalization (only for box) Convolution just adds weights weighting is now by a function weighted integral is like weighted average again bounds are set by support of f(x) 40

One more convolution Continuous discrete convolution used for reconstruction and resampling 41

Continuous-discrete convolution 42

Resampling Changing the sample rate in images, this is enlarging and reducing Creating more samples: increasing the sample rate upsampling enlarging Ending up with fewer samples: decreasing the sample rate downsampling reducing 43

Resampling Reconstruction creates a continuous function forget its origins, go ahead and sample it 44

And in pseudocode 45

Cont. disc. convolution in 2D same convolution just two variables now loop over nearby pixels, average using filter weight looks like discrete filter, but offsets are not integers and filter is continuous remember placement of filter relative to grid is variable 46 46

Cont. disc. convolution in 2D 47