Fourier Analysis 15-463: Rendering and Image Processing Alexei Efros.

Slides:



Advertisements
Similar presentations
Computer Vision Spring ,-685 Instructor: S. Narasimhan Wean Hall 5409 T-R 10:30am – 11:50am.
Advertisements

Linear Filtering – Part II Selim Aksoy Department of Computer Engineering Bilkent University
CS 691 Computational Photography Instructor: Gianfranco Doretto Frequency Domain.
Ted Adelson’s checkerboard illusion. Motion illusion, rotating snakes.
Computer Vision University of Illinois Derek Hoiem
Linear Filtering – Part II Selim Aksoy Department of Computer Engineering Bilkent University
Reminder Fourier Basis: t  [0,1] nZnZ Fourier Series: Fourier Coefficient:
Image Filtering, Part 2: Resampling Today’s readings Forsyth & Ponce, chapters Forsyth & Ponce –
Convolution, Edge Detection, Sampling : Computational Photography Alexei Efros, CMU, Fall 2006 Some slides from Steve Seitz.
Sampling and Pyramids : Rendering and Image Processing Alexei Efros …with lots of slides from Steve Seitz.
Image transformations, Part 2 Prof. Noah Snavely CS1114
Immagini e filtri lineari. Image Filtering Modifying the pixels in an image based on some function of a local neighborhood of the pixels
Image Sampling Moire patterns
Lecture 3: Edge detection, continued
CSCE 641 Computer Graphics: Fourier Transform Jinxiang Chai.
Lecture 4: Image Resampling CS4670: Computer Vision Noah Snavely.
Fourier Analysis Without Tears : Computational Photography Alexei Efros, CMU, Fall 2005 Somewhere in Cinque Terre, May 2005.
The Frequency Domain : Computational Photography Alexei Efros, CMU, Fall 2011 Somewhere in Cinque Terre, May 2005 Many slides borrowed from Steve.
Lecture 3: Image Resampling CS4670: Computer Vision Noah Snavely Nearest-neighbor interpolation Input image 3x upsample hq3x interpolation (ZSNES)
Convolution and Edge Detection : Computational Photography Alexei Efros, CMU, Fall 2005 Some slides from Steve Seitz.
CPSC 641 Computer Graphics: Fourier Transform Jinxiang Chai.
Computer Vision - A Modern Approach Set: Pyramids and Texture Slides by D.A. Forsyth Scaled representations Big bars (resp. spots, hands, etc.) and little.
The Frequency Domain : Computational Photography Alexei Efros, CMU, Fall 2008 Somewhere in Cinque Terre, May 2005 Many slides borrowed from Steve.
Computational Photography: Fourier Transform Jinxiang Chai.
Slides from Alexei Efros, Steve Marschner Filters & fourier theory.
Image Sampling Moire patterns -
Image Sampling CSE 455 Ali Farhadi Many slides from Steve Seitz and Larry Zitnick.
Computer Vision Spring ,-685 Instructor: S. Narasimhan Wean 5403 T-R 3:00pm – 4:20pm.
Computer Vision Spring ,-685 Instructor: S. Narasimhan Wean 5409 T-R 10:30am – 11:50am.
CSE 185 Introduction to Computer Vision Image Filtering: Frequency Domain.
The Frequency Domain Somewhere in Cinque Terre, May 2005 Many slides borrowed from Steve Seitz CS194: Image Manipulation & Computational Photography Alexei.
Recap of Friday linear Filtering convolution differential filters
CSC589 Introduction to Computer Vision Lecture 7 Thinking in Frequency Bei Xiao.
Image Resampling CS4670: Computer Vision Noah Snavely.
CSE 185 Introduction to Computer Vision Image Filtering: Frequency Domain.
Image Resampling CS4670: Computer Vision Noah Snavely.
Lecture 3: Edge detection CS4670/5670: Computer Vision Kavita Bala From Sandlot ScienceSandlot Science.
09/19/2002 (C) University of Wisconsin 2002, CS 559 Last Time Color Quantization Dithering.
Mestrado em Ciência de Computadores Mestrado Integrado em Engenharia de Redes e Sistemas Informáticos VC 14/15 – TP6 Frequency Space Miguel Tavares Coimbra.
Thinking in Frequency Computational Photography University of Illinois Derek Hoiem 09/01/15.
Computer Vision Spring ,-685 Instructor: S. Narasimhan Wean 5403 T-R 3:00pm – 4:20pm.
CS559: Computer Graphics Lecture 4: Compositing and Resampling Li Zhang Spring 2008.
The Frequency Domain : Computational Photography Alexei Efros, CMU, Fall 2010 Somewhere in Cinque Terre, May 2005 Many slides borrowed from Steve.
Recap of Monday linear Filtering convolution differential filters filter types boundary conditions.
Image as a linear combination of basis images
Lecture 5: Fourier and Pyramids
Projects Project 1a due this Friday Project 1b will go out on Friday to be done in pairs start looking for a partner now.
Last Lecture photomatix.com. Today Image Processing: from basic concepts to latest techniques Filtering Edge detection Re-sampling and aliasing Image.
Frequency domain analysis and Fourier Transform
The Frequency Domain, without tears
Image Resampling & Interpolation
Slow mo guys – Saccades
Many slides from Steve Seitz and Larry Zitnick
Lecture 1.26 Spectral analysis of periodic and non-periodic signals.
Image Sampling Moire patterns
Miguel Tavares Coimbra
Gonzalez & Woods, and Efros)
Frequency domain analysis and Fourier Transform
The Frequency Domain : Computational Photography
Image Sampling Moire patterns
More Image Manipulation
CSCE 643 Computer Vision: Thinking in Frequency
Samuel Cheng Slide credits: Noah Snavely
Filtering Part 2: Image Sampling
Image Sampling Moire patterns
Instructor: S. Narasimhan
Fourier Analysis Without Tears
Image Resampling & Interpolation
Resampling.
Samuel Cheng Slide credits: Noah Snavely
Presentation transcript:

Fourier Analysis : Rendering and Image Processing Alexei Efros

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

Image sub-sampling Throw away every other row and column to create a 1/2 size image - called image sub-sampling 1/4 1/8 Slide by Steve Seitz

Image sub-sampling 1/4 (2x zoom) 1/8 (4x zoom) Why does this look so crufty? 1/2 Slide by Steve Seitz

Even worse for synthetic images Slide by Steve Seitz

Really bad in video Slide by Paul Heckbert

Alias: n., an assumed name Picket fence receding Into the distance will produce aliasing… Input signal: x = 0:.05:5; imagesc(sin((2.^x).*x)) Matlab output: WHY? Aj-aj-aj: Alias! Not enough samples

Aliasing occurs when your sampling rate is not high enough to capture the amount of detail in your image Can give you the wrong signal/image—an alias Where can it happen in graphics? During image synthesis: sampling continous singal into discrete signal e.g. ray tracing, line drawing, function plotting, etc. During image processing: resampling discrete signal at a different rate e.g. Image warping, zooming in, zooming out, etc. To do sampling right, need to understand the structure of your signal/image Enter Monsieur Fourier…

Jean Baptiste Fourier ( ) had crazy idea (1807): Any periodic function can be rewritten as a weighted sum of sines and cosines of different frequencies. Don’t believe it? Neither did Lagrange, Laplace, Poisson and other big wigs Not translated into English until 1878! But it’s true! called Fourier Series

A sum of sines Our building block: Add enough of them to get any signal f(x) you want! How many degrees of freedom? What does each control? Which one encodes the coarse vs. fine structure of the signal?

Fourier Transform We want to understand the frequency  of our signal. So, let’s reparametrize the signal by  instead of x: f(x) F(  ) Fourier Transform F(  ) f(x) Inverse Fourier Transform For every  from 0 to inf, F(  ) holds the amplitude A and phase  of the corresponding sine How can F hold both? Complex number trick! We can always go back:

Frequency Spectra Usually, amplitude is more interesting than phase:

FT: Just a change of basis * = M * f(x) = F(  )

IFT: Just a change of basis * = M -1 * F(  ) = f(x)

Finally: Scary Math

…not really scary: is hiding our old friend: So it’s just our signal f(x) times sine at frequency  phase can be encoded by sin/cos pair

Extension to 2D in Matlab, check out: imagesc(log(abs(fftshift(fft2(im)))));

This is the magnitude transform of the cheetah pic

This is the phase transform of the cheetah pic

This is the magnitude transform of the zebra pic

This is the phase transform of the zebra pic

Curious things about FT on images The magnitude spectra of all natural images quite similar Heavy on low-frequencies, falling off in high frequences Will any image be like that, or is it a property of the world we live in? Most information in the image is carried in the phase, not the amplitude Seems to be a fact of life Not quite clear why

Reconstruction with zebra phase, cheetah magnitude

Reconstruction with cheetah phase, zebra magnitude

Various Fourier Transform Pairs Important facts The Fourier transform is linear There is an inverse FT if you scale the function’s argument, then the transform’s argument scales the other way. This makes sense --- if you multiply a function’s argument by a number that is larger than one, you are stretching the function, so that high frequencies go to low frequencies The FT of a Gaussian is a Gaussian. The convolution theorem The Fourier transform of the convolution of two functions is the product of their Fourier transforms The inverse Fourier transform of the product of two Fourier transforms is the convolution of the two inverse Fourier transforms Slide by David Forsyth

2D convolution theorem example * f(x,y)f(x,y) h(x,y)h(x,y) g(x,y)g(x,y) |F(s x,s y )| |H(s x,s y )| |G(s x,s y )| Slide by Steve Seitz

Low-pass, Band-pass, High-pass filters low-pass: band-pass: what’s high-pass?