Fourier transform.

Slides:



Advertisements
Similar presentations
Fourier Transform and its Application in Image Processing
Advertisements

Fourier Transform (Chapter 4)
Frequency Domain The frequency domain
Chapter Four Image Enhancement in the Frequency Domain.
© by Yu Hen Hu 1 ECE533 Digital Image Processing Image Enhancement in Frequency Domain.
Chap 4 Image Enhancement in the Frequency Domain.
Digital Image Processing
Lecture05 Transform Coding.
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.
MSP15 The Fourier Transform (cont’) Lim, MSP16 The Fourier Series Expansion Suppose g(t) is a transient function that is zero outside the interval.
Sampling, Reconstruction, and Elementary Digital Filters R.C. Maher ECEN4002/5002 DSP Laboratory Spring 2002.
Digital Image Processing Chapter 4: Image Enhancement in the Frequency Domain.
Image Enhancement in the Frequency Domain Part I Image Enhancement in the Frequency Domain Part I Dr. Samir H. Abdul-Jauwad Electrical Engineering Department.
Digital Image Processing Chapter 4: Image Enhancement in the Frequency Domain.
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.
DREAM PLAN IDEA IMPLEMENTATION Introduction to Image Processing Dr. Kourosh Kiani
Input image Output image Transform equation All pixels Transform equation.
Digital Image Processing, 2nd ed. © 2002 R. C. Gonzalez & R. E. Woods Chapter 4 Image Enhancement in the Frequency Domain Chapter.
Discrete Time Periodic Signals A discrete time signal x[n] is periodic with period N if and only if for all n. Definition: Meaning: a periodic signal keeps.
Goals For This Class Quickly review of the main results from last class Convolution and Cross-correlation Discrete Fourier Analysis: Important Considerations.
G52IIP, School of Computer Science, University of Nottingham 1 Image Transforms Fourier Transform Basic idea.
Topic 7 - Fourier Transforms DIGITAL IMAGE PROCESSING Course 3624 Department of Physics and Astronomy Professor Bob Warwick.
Motivation Music as a combination of sounds at different frequencies
Digital Image Processing Chapter # 4 Image Enhancement in Frequency Domain Digital Image Processing Chapter # 4 Image Enhancement in Frequency Domain.
Transforms. 5*sin (2  4t) Amplitude = 5 Frequency = 4 Hz seconds A sine wave.
Chapter 4: Image Enhancement in the Frequency Domain Chapter 4: Image Enhancement in the Frequency Domain.
Image Processing © 2002 R. C. Gonzalez & R. E. Woods Lecture 4 Image Enhancement in the Frequency Domain Lecture 4 Image Enhancement.
Image Enhancement in the Frequency Domain Spring 2006, Jen-Chang Liu.
Chapter 7: The Fourier Transform 7.1 Introduction
Part I: Image Transforms DIGITAL IMAGE PROCESSING.
1 © 2010 Cengage Learning Engineering. All Rights Reserved. 1 Introduction to Digital Image Processing with MATLAB ® Asia Edition McAndrew ‧ Wang ‧ Tseng.
Digital Image Processing Chapter 4 Image Enhancement in the Frequency Domain Part I.
Digital Image Processing, 2nd ed. © 2002 R. C. Gonzalez & R. E. Woods Background Any function that periodically repeats itself.
Digital Image Processing CSC331 Image Enhancement 1.
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.
Spatial Frequencies Spatial Frequencies. Why are Spatial Frequencies important? Efficient data representation Provides a means for modeling and removing.
Math 3360: Mathematical Imaging Prof. Ronald Lok Ming Lui Department of Mathematics, The Chinese University of Hong Kong Lecture 9: More about Discrete.
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.
Dr. Scott Umbaugh, SIUE Discrete Transforms.
Frequency Domain Processing Lecture: 3. In image processing, linear systems are at the heart of many filtering operations, and they provide the basis.
Practical Image Processing1 Chap7 Image Transformation  Image and Transformed image Spatial  Transformed domain Transformation.
Lecture 7 Transformations in frequency domain 1.Basic steps in frequency domain transformation 2.Fourier transformation theory in 1-D.
2D Sampling Goal: Represent a 2D function by a finite set of points.
1 CMPB 345: IMAGE PROCESSING DISCRETE TRANSFORM 2.
Fourier Transform.
CS 376b Introduction to Computer Vision 03 / 17 / 2008 Instructor: Michael Eckmann.
Dr. Abdul Basit Siddiqui FUIEMS. QuizTime 30 min. How the coefficents of Laplacian Filter are generated. Show your complete work. Also discuss different.
Computer Graphics & Image Processing Chapter # 4 Image Enhancement in Frequency Domain 2/26/20161.
2D Fourier Transform.
Digital Image Processing Lecture 9: Filtering in Frequency Domain Prof. Charlene Tsai.
Digital Image Processing Lecture 7: Image Enhancement in Frequency Domain-I Naveed Ejaz.
Fourier Transform (Chapter 4) CS474/674 – Prof. Bebis.
Digital Image Processing Lecture 8: Fourier Transform Prof. Charlene Tsai.
Jean Baptiste Joseph Fourier
MECH 373 Instrumentation and Measurements
Image Enhancement in the
Dr. Nikos Desypris, Oct Lecture 3
ENG4BF3 Medical Image Processing
2D Fourier transform is separable
4. Image Enhancement in Frequency Domain
Digital Image Procesing Unitary Transforms Discrete Fourier Trasform (DFT) in Image Processing DR TANIA STATHAKI READER (ASSOCIATE PROFFESOR) IN SIGNAL.
Chapter 3 Sampling.
Lecture 4 Image Enhancement in Frequency Domain
Discrete Fourier Transform
Presentation transcript:

Fourier transform

The Fourier transform The Fourier transform is a representation of an image as a sum of complex exponentials of varying magnitudes, frequencies, and phases. The Fourier transform plays a critical role in a broad range of image processing applications, including enhancement, analysis, restoration, and compression.

The one-dimensional discrete Fourier transform Any periodic signal may be expressed as a weighted combination of sine and cosine functions having different periods or frequencies. The process of breaking down a periodic signal as a sum of sine and cosine functions is called a Fourier decomposition or Fourier expansion

Fourier series

The Fourier Transform A Fourier transform G of a function g, for which is defined by the Fourier integral as The original function g can be recovered from its transform G using this formula

The Discrete Fourier Transform Assume that the function g has nonzero values only in the interval [—p/2, p/2]; in this case, Because g is zero outside [—p/2, p/2], then by applying the sampling to the transform G, we can infer that G can be completely reconstructed from its values at points k/p

The Discrete Fourier Transform If the interval [0, p] is also divided into N equal subintervals to represent times at which continuous-time signal g is sampled and the integral is replaced by the Riemann sum, then

The Discrete Fourier Transform An N-point discrete Fourier transform (DFT) is a finite sequence of real or complex numbers G(0),..., G(N — 1) representing the discrete frequency sequence corresponding to a finite sequence of real or complex numbers g(0),..., g(N — 1) representing a discrete time sequence as follows: A corresponding inverse discrete Fourier transform is defined as the sum

The Discrete Fourier Transform The amplitude spectrum of function g is the magnitude function | G | defined as and the phase spectrum is a set {k: k = 0, 1,2,...}, where

The Discrete Fourier Transform Consider a sequence of four samples, g = {1, 2, 3, 4}

The Discrete Fourier Transform The amplitude spectrum is given by And the phase spectrum by

The 2-dimensional discrete Fourier transform An M×N image g(x, y), x = 0, 1, 2, …, M–1 and y = 0, 1, 2, …, N–1 F(u, v): frequency data (or Fourier coefficients) at location (u, v) in the M×N frequency rectangle where u = 0, 1, 2, …, M–1 and v = 0, 1, 2, …, N–1 G(u,v) M N g(x,y) M N 2D DFT

2-dimensional discrete Fourier transform The 2-D DFT can be calculated by using this property of separability; to obtain the 2-D DFT of a matrix, we first calculate the DFT of all the rows, and then calculate the DFT of all the columns of the result

How can we write the discrete Fourier transform in matrix form? We construct matrix U with elements where x takes the values 0,1,.. .,N—1 along each column and a takes the same values along each row. The 2-dimensional discrete Fourier transform of an image g in matrix form is given by:

N = 4, 0 < x < 3, 0 < a < 3:

Fourier transforms in MATLAB

The DC coefficient >> a=ones(8); >> fft2(a) Note that the DC coefficient is indeed the sum of all the matrix values

Visualizing the Fourier Transform

Fourier transforms of images FFT MATLAB code >> [x,y]=meshgrid(1:256,1:256); >> b=(x+y<329)&(x+y>182)&(x-y>-67)&(x-y<73); >> imshow(b) >> bf=fftshift(fft2(b)); >> figure,fftshow(bf)

Fourier transforms of images M pixels (0,0 (0,N/2 u N pixels (0,0 (-M/2,0 (M/2,0 (0,-N/2 MATLAB code >> im = imread('lena.bmp'); >> bf=fftshift(fft2(im)); >> figure,fftshow(bf) v

Filtering in the frequency domain Low pass filter High pass filter Band pass filter

Filtering in the frequency domain Ideal filtering  Low pass filtering Suppose we have a Fourier transform matrix F, shifted so that the DC coefficient is in the center. we can perform low pass filtering by multiplying the transform by a matrix in such a way that centre values are maintained, and values away from the centre are either removed or minimized. One way to do this is to multiply by an ideal low-pass matrix, which is a binary matrix m

Ideal filtering  Low pass filtering

Ideal filtering  Low pass filtering FFT MATLAB code cm=imread('cameraman.tif'); cf=fftshift(fft2(cm)); figure,fftshow(cf,'log') imshow(cm); [x,y]=meshgrid(-128:217,-128:127); z=sqrt(x.^2+y.^2); c=(z<15); cfl=cf.*c(1:256,1:256); figure,fftshow(cfl,'log') cfli=ifft2(cfl); figure,fftshow(cfli,'abs') Low pass filter

Ideal low pass filtering with different cutoffs

High pass ltering high pass filtering can be performed by the opposite: eliminating centre values and keeping the others. High pass filter

Butterworth filtering Butterworth filter functions are based on the following functions for low pass filters: and for high pass filters:

Ideal vs Butterworth filtering

Butterworth filtering LPF HPF

Motion deblurring Inverse filtering We have seen that we can perform filtering in the Fourier domain by multiplying the DFT of an image by the DFT of a filter: this is a direct use of the convolution theorem. we should be able to recover the (DFT of the) original image

Motion deblurring deblur the image Original image motion blur image To deblur the image, we need to divide its transform by the transform corresponding to the blur filter. This means that we first create a matrix corresponding to the transform of the blur: bc=imread('board.tif'); bg=im2uint8(rgb2gray(bc)); b=bg(100:355,50:305); imshow(b) m=fspecial('motion',7,0); bm=imfilter(b,m); imshow(bm) m2=zeros(256,256); m2(1,1:7)=m; mf=fft2(m2); bmi=ifft2(fft2(bm)./mf); fftshow(bmi,'abs') d=0.02; mf=fft2(m2);mf(find(abs(mf)<d))=1; imshow(mat2gray(abs(bmi))*2) Original image motion blur image

END