audio/image data, for example, into one in terms of its frequency components is MATLAB provides functions for 1D and 2D Discrete Fourier Transforms (DFT):
Previous PDF | Next PDF |
[PDF] 2D-FFT Matlab Tutorial
2 fft2 -for two dimensions (useful for images) 3 fftn -for n dimensions MATLAB has three related functions that compute the inverse DFT: 0 ifft 1 ifft2 2 ifftn
[PDF] IMAGE PROCESSING IN FREQUENCY DOMAIN USING MATLAB
15 sept 2008 · FFT: Fast Fourier Transform IFFT: Inverse Fast Fourier Transform MSQE: Mean Square Quantization Error MATLAB: Matrix Laboratory ROI:
[PDF] 1 Preliminaries 2 Exercise 1 – 2-D Fourier Transforms - UCSB ECE
Image Processing in MATLAB – Fourier Analysis and Filtering of Images 1 Preliminaries the 2-D DFT and the inverse 2-D DFT are the routines fft2 and ifft2
[PDF] Fourier Transform Introduction - School of Computer Science and
audio/image data, for example, into one in terms of its frequency components is MATLAB provides functions for 1D and 2D Discrete Fourier Transforms (DFT):
[PDF] FOURIER ET LES IMAGES - LIRMM
Le travail proposé ici consiste à manipuler le spectre des images et à découvrir matlab permet de calculer la FFT d'un signal 1D (un vecteur) grâce à la fonction : Calculez la fft inverse (fonction ifft(MonSpectre) )du nouveau spectre
[PDF] Fourier transform of images FFT
Why do we convert images (signals) to spectrum domain? )vyux(j )vyux(j π π 2 2 inverse Euler equations? Fourier transform of images ( )tj Matlab: fftshift
[PDF] TD N°3 – Transformée de Fourier dune image Images - Loria
vf = fft(v); figure; plot(abs(vf) ˆ2); On constate que les basses fréquences Selon le même principe, utilisez du code Matlab pour générer les images ci-dessous le deuxième cas, puis de calculer la transformée de Fourier inverse du résultat
[PDF] Digital Image Processing - Image Processing Course
In most implementations the Fourier image is shifted in such a way that the Phase image (left), Inverse Fourier transform MATLAB Implementations • Use fft(
[PDF] Image Transforms and Image Enhancement in Frequency Domain
19 fév 2007 · Discrete, 2-D Fourier inverse Fourier transforms are implemented Fourier transform in Matlab ▫ from Matlab image processing demos
[PDF] inverse fourier transform of cosine function
[PDF] inverse fourier transform of e^jwt
[PDF] inverse fourier transform of rectangular function
[PDF] inverse fourier transform of step function
[PDF] inverse z transform calculator
[PDF] inverse z transform of 1
[PDF] investigation 2 i check mixtures and solutions answers
[PDF] investment protection agreement
[PDF] investors expedia group
[PDF] inwi *5
[PDF] inwi data recharge
[PDF] inwi promotion
[PDF] inwi recharge *6
[PDF] ioc host city contract
CM2208: Scientic Computing
Fourier Transform 1:
Digital Signal and Image Processing
Fourier Theory
Prof. David Marshall
School of Computer Science & Informatics
Frequency DomainFourier TransformDiscrete Fourier TransformSpectraProperties of Fourier TransformsFourier Transform
Moving into the Frequency Domain
TheFrequency domaincan be obtained through the
transformation, viaFourier Transform (FT), fromone (Temporal (Time)orSpatial) domain to the otherFrequencyDomainWe do not think in terms of signal or pixel intensities but rather underlying sinusoidal waveforms of varying frequency, amplitude and phase. 2/66 Frequency DomainFourier TransformDiscrete Fourier TransformSpectraProperties of Fourier TransformsApplications of Fourier Transform
Numerous Applications including:
Essential tool for Engineers, Physicists,
Mathematicians and Computer ScientistsFundamental tool for Digital Signal Processing andImage ProcessingMany types of Frequency Analysis:
Filtering
Noise Removal
Signal/Image Analysis
Simple implementation ofConvolutionAudioand ImageEects Processing.Signal/Image Restoration |e.g.DeblurringSignal/Image Compression |-MPEG
(Audio and Video),JPEGuse related techniques.Many more::::::3/66 Frequency DomainFourier TransformDiscrete Fourier TransformSpectraProperties of Fourier TransformsIntroducing Frequency Space
1D Audio Example
Lets consider a 1D (e.g. Audio) example to see what the dierent domains mean: Consider acomplicated soundsuch as the achordplayed on apianoor aguitar.We can describe this sound in two related ways:
Temporal Domain
: Sample the amplitudeof the sound many times a second, whichgives an approximation to the sound as afunctionoftime.Frequency Domain: Analysethe sound in terms of thepitchesof the notes, or
frequencies, which make the sound up, recording theamplitude ofeachfrequency .Fundamental FrequenciesD[: 554.40Hz
F : 698.48HzA[: 830.64Hz
C:10 46.56Hz
plus harmonics/partial frequencies .... 4/66 Frequency DomainFourier TransformDiscrete Fourier TransformSpectraProperties of Fourier TransformsBack to Basics
An 8 Hz Sine Wave
A signal that consists of asinusoidalwave
at8 Hz.8 Hz means that wave is completing8 cycles in 1 secondThefrequencyof that wave is 8 Hz.
From thefrequency domainwe can see
that the composition of our signal isone peakoccurring with a frequency of 8 Hz | there is only one sine wave here.with amagnitude/fractionof1.0i.e. it is thewhole signal.5/66
Frequency DomainFourier TransformDiscrete Fourier TransformSpectraProperties of Fourier Transforms2D Image Example
What do Frequencies in an Image Mean?
Now images are no more complex really:
Brightnessalong alinecan be recorded as a set ofvaluesmeasured atequallyspaceddistances apart,Orequivalently, at asetofspatial frequency values.Each of these frequency values is afrequency component.An image is a 2D array of pixel measurements.
We form a 2D grid of spatial frequencies.
A given frequency component now species what contribution is made by data which is changing with speciedxandy direction spatial frequencies. 6/66 Frequency DomainFourier TransformDiscrete Fourier TransformSpectraProperties of Fourier TransformsFrequency components of an image
What do Frequencies in an Image Mean? (Cont.)
Large values athighfrequency components then the data ischanging rapidly on a short distance scale.e.g.apage of textHowever,Noisecontributes (very)High FrequenciesalsoLargelowfrequency components then the large scale features
of the picture are more important. e.g.a single fairly simple object which occupies most of the image. 7/66 Frequency DomainFourier TransformDiscrete Fourier TransformSpectraProperties of Fourier TransformsVisualising Frequency Domain Transforms
Sinusoidal Decomposition
Any digital signal (function) can bedecomposedinto purelysinusoidal componentsSine waves of dierent size/shape | varyingamplitude,frequencyandphase.Whenaddedbacktogethertheyreconstitutetheoriginal signal.TheFourier transformis the tool that performs such an operation.
8/66 Frequency DomainFourier TransformDiscrete Fourier TransformSpectraProperties of Fourier Transforms Summing Sine Waves. Example: to give a Square(ish) WaveDigital signals are composite signals made up of many sinusoidal frequenciesA 200Hz digital signal (square(ish) wave) may be a composed of 200, 600, 1000,etc.sinusoidal signals which sum to give: 9/66 Frequency DomainFourier TransformDiscrete Fourier TransformSpectraProperties of Fourier TransformsSummary so far
So What Does All This Mean?
Transforming a signal into the frequency domain allows us To see what sine waves make up our underlying signal E.g.One part sinusoidal wave at 50 Hz and
Second part sinusoidal wave at 200 Hz.
Etc. Morecomplexsignals will give more complex decompositions but the idea is exactly the same. 10/66 Frequency DomainFourier TransformDiscrete Fourier TransformSpectraProperties of Fourier TransformsHow is this Useful then?
Basic Idea of Filtering in Frequency Space
Filtering now involvesattenuatingorremovingcertain frequencies |easily performed:Low pass lter|Ignorehigh freq uencynoise components | makezeroor a very low value.Only store lower frequency components High Pass Filter|opposite of aboveBandpass Filter| onlyallowfrequencies in acertain range.11/66 Frequency DomainFourier TransformDiscrete Fourier TransformSpectraProperties of Fourier TransformsVisualising the Frequency Domain
Think Graphic Equaliser
An easy way to visualise what is happening is to think of a graphic equaliser on a stereo system (or some software audio players,e.g. iTunes). 12/66 Frequency DomainFourier TransformDiscrete Fourier TransformSpectraProperties of Fourier TransformsSo are we ready for the Fourier Transform?
We have all the Tools....
This lecture, so far, (hopefully) set the context for Frequency decomposition.Past Maths Lectures:
Odd/Even Functions:sin( x) =sin(x),cos( x) = cos(x)Complex Numbers:Phasor Formrei=r(cos+isin)CalculusIntegration:Rekxdx=ekxk
Digital Signal Processing:
Basic Waveform Theory. Sine Wavey=A:sin(2:n:Fw=Fs) where:A= amplitude,Fw= wave frequency,Fs= sample frequency,nis the sample index.Relationship between Amplitude, Frequency and Phase:Cosine is a Sine wave 90
out of phaseImpulse Responses DSP + Image Proc.: Filters and other processing, Convolution 13/66 Frequency DomainFourier TransformDiscrete Fourier TransformSpectraProperties of Fourier TransformsFourier Theory
Introducing The Fourier Transform
The tool whichconvertsaspatialortemporal(real space)descriptionof audio/imagedata, for example, into one in terms of itsfrequency componentsis called theFourier transform The new version is usually referred to as theFourier space descriptionof the data.We then essentially process the data:E.g.forlteringbasically this means attenuating or setting certain
frequencies to zero We then need toconvert data back(orinvert) torealaudio /imagery to use in our applications. The correspondinginversetransformation which turns a Fourier space description back into a real space one is called theinverse Fourier transform.15/66 Frequency DomainFourier TransformDiscrete Fourier TransformSpectraProperties of Fourier Transforms1D Fourier Transform
1D Case (e.g.Audio Signal)Considering acontinuousfunctionf(x)of a single va riablexrepresenting
distance (or time). TheFourier transformof that function is denotedF(u),whereurepresents spatial(ortemporal)frequencyis dened by:F(u) =Z
1 1 f(x)e2ixudx: Note: In generalF(u) will be acomplex quantit yeven thoughthe original data is purelyreal.The meaning of this is that not only is themagnitudeof eachfrequency present important, but that itsphase relationshipistoo.RecallPhasorsfromComplex Number Lectures.e2ixuabove is aPhasor.16/66
Frequency DomainFourier TransformDiscrete Fourier TransformSpectraProperties of Fourier TransformsInverse Fourier Transform
Inverse 1D Fourier Transform
TheinverseF ouriertransfo rmfor regeneratingf(x)from F(u)is given by f(x) =Z 1 1F(u)e2ixudu;
which is rather similar to the (forward) Fourier transformexcept that theexponential term has the opposite sign.It isnot negative17/66
11Frequency DomainFourier TransformDiscrete Fourier TransformSpectraProperties of Fourier Transforms
Fourier Transform Example
Fourier Transform of a Top Hat Function
Let's see how we compute a Fourier Transform: consider a particular functionf(x) dened as f(x) =1ifjxj 10otherwise,1118/66
Frequency DomainFourier TransformDiscrete Fourier TransformSpectraProperties of Fourier TransformsThe Sinc Function (1)
We derive the Sinc function
So its Fourier transform is:
F(u)= Z
11f(x)e2ixudx
Z 111e2ixudx
12iu(e2iue2iu)
Now (refer toComplex NumbersLectures/Maths Formula SheetHandout) sin=eiei2i ;So:F(u)= sin2uu:
In this case,F(u)is purely real , which is a consequence of the original data beingsymmetricinxandx.f(x)is an evenfunction.
A graph ofF(u)is sho wnoverleaf.
This function is often referred to as theSinc function.19/66 Frequency DomainFourier TransformDiscrete Fourier TransformSpectraProperties of Fourier TransformsThe Sinc Function Graph
The Sinc Function
The Fourier transform of a top hat function, theSinc function:-6-4-20246 0.5 0 0.5 1 1.5 2 u sin(2 → u)/(→ u)20/66 Frequency DomainFourier TransformDiscrete Fourier TransformSpectraProperties of Fourier TransformsThe 2D Fourier Transform
2D Case (e.g.Image data)Iff(x;y)is a function, fo rexample intensitiesin animage, its
Fourier transformis given by
F(u;v) =Z
1 1Z 1 1 f(x;y)e2i(xu+yv)dx dy; and theinverse transform, as might be expected, is f(x;y) =Z 1 1Z 1 1F(u;v)e2i(xu+yv)du dv:21/66
Frequency DomainFourier TransformDiscrete Fourier TransformSpectraProperties of Fourier TransformsThe Discrete Fourier Transform
But All Our Audio and Image data are Digitised!!
Thus, we need adiscreteformulation of the Fourier transform:Assumesregula rlyspaced data values, andReturnsthevalueof the Fourier transform for a set of values
in frequency space which areequally spaced. This is done quite naturally by replacing the integral by a summation, to give thediscrete Fourier transformorDFTfor short. 22/66Frequency DomainFourier TransformDiscrete Fourier TransformSpectraProperties of Fourier Transforms
1D Discrete Fourier transform (DFT)
1D Case:
In 1D it is convenient now to assume thatxgoes up in steps of1 , and that there areNsamples, at values ofxfrom0 to N1.
So the DFT takes the form
F(u) =1N
N1X x=0f(x)e2ixu=N; while the inverse DFT is f(x) =N1X u=0F(u)e2ixu=N: NOTE:Minor changes from the continuous case are a factor of1 =Nin the exponentialterms, and also the factor1 =Nin front of the forward transform which does not appearin theinversetransform.23/66 Frequency DomainFourier TransformDiscrete Fourier TransformSpectraProperties of Fourier Transforms2D Discrete Fourier transform
2D Case
The2D DFTworks is similar.
So for anNMgrid inxandywe have
F(u;v) =1NM
N1X x=0M1X y=0f(x;y)e2i(xu=N+yv=M); and f(x;y) =N1X u=0M1X v=0F(u;v)e2i(xu=N+yv=M):24/66 Frequency DomainFourier TransformDiscrete Fourier TransformSpectraProperties of Fourier TransformsBalancing the 2D DFT
Most Images are Square
OftenN=M, and it is then it is more convenient to redene F(u;v)b ymultiplying it b ya facto rof N, so that theforwardand inversetransforms are moresymmetric:F(u;v) =1N
N1X x=0N1X y=0f(x;y)e2i(xu+yv)=N; and f(x;y) =1N N1X u=0N1X v=0F(u;v)e2i(xu+yv)=N:25/66 Frequency DomainFourier TransformDiscrete Fourier TransformSpectraProperties of Fourier TransformsFourier Transforms in MATLAB
fft()andfft2()MATLAB provides functions for 1D and 2DDiscrete Fourier Transforms (DFT): t(X) is the 1D discrete F ouriertransfo rm(DFT) of vectorX. For matrices, the FFT operation is applied toeach column|NOT a 2D DFT transform. t2(X) returns the 2D F ouriertransfo rmof matrix X. If X is a vecto r,the result will have the same orientation. tn(X) returns the N-D discrete F ouriert ransformof the N-D arrayX .Inverse DFTit(),it2(),itn()perform theinverseDFT.
See appropriate MATLABhelp/docpages forfull details. Plenty of examples to Follow.See also:MALTAB DocsImage Pro cessing!User's Guide !Transforms!Fourier Transform 26/660246810121416
1 0 1 n → a)Cosine signal x(n)
0246810121416
0 0.5 1 k → b)Magnitude spectrum |X(k)|
00.511.522.533.5
x 10 4 0 0.5 1 f in Hz → c)Magnitude spectrum |X(f)|Frequency DomainFourier TransformDiscrete Fourier TransformSpectraProperties of Fourier Transforms