Fourier Transforms.

Slides:



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

Fourier Transform (Chapter 4)
Fourier Transform – Chapter 13. Image space Cameras (regardless of wave lengths) create images in the spatial domain Pixels represent features (intensity,
Lecture05 Transform Coding.
Vector Spaces Space of vectors, closed under addition and scalar multiplication.
Reminder Fourier Basis: t  [0,1] nZnZ Fourier Series: Fourier Coefficient:
Chapter 4 Image Enhancement in the Frequency Domain.
Chap 4-2. Frequency domain processing Jen-Chang Liu, 2006.
Fourier Transform Analytic geometry gives a coordinate system for describing geometric objects. Fourier transform gives a coordinate system for functions.
Image Enhancement in the Frequency Domain Part I Image Enhancement in the Frequency Domain Part I Dr. Samir H. Abdul-Jauwad Electrical Engineering Department.
Some Properties of the 2-D Fourier Transform Translation Distributivity and Scaling Rotation Periodicity and Conjugate Symmetry Separability Convolution.
Chapter 4 Image Enhancement in the Frequency Domain.
Transforms: Basis to Basis Normal Basis Hadamard Basis Basis functions Method to find coefficients (“Transform”) Inverse Transform.
Basic Image Processing January 26, 30 and February 1.
Digital Image Processing, 2nd ed. © 2002 R. C. Gonzalez & R. E. Woods Chapter 4 Image Enhancement in the Frequency Domain Chapter.
Systems: Definition Filter
Topic 7 - Fourier Transforms DIGITAL IMAGE PROCESSING Course 3624 Department of Physics and Astronomy Professor Bob Warwick.
Image Processing Fourier Transform 1D Efficient Data Representation Discrete Fourier Transform - 1D Continuous Fourier Transform - 1D Examples.
Transforms. 5*sin (2  4t) Amplitude = 5 Frequency = 4 Hz seconds A sine wave.
Image Processing © 2002 R. C. Gonzalez & R. E. Woods Lecture 4 Image Enhancement in the Frequency Domain Lecture 4 Image Enhancement.
Effective Computation of Linear Filters The following properties are used to shorten the computation time f  g = g  f, f  (g  h) = (f  g)  h, f 
Chapter 7: The Fourier Transform 7.1 Introduction
Part I: Image Transforms DIGITAL IMAGE PROCESSING.
09/19/2002 (C) University of Wisconsin 2002, CS 559 Last Time Color Quantization Dithering.
1 © 2010 Cengage Learning Engineering. All Rights Reserved. 1 Introduction to Digital Image Processing with MATLAB ® Asia Edition McAndrew ‧ Wang ‧ Tseng.
EE104: Lecture 5 Outline Review of Last Lecture Introduction to Fourier Transforms Fourier Transform from Fourier Series Fourier Transform Pair and Signal.
Chapter 4 Fourier transform Prepared by Dr. Taha MAhdy.
Lecture 7: Sampling Review of 2D Fourier Theory We view f(x,y) as a linear combination of complex exponentials that represent plane waves. F(u,v) describes.
ENG4BF3 Medical Image Processing Image Enhancement in Frequency Domain.
DCT.
Chapter 5: Neighborhood Processing
Inverse DFT. Frequency to time domain Sometimes calculations are easier in the frequency domain then later convert the results back to the time domain.
7- 1 Chapter 7: Fourier Analysis Fourier analysis = Series + Transform ◎ Fourier Series -- A periodic (T) function f(x) can be written as the sum of sines.
Image as a linear combination of basis images
Fourier Transform.
CS 376b Introduction to Computer Vision 03 / 17 / 2008 Instructor: Michael Eckmann.
 Introduction to reciprocal space
Image hole-filling. Agenda Project 2: Will be up tomorrow Due in 2 weeks Fourier – finish up Hole-filling (texture synthesis) Image blending.
Lecture 5: Fourier and Pyramids
2D Fourier Transform.
Digital Image Processing Lecture 9: Filtering in Frequency Domain Prof. Charlene Tsai.
Frequency domain analysis and Fourier Transform
Fourier transform.
Fourier Transform (Chapter 4) CS474/674 – Prof. Bebis.
Digital Image Processing Lecture 8: Fourier Transform Prof. Charlene Tsai.
Jean Baptiste Joseph Fourier
… Sampling … … Filtering … … Reconstruction …
Image Enhancement in the
The Chinese University of Hong Kong
(C) 2002 University of Wisconsin, CS 559
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.
All about convolution.
Fourier Transform Analytic geometry gives a coordinate system for describing geometric objects. Fourier transform gives a coordinate system for functions.
ENG4BF3 Medical Image Processing
Outline Linear Shift-invariant system Linear filters
Fourier Transform Analytic geometry gives a coordinate system for describing geometric objects. Fourier transform gives a coordinate system for functions.
2D Fourier transform is separable
Outline Linear Shift-invariant system Linear filters
CSCE 643 Computer Vision: Thinking in Frequency
Image Processing, Leture #14
Digital Image Processing
Basic Image Processing
Fourier Transform Analytic geometry gives a coordinate system for describing geometric objects. Fourier transform gives a coordinate system for functions.
Uses of filters To remove unwanted components in a signal
Digital Image Procesing Unitary Transforms Discrete Fourier Trasform (DFT) in Image Processing DR TANIA STATHAKI READER (ASSOCIATE PROFFESOR) IN SIGNAL.
Digital Image Procesing Unitary Transforms Discrete Fourier Trasform (DFT) in Image Processing DR TANIA STATHAKI READER (ASSOCIATE PROFFESOR) IN SIGNAL.
Lecture 4 Image Enhancement in Frequency Domain
All about convolution.
The Frequency Domain Any wave shape can be approximated by a sum of periodic (such as sine and cosine) functions. a--amplitude of waveform f-- frequency.
Even Discrete Cosine Transform The Chinese University of Hong Kong
Presentation transcript:

Fourier Transforms

Fourier transform for 1D images A 1D image with N pixels is a vector of size N Every basis has N pixels There must be N basis elements n-th element of k-th basis in standard basis 𝐸 𝑘 𝑛 = 1 𝑖𝑓 𝑘=𝑛 0 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒 n-th element of k-th basis in Fourier basis 𝐵 𝑘 𝑛 = 𝑒 𝑖2𝜋𝑘𝑛 𝑁

Fourier transform for 1D images Converting from standard basis to Fourier basis = Fourier transform 𝑋 𝑘 = 𝑛 𝑥 𝑛 𝑒 − 𝑖2𝜋𝑘𝑛 𝑁 Note that can be written as a matrix multiplication with X and x as vectors 𝑋=𝐵𝑥 Convert from Fourier basis to standard basis 𝑥 𝑛 = 𝑘 𝑋 𝑘 𝑒 𝑖2𝜋𝑘𝑛 𝑁

Fourier transform Problem: basis is complex, but signal is real? Combine a pair of conjugate basis elements 𝐵 𝑁−𝑘 n = 𝑒 𝑖2𝜋 𝑁−𝑘 𝑛 𝑁 = 𝑒 𝑖2𝜋𝑛 − 𝑖2𝜋𝑘𝑛 𝑁 = 𝑒 − 𝑖2𝜋𝑘𝑛 𝑁 = 𝐵 −𝑘 𝑛 Consider 𝐵 −𝑁/2 to 𝐵 𝑁/2 as basis elements Real signals will have same coefficients for 𝐵 𝑘 and 𝐵 −𝑘

Visualizing the Fourier basis for 1D images

Fourier transform Signal impulse cos impulse cos

Fourier transform for images Images are 2D arrays Fourier basis for 1D array indexed by frequence Fourier basis elements are indexed by 2 spatial frequencies (i,j)th Fourier basis for N x N image Has period N/i along x Has period N/j along y 𝐵 𝑘,𝑙 𝑥,𝑦 = 𝑒 2𝜋𝑖𝑘𝑥 𝑁 + 2𝜋𝑖𝑙𝑦 𝑁 =cos 2𝜋𝑘𝑥 𝑁 + 2𝜋𝑙𝑦 𝑁 +𝑖 sin ( 2𝜋𝑘𝑥 𝑁 + 2𝜋𝑙𝑦 𝑁 )

Visualizing the Fourier basis for images 𝐵 1,1 𝐵 3,20 𝐵 0,0 𝐵 10,1

Visualizing the Fourier transform Given NxN image, there are NxN basis elements Fourier coefficients can be represented as an NxN image

Converting to and from the Fourier basis Given an image f, Fourier coefficients F How do we get f from F? 𝑓= 𝑘,𝑙 𝐹 𝑘,𝑙 𝐵 𝑘,𝑙 𝑓 𝑚,𝑛 = 𝑘,𝑙 𝐹 𝑘,𝑙 𝑒 𝑖 2𝜋𝑘𝑚 𝑁 + 2𝜋𝑙𝑛 𝑁 “Inverse Fourier Transform” How do we get F from f? 𝐹 𝑘,𝑙 = 𝑚,𝑛 𝑓 𝑚,𝑛 𝑒 −𝑖 2𝜋𝑘𝑚 𝑁 + 2𝜋𝑖𝑙𝑛 𝑁 “Fourier Transform”

Why Fourier transforms? Think of image in terms of low and high frequency information Low frequency: large scale structure, no details High frequency: fine structure

Why Fourier transforms?

Why Fourier transforms?

Why Fourier transforms? Removing high frequency components looks like blurring. Is there more to this relationship?

Dual domains Image: Spatial domain Fourier Transform: Frequency domain Amplitudes are called spectrum For any transformations we do in spatial domain, there are corresponding transformations we can do in the frequency domain And vice-versa Spatial Domain

Dual domains Convolution in spatial domain = Point-wise multiplication in frequency domain Convolution in frequency domain = Point-wise multiplication in spatial domain

Fourier transform Signal impulse cos impulse cos

Fourier transform Signal box “sinc” = sin(x)/x “sinc” = sin(x)/x box

Fourier transform Signal Gaussian Gaussian

Fourier transform Signal Gaussian Gaussian

Fourier transform Image

Fourier transform Image

Detour: Time complexity of convolution Image is w x h Filter is k x k Every entry takes O(k2) operations Number of output entries: (w+k-1)(h+k-1) for full wh for same Total time complexity: O(whk2)

Optimization: separable filters basic alg. is O(r2): large filters get expensive fast! definition: w(x,y) is separable if it can be written as: Write u as a k x 1 filter, and v as a 1 x k filter Claim:

Separable filters u1 u2 u3 * v1 v2 v3 u1 u2 u3 u3 u2 u1 u1v1

Separable filters u1 u2 u3 * v1 v2 v3 u1 u2 u3 u3 u2 u1 u1v1 u1v2

Separable filters u1 u2 u3 * v1 v2 v3 u1 u2 u3 u3 u2 u1 u1v1 u1v2 u1v3

* Separable filters u1 u2 u3 v1 v2 v3 u1 u2 u3 u3 u2 u1 u1v1 u1v2 u1v3

* Separable filters u1 u2 u3 v1 v2 v3 u1 u2 u3 u3 u2 u1 u1v1 u1v2 u1v3

* Separable filters u1 u2 u3 v1 v2 v3 u1 u2 u3 u3 u2 u1 u1v1 u1v2 u1v3

* Separable filters u1 u2 u3 v1 v2 v3 u1 u2 u3 u3 u2 u1 u1v1 u1v2 u1v3

* Separable filters u1 u2 u3 v1 v2 v3 u1 u2 u3 u3 u2 u1 u1v1 u1v2 u1v3

* Separable filters w u1 u2 u3 v1 v2 v3 u1 u2 u3 u3 u2 u1 u1v1 u1v2

Separable filters Time complexity of original : O(whk2) Time complexity of separable version : O(whk)