e Processng ourer Transform D The ourer Transform Effcent Data epresentaton Dscrete ourer Transform - D Contnuous ourer Transform - D Eamples + + + Jean Baptste Joseph ourer Effcent Data epresentaton Data can be represented n many ways. There s a great advantage usng an approprate representaton. Eamples: Equalzers n Stereo systems. osy ponts along a lne Color space red/green/blue v.s. Hue/Brghtness How can we enhance such an mage? 4
Soluton: e epresentaton Transforms 5 8 7 5 + +. Bass unctons.. Method for fndng the mage gven the transform coeffcents. + + 5 +.... Method for fndng the transform coeffcents gven the mage. + + Y Coordnate Grayscale e V Coordnates Transformed e + + 7 +... X Coordnate U Coordnates 5 6 epresentaton n dfferent bases It s possble to go bac and forth between representatons: u () a v, u u ( ) u a a a v The Inner Product Dscrete vectors (real numbers): a,b T a b () b() Dscrete vectors (comple numbers): a,b H a b a The vector a H denotes the conjugate transpose of a. a * () b() u v a u Contnuous functons: f * ( ),g( ) f ( ) g( ) d v 7 8
The ourer bass functons Bass unctons are snes and cosnes Every functon equals a sum of snes and cosnes sn() cos() sn() A sn(4) + sn() B A+B The transform coeffcents determne the ampltude and phase: +.8 sn(5) C A+B+C +.4 sn(7) D A+B+C+D a sn() a sn() -a sn() 9 Sum of cosnes only Sum of snes only symmetrc functons antsymmetrc functons ourer Coeffcents f() C + C cos() + S sn() +... + C cos() + S sn() +... Terms are consdered n pars: C cos() + S sn() sn( + ) where C + S and tan S C Usng Comple umbers: { { cos(), sn() e C cos() + S sn() e e Ampltude+phase
The nverse Contnuous ourer Transform composes a sgnal f() gven (): f ( ) The D Contnues ourer Transform The Contnuous ourer Transform fnds the () gven the (cont.) sgnal f(): π ( ) f() e d B ()e π s a comple wave functon for each (contnues) gven. π ( ) e d Contnuous vs sampled Sgnals Samplng: Move from f() ( ) to f() ( Z) by samplng at equal ntervals. f( ), f( + ), f( + ),..., f( +[n-] ), Gven samples at equal ntervals, we redefne f as: 4 f() f( + ),,,..., - f() f( + ) f( + ) f( ) f( + ).5.5.75..5 4 f() f( + ) () and f() are contnues. 4 The dscrete bass functons are e π.. or each frequency the ourer coeffcent s: π π / ( e ) e π C cos + S sn ( ) e The Dscrete ourer Transform (DT) ( ) f ( ) π ( ) f, e ( ) Matlab: fft(f); e f( ) e π π,,,..., - The Inverse Dscrete ourer Transform (IDT) s defned as:,,,..., - Matlab: fft(f); emar: ormalzaton constant mght be dfferent! 5 6 4
Dscrete ourer Transform - Eample () Σ f() e 4 Σ f() -π f() [ 4 4] (f() + f() + f() + f()) (++4+4) () -π Σ f() e 4 [e +e -π/ +4e π +4e -π/ ] [-+] () -4π Σ f() e 4 [e +e -π +4e π +4e -π ] [--] - () -6π Σ f() e 4 [e +e -π/ +4e π +4e -9π/ ] [--] DT of [ 4 4] s [ (-+) - (--) ] The ourer Transform - Summary () s the ourer transform of f(): { f( ) } ( ) ~ f() s the nverse ourer transform of (): ~ { ( ) } f( ) f() and () are a ourer par. f() s a representaton of the sgnal n the Spatal Doman and () s a representaton n the requency Doman. 7 8 The ourer transform () s a functon over the comple numbers: The requency Doman f() ( ) e tells us how much of frequency s needed. tells us the shft of the Sne wave wth frequency. The sgnal f() Alternatvely: ( ) e ( ) a b + a tells us how much of cos wth frequency s needed. b tells us how much of sn wth frequency s needed. ( ) a b + Ampltude (spectrum) and Phase and nary 9 5
- s the ampltude of (). - s the phase of (). * () () - s the power spectrum of (). If a sgnal f() has a lot of fne detals wll be hgh for hgh. If the sgnal f() s "smooth" wll be low for hgh. sn() Why do we need representaton n the frequency doman? Problem n requency Space ourer Transform Orgnal Problem elatvely easy soluton Dffcult soluton Soluton n requency Space Inverse ourer Transform Soluton of Orgnal Problem + sn() +.8 sn(5) +.4 sn(7) The Delta uncton: Eamples: Let f( ) δ( ) π ( ) δ( ) e d f() lm g δ( ) ; δ( ) d ( ) δ( ( ) ) d g The Constant uncton: Let f ( ) π ( ) e d δ( ) f() ourer ourer 4 6
A Bass uncton: Let f () e π π π ( ) e e d e π( ) f() d δ( ) The Cosne wave: Let ( ) cos( π ) f δ + δ + π π π ( ) ( e + e ) e d [ ( ) ( )] f() ourer ourer - - 5 6 The Sne wave: Let ( ) sn( π ) f π π π ( ) ( e e ) e d [ δ ( + ) δ ( )] f() The Wndow uncton (rect): Let ( ) rect (.5 π e.5 f < ) otherwse ( π ) sn d π f() snc ( π ) ourer -.5.5 ourer - π/ -π/ - 7 8 7
Proof: The Gaussan: -/ / ( ) f() rect / () { f()e π d / / e π d / otherwse Let f ( ) e ( ) f() e π π [ e π ] / / π π π [ π π e e ] [ cos( π) sn( π) cos( π) sn( π) ] ourer sn( π ) SIC ( ) π snc() () 9 The Comb uncton: Let () δ( mod ) c ~ { c } δ mod C ( ) f() c () ourer / C / () End 8