Frequency Domain Processing

Slides:



Advertisements
Similar presentations
3-D Computational Vision CSc Image Processing II - Fourier Transform.
Advertisements

Image Enhancement in the Frequency Domain (2)
Fourier Transform (Chapter 4)
Frequency Domain The frequency domain
DFT/FFT and Wavelets ● Additive Synthesis demonstration (wave addition) ● Standard Definitions ● Computing the DFT and FFT ● Sine and cosine wave multiplication.
Chapter Four Image Enhancement in the Frequency Domain.
Chap 4 Image Enhancement in the Frequency Domain.
Digital Image Processing
Reminder Fourier Basis: t  [0,1] nZnZ Fourier Series: Fourier Coefficient:
CHAPTER 4 Image Enhancement in Frequency Domain
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.
Image Fourier Transform Faisal Farooq Q: How many signal processing engineers does it take to change a light bulb? A: Three. One to Fourier transform the.
Some Properties of the 2-D Fourier Transform Translation Distributivity and Scaling Rotation Periodicity and Conjugate Symmetry Separability Convolution.
Digital Image Processing Chapter 4: Image Enhancement in the Frequency Domain.
Digital Image Processing, 2nd ed. © 2002 R. C. Gonzalez & R. E. Woods Chapter 4 Image Enhancement in the Frequency Domain Chapter.
The Fourier Transform Jean Baptiste Joseph Fourier.
Time and Frequency Representation
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.
Systems: Definition Filter
G52IIP, School of Computer Science, University of Nottingham 1 Image Transforms Fourier Transform Basic idea.
Motivation Music as a combination of sounds at different frequencies
Image Processing Fourier Transform 1D Efficient Data Representation Discrete Fourier Transform - 1D Continuous Fourier Transform - 1D Examples.
Chapter 4: Image Enhancement in the Frequency Domain Chapter 4: Image Enhancement in the Frequency Domain.
: Chapter 14: The Frequency Domain 1 Montri Karnjanadecha ac.th/~montri Image Processing.
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.
1 Chapter 5 Image Transforms. 2 Image Processing for Pattern Recognition Feature Extraction Acquisition Preprocessing Classification Post Processing Scaling.
Chapter 7: The Fourier Transform 7.1 Introduction
1 © 2010 Cengage Learning Engineering. All Rights Reserved. 1 Introduction to Digital Image Processing with MATLAB ® Asia Edition McAndrew ‧ Wang ‧ Tseng.
Frequancy Domain Filtering (FDF) Lab 5. Using FFT (Fast Fourier Transform ) algorithm DFT (Discrete Fourier Transform) & inverse DFT.
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.
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.
October 29, 2013Computer Vision Lecture 13: Fourier Transform II 1 The Fourier Transform In the previous lecture, we discussed the Hough transform. There.
Spatial Frequencies Spatial Frequencies. Why are Spatial Frequencies important? Efficient data representation Provides a means for modeling and removing.
Fast Fourier Transform & Assignment 2
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.
Frequency Domain Processing Lecture: 3. In image processing, linear systems are at the heart of many filtering operations, and they provide the basis.
Fourier Transform.
CS 376b Introduction to Computer Vision 03 / 17 / 2008 Instructor: Michael Eckmann.
G52IIP, School of Computer Science, University of Nottingham 1 Image Transforms Basic idea Input Image, I(x,y) (spatial domain) Mathematical Transformation.
2D Fourier Transform.
The Frequency Domain Digital Image Processing – Chapter 8.
Fourier transform.
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.
The content of lecture This lecture will cover: Fourier Transform
Image Enhancement and Restoration
Integral Transform Method
DIGITAL SIGNAL PROCESSING ELECTRONICS
MECH 373 Instrumentation and Measurements
Image Enhancement in the
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.
ENG4BF3 Medical Image Processing
Image Enhancement in the
Net 222: Communications and networks fundamentals (Practical Part)
Image Processing, Leture #14
4. Image Enhancement in Frequency Domain
Chapter 8 The Discrete Fourier Transform
Digital Image Processing
Frequency Domain Processing
Chapter 8 The Discrete Fourier Transform
Chapter 8 The Discrete Fourier Transform
Lecture 4 Image Enhancement in Frequency Domain
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.
Presentation transcript:

Frequency Domain Processing The 2-D Discrete Fourier Transformation: Let f(x, y), for x=0,1,2…..M-1 and y=0,1,2…N-1, denote an M x N image. The 2-D Discrete Fourier Transform (DFT) of f, denoted by F(u, v), is given by the equation.

Frequency Domain Processing The 2-D Discrete Fourier Transformation: For u=0,1,2….M-1 and v=0,1,2…N-1. The frequency domain is simply the coordinate system spanned by F(u, v) with u and v as (frequency) variables. The concept behind the Fourier transform is that any waveform that can be constructed using a sum of sine and cosine waves of different frequencies. The exponential in the above formula can be expanded into sines and cosines with the variables u and v determining these frequencies.

Frequency Domain Processing The 2-D Discrete Fourier Transformation:

Frequency Domain Processing Things to note about the discrete Fourier transform are the following: the value of the transform at the origin of the frequency domain, at F(0,0), is called the dc component F(0,0) is equal to MN times the average value of f(x,y) in MATLAB, F(0,0) is actually F(1,1) because array indices in MATLAB start at 1 rather than 0 the values of the Fourier transform are complex, meaning they have real and imaginary parts. The imaginary parts are represented by j, which is the square root of -1 we visually analyze a Fourier transform by computing a Fourier spectrum (the magnitude of F(u,v)) and display it as an image. the Fourier spectrum is symmetric about the origin the fast Fourier transform (FFT) is a fast algorithm for computing the discrete Fourier transform. MATLAB has three functions to compute the DFT:

Frequency Domain Processing Computing & Visualizing 2-D DFT in MATLAB: Create an image with a white rectangle and black background. f=zeros(30,30); f(5:24,13:17)=1; imshow(f)

Frequency Domain Processing Calculate the DFT. Notice how there are real and imaginary parts to F. You must use abs to compute the magnitude (square root of the sum of the squares of the real and imaginary parts). F=fft2(f,255,255); F2=abs(F); figure, imshow(F2,[])

Frequency Domain Processing To create a finer sampling of the Fourier transform, you can add zero padding to f when computing its DFT . F=fft2(f, 256,256); F2=abs(F); figure, imshow(F2, [])

Frequency Domain Processing The zero-frequency coefficient is displayed in the upper left hand corner. To display it in the center, you can use the function fftshift. F2=fftshift(F2); F2=abs(F2); figure,imshow(F2,[])

Frequency Domain Processing To brighten the display, you can use a log function. F2=log(1+F2); figure,imshow(F2,[])

Filtering in the Frequency Domain Basic Steps in DFT Filtering The following summarize the basic steps in DFT Filtering Obtain the padding parameters using function paddedsize: PQ=paddedsize(size(f)); Obtain the Fourier transform with padding: F=fft2(f, PQ(1), PQ(2)); Generate a filter function, H, of size PQ(1) x PQ(2).... Multiply the transform by the filter: G=H.*F; Obtain the real part of the inverse FFT of G: g=real(ifft2(G)); Crop the top, left rectangle to the original size: g=g(1:size(f, 1), 1:size(f, 2));

Frequency Domain Processing Basic Steps in DFT Filtering

f=zeros(50,50); f(1:25,1:50)=1; [M,N]=size(f); F=fft2(f); Sig=10; H=lpfilter(‘gauss’,M,N,sig); G=H.*F; g=real(ifft2(G)); Imshow(g,[])

Frequency Domain Processing Basic Steps in DFT Filtering >>f=zeros(50,50); >>f(1:25,1:50)=1; >>PQ=paddedsize(size(f)); >>Fp=fft2(f,PQ(1),PQ(2)); >>sig=10; >>Hp=lpfilter(‘gauss’,PQ(1),PQ(2),2*sig); >>Gp=Hp.*Fp; >>gp=real(ifft2(Gp)); >>gpc=gp(1:size(f,1),1:size(f,2)); >>imshow(gp, [ ])

Frequency Domain Processing Obtaining Frequency Domain Filters from Spatial Filters The filtering in spatial domain is more efficient computationally than frequency domain. One approach for generating a frequency domain filter, H, that corresponds to a given spatial filter, h, is to let H=fft2(h,PQ(1),PQ(2)) where the values of PQ depends on the size of the image we want to filter. The function freqz2 computes the frequency response of FIR (Finite Impulse Response) filters. H=freqz2(h, R, C) here R is num of rows and C is num cols R=PQ(1) C=PQ(2)

Frequency Domain Processing Obtaining Frequency Domain Filters from Spatial Filters f=imread(‘moon.tif’); f=im2double(f); F=fft2(f); S=fftshift(log(1+abs(F))); S=gscale(S); h=fspecial(‘sobel’); freqz2(h) PQ=paddedsize(size(f)); H=freqz2(h,PQ(1),PQ(2)); H1=ifftshift(H); Imshow(abs(H),[ ]) Imshow(abs(H1),[ ]) gs=imfilter(f,h); gf=dftfilt(f,H1); Imshow(gs,[ ]) Imshow(gf,[ ])