Strang Effcts Introduction to Mdical Imaging Evr trid to rduc th siz of an imag and you got this? Signal Procssing Basics Klaus Mullr Computr Scinc Dpartmnt Stony Brook Univrsity W call this ffct aliasing Bttr But what you rally wantd is this: Why Is This Happning? Th smallr imag rsolution cannot rprsnt th imag dtail capturd at th highr rsolution skipping this small dtail lads to ths undsird artifacts W call this anti-aliasing
Ovrviw Priodic Signals So how do w gt th nic imag? For this you nd to undrstand: Fourir thory Sampling thory Digital filtrs Don t b scard, w ll covr ths topics gntly A signal is priodic if s(t+t) = s(t) w call T th priod of th signal if thr is no such T thn th signal is apriodic Sinusoids ar priodic functions sinusoids play an important rol Writ as: 2π t Asin( + ϕt ) T whr ϕ t is th phas shift and A is th amplitud f(t) ϕ t T A t Altrnativly: Asin( 2π ft + ϕ ) = Asin( ωt + ϕ ) whr f=/t is th frquncy w may writ ω = 2πf t t Fourir Thory Exampl Jan Baptist Josph Fourir (768-83) His ida (87): Any priodic function can b rwrittn as a wightd sum of sins and cosins of diffrnt frquncis. Don t bliv it? nithr did Lagrang, Laplac, Poisson and othr major mathmaticians of his tim in fact, th thory was not translatd into English until 878 But it s tru! it is calld th Fourir Sris Considr th function: g(t) = sin(2πf t) + (/3)sin(2π(3f) t)
Frquncy Spctrum Furthr Exampl () Considr th function: g(t) = sin(2πf t) + (/3)sin(2π(3f) t) th function s frquncy spctrum Furthr Exampl (2) Furthr Exampl (3)
Furthr Exampl (4) Th Importanc of th Frquncy Spctrum W obsrv: oscillations of diffrnt frquncis add to form th signal thr is a charactristic frquncy spctrum to any signal sharp dgs can only b rprsntd (gnratd) by high frquncis signal (approximat squar/box function) its frquncy spctrum Th DC Componnt Th first componnt of th spctrum is th signal avrag DC Th Math Th xampl just sn has th following Fourir Sris: s( t) = k= sin(2πkt) k most of th tim th phas is not intrsting, so w shall omit it In fact, this is an intrsting sris: th sinc function w shall s mor of it soon W can convrt any discrt signal into its Fourir Sris (and back) this is calld th Fourir Transform (Invrs Fourir Transform) Fourir Transform DC componnt = signal avrag s(t) Invrs Fourir Transform S(k)
Fourir Transform of Discrt Signals: DFT Discrt Fourir Transform (DFT) assums that th signal is discrt and finit S( k) = s( n) s( n) = S( k) i2π i2π n= n= w hav sampls, from which w can calculat frquncis th frquncy spctrum is discrt and it is priodic in s(n) Priodicity Imags ar discrt signals so thir frquncy spctra ar finit and priodic (s last slid) and thrfor thy hav an uppr limit (a maximum frquncy) Imags ar also finit (in siz) th DFT assums that thy ar also priodic as odd as this may sound, this is th undrlying assumption Thrfor: frquncy spctra ar finit and priodic imags ar also finit and priodic Kp this in mind for now it will hlp xplain th strang rsizing ffcts prsntd bfor S(k) ow, What About th Complx Exponntial It is Fourir s way to ncod phas and amplitud into on rprsntation to undrstand it bttr, lt s first rviw complx numbrs and thn s what it mans in th Fourir contxt ot, w only discuss this to illustrat th full pictur ssntial for this class is only to ow th concpt of frquncy spctrum discussd thus far Rcall: Complx umbrs A complx numbr c has a ral and an imaginary part: c = R{c} + i Im{c} (cartsian rprsntation) i = hr, i always dnots th complx part W can also us a polar rprsntation: A = R{ c} + Im{ c} c 2 2 Im{ c} ϕc = tan ( ) R{ c} Im{c} imaginary axis A c ϕ c R{c} ral axis
Exponntial xp Application: Complx Sinusoids ax xp( ax) = a > whn a > thn xp incrass with incrasing x whn a < thn xp approximats with incrasing x Complx xponntial / sinusoid: A k i(2πkt+ ϕ ) = A k As bfor th cos trm is th signal s ral part th sin trm is th signal s imaginary part A is th amplitud, ϕ th phas shift, k dtrmins th frquncy (cos(2πkt + ϕ) + i sin(2πkt + ϕ)) a < v-axis Two-Dimnsional Fourir Spctrum u-axis Som Exampl Spctra Effcts of Missing Spctra Portions: Axial (a) Spctrum along u dtrmins dtail along spatial x (b) Spctrum along v dtrmins dtail along spatial y (a) (b)
Effcts of Missing Spctra Portions: Radial (a) Lowr frquncis (clos to origin) giv ovrall structur (b) Highr frquncis (priphry) giv dtail (sharp dgs) (a) (b) Th Math 2D DFT Th 2D transform: M S( k, l) = s( n, m) m= n= i2 π ( + lm) M M s( n, m) = S( k, l) M m= n= Sparability: if M=, complxity is 2 O(2 3 ) i2 π ( + lm) M M i2πlm M S( k, l) = P( k, m) whr P( k, m) = s( n, m) M m= n= M i2πlm M s( n, m) = p( n, l) whr p( n, l) = S( n, m) M l= k= i2π i2π Fast Fourir Transform (FFT) Rcursivly braks up th FT sum into odd and vn trms: i2π / 2 i2π k 2n / 2 i2 π k (2n+ ) S( k) = s( n) = s(2 n) + s(2n + ) n= n= n= Fast Fourir Transform (FFT) Givs ris to th wll-own buttrfly Divid + Conqur architctur invntd by Cooly-Tucky, 965) x[] / 2 i2π i2π k / 2 i2π / 2 / 2 svn ( n) sodd ( n) n= n= = + Rsults in an O(n log(n)) algorithm (in D) O(n 2 log(n)) for 2D (and so on)