V he Fourier ransform Lecure noes by Assaf al 1. Moivaion Imagine playing hree noes on he piano, recording hem (soring hem as a.wav or.mp3 file), and hen ploing he resuling waveform on he compuer: 100Hz 00Hz 300Hz s()=sin( 100)+sin( 00)+sin( 300) Noe: hose aren he acual frequencies of hose noes on a piano, I ve jus chosen simple numbers for he example. Looking a he resuling waveform really doesn ell you anyhing abou he frequencies of he noes ha were played. Can we recover hem? he answer is yes, using he so-called Fourier ransform. he Fourier ransform (F) is a black box ha ells you exacly wha periodiciies are presen in your signal.. Definiion Given a funcion f(), is Fourier ransform is a funcion f ˆ( ), defined by ˆ( ) ( ) i f f e d (F) I can be shown ha, given f ˆ( ), he funcion f() can be recovered using he inverse Fourier ransform: 1 () ˆ i f f( ) e d (Inverse F) Some noes: 1. Oher books may define he F slighly differenly: someimes he F migh have a 1/ facor in fron of i, or he exponen migh have a plus sign. he only wo hings ha will never vary are: (i.) he produc of he facors in fron of he inegral of he F and he inverse F will always equal 1/. (ii.) If he F has a minus sign in he exponen, he IF will have a plus sign, and vice versa.. Don be afraid of he e -i facor. You can rea i as you would any oher exponen (now, if you re afraid of exponens, ha s anoher problem). Examples: d i i a. i e d e i b. e d 1 e i i i i' ii' i( ') c. e e e e ˆf migh be a complex valued funcion, e.g. f ˆ 3 5 i. herefore i has boh a magniude and a phase as any oher complex number: ˆ ( ) ˆ i f f( ) e. 3. As you ve noiced, You can hink of he F as a black box, ha akes one funcion f() and spis ou anoher, ˆf : F f() ˆf IF
3. Compuaion 3.1 Example #1 Ok, enough alk. Le s work ou a simple example. Le s ake a recangular funcion: 0 oherwise 1 f F IF f() We compue: 0 ˆ i f f e d = / i e d / / i e i e e i e e i / i/ i/ i/ i/ Now I m going o use an ideniy: If we ll ake he resuling sinc funcion and apply he IF o i we ll ge he recangular funcion back. However, ha calculaion is a bi ricky and requires complex calculus, so we won aemp i here; you ll jus have o ake my word for i ha i works. 3. Example # Going back o he moivaing example in secion (.1), remember we go a signal s() ha didn really ell us much abou he frequencies ha made i up: sin x e wih x / and obain: ix e i ix sin ˆ f sinc / If we were o apply he F o i, we would obain somehing ha d look like his: where sinc(x) = sin(x)/x by definiion. We plo he resuls:
100 00 300 he axis is imes he frequencies of he original noes ( is someimes called he angular frequency). Each peak would ell us ha a paricular noe on he piano were presen. he peaks are independen in he sense ha, if we were o drop he middle noe, he middle peak would disappear bu he oher wo would be unaffeced. he heigh of he peaks indicaes how srong we hi each key (he loudness of each frequency) in his case I ve assumed all keys were sruck wih even force.
4. he D/3D Fourier ransform he F we ve encounered so far was one dimensional. ha is, i ook i a funcion of one variable and gave us back a funcion of one variable: f() F fˆ here is also a D F, ha akes as is inpu a funcion of wo variables and reurns anoher funcion of wo variables; and a 3D F, ha akes as is inpu a funcion of hree variables, x, y & z, and reurns anoher funcion of hree variables, k x, k y, k z : where x, yz, f() r F f k k are r and kx, ky, kz coordinaes on a 3D grid. he 3D F is defined as: ˆ ikr f k f() r e dr ik x ik y ik z x y z f ( x, y, z) e e e dxdydz Here kr kx x ky y kz z is he scalar produc of he wo vecors, k and r. Conras his wih he 1D F: ˆ () i f f e d An image, by he way, can be regarded as a D funcion, f(x,y), wih f(x 0,y 0 ) being he brighness of he pixel a (x 0, y 0 ). he inverse F, in 3D, is given by: 3 ˆ ikr f r f( k) e dr 3 ˆ ikxx iky y ikz z f ( k, k, k ) e e e dxdydz x y z Le s hink for a momen in D. We can hink of he D F, f(k)=f(k x,k y ), as a funcion defined in he k x -k y plane. he values of f(k) a he cener of his k-plane represen he slowly-varying frequencies of he funcion, and are hence responsible for he gross-feaures of he image; conversely, he values of f(k) away from he cener represen he fas componens of he image, and hence usually hey make up he edges and sharp feaures of he image. For example, here is a picure wih jus he cener of he k-plane reained: he 3D F behaves in exacly he same manner as he 1D F: i deecs periodiciies in he funcion f(r). However, jus looking a he D (or 3D) F of a D (or 3D) funcion rarely ells you anyhing abou i. For example, here are wo oally disinc images, and he logs of he magniude of heir corresponding Fs (he magniude of he F has a wide dynamic range, so one ofen looks a is log):
Noe how blurred he image seems: he sharp feaures (he edges) have become less defined, because we ve removed he fas componens of he image. Likewise, by removing mainly he cener of he k-plane: we remain wih jus he fas, disconinuous componens, such as he edges.