mip1_03_fourier_transform_090505_1436387

Mip1_03_fourier_tran - Medical Image Processing 1(MIP1 Image Signal Analysis and Processing(ISAP SS’09 Fourier Transform Dr Pierre Elbischger

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Medical Image Processing 1 (MIP1) Image Signal Analysis and Processing (ISAP) SS’09 Fourier Transform Dr. Pierre Elbischger School of Medical Information Technology Carinthia University of Applied Sciences 2D harmonics - Positive vs. negative frequencies • • 2πu -2πu f(x) • E9 For simplicity, we consider the spatial frequency u in one direction x only. The negative frequency (-u) is a mathematical trick to create a real signal by the linear combination of two complex exponentials. Due to the negative frequency the exponentials rotate with the same velocity but in converse directions, thus resulting in a conjugate complex phasor. A sampled version of f(x) can be obtained by sampling x with step width ∆x, thus x(n) = n∆x. v r -u 1 period of the continuous signal 05.05.2009 ϕ u u sampled signal Dr. Pierre Elbischger - MIP0'09SS - Fourier Transform 2 The 2D Fourier transform 2D Fourier transform pair Frequency domain Spatial domain f(x,y) is a superposition of weighted complex exponentials (basis functions). The weights F(u,v) are complex values and determine the amplitude and the phase of the exponentials at the spatial frequency (u,v). v r The complex exponential is directed into direction ϕ and has frequency r. ϕ u λx Period vs. Frequency λy 05.05.2009 Dr. Pierre Elbischger - MIP0'09SS - Fourier Transform λr 3 2D basic functions of the 2D Fourier transform 1) x l=1 l=0 N l=2 l=3 k=0 y M k=1 k=2 k=3 1) Basic functions (real part) with certain frequencies 05.05.2009 Dr. Pierre Elbischger - MIP0'09SS - Fourier Transform Suppose the axes labels as used in the upper left figure, ignore the others. 4 Fourier spectrum E8 The Fourier transformed F(u,v) is a complex function with a real part R(u,v) and an imaginary part I(u,v). If f(x,y) is real, its F(u,v) is conjugate symmetric Polar representation (magnitude spectrum and phase spectrum) Note, the angle Φ denotes the phase shift of the exponential rather than the orientation of the exponential that is given by ϕ (see previous slide). |F(u,v)| represents half the amplitude of the corresponding harmonic. The magnitude spectrum is typically log-transformed to increased the dynamic range. 05.05.2009 Dr. Pierre Elbischger - MIP0'09SS - Fourier Transform 5 Fourier domain representation – circular chirp A pattern that reflects the Fourier domain directly in the spatial domain is given by a 2-dimensional harmonic and radial-symmetric chirp-signal. The frequency linearly increases in radial direction, independent of the direction. The signals does not represent the Fourier transform but the associated basis functions. v u whereby c is a constant factor that controls the increase of the effective frequency r(R) when the radial distance increases and, R denotes the spatial radial distance to the center point of the chirp signal. The left frequencies’ half-plane has odd symmetry in regard to the right half-plane and, therefore, is not illustrated in the figure. Note, the visualized chirp signal is the corresponding spatial pattern, mapped into the Fourier plane – this is done for illustration purpose only. It does not represent the Fourier transform of the chirp signal! 05.05.2009 Dr. Pierre Elbischger - MIP0'09SS - Fourier Transform 6 The phase contains significant information images 05.05.2009 log-magnitude phase Dr. Pierre Elbischger - MIP0'09SS - Fourier Transform Images obtained by swaping the magnitude spectra 7 Fourier transform properties Differentiation Scaling Convolution Shifting 05.05.2009 Dr. Pierre Elbischger - MIP0'09SS - Fourier Transform 8 Separability considerations The two-dimensional Fourier transform is separable into two nested one-dimensional Fourier transforms. This allows for a speed up of the two-dimensional FFT. If the function f(x,y)=f(x)f(y) is separable, the Fourier transform can be decomposed into a product of two one-dimensional Fourier transforms. 05.05.2009 Dr. Pierre Elbischger - MIP0'09SS - Fourier Transform 9 The sampling of a continuous signal 05.05.2009 Dr. Pierre Elbischger - MIP0'09SS - Fourier Transform 10 The sampling of the frequency response 05.05.2009 Dr. Pierre Elbischger - MIP0'09SS - Fourier Transform 11 The discrete Fourier transform • • • The frequency spectrum of a discrete signal f(n,m) is continuous and has a periodicity of 2π. In the digital Fourier transform the continues spectrum can be sub sampled with an arbitrary high rate The digital Fourier transform is not required to have the same size as the transformed, discrete image! In order to obtain the discrete values from the frequency spectrum, integration is required (inverse transform). Replacing the continuous integration by two discrete sums leads to the digital Fourier transform that can be efficiently computed by the fast Fourier transform (FFT). 05.05.2009 Dr. Pierre Elbischger - MIP0'09SS - Fourier Transform 12 The 2D digital Fourier transform (DFT) The DFT of a discrete signal f(n,m) results in a continuous and periodic frequency spectrum! u and v can be interpreted as normalized frequencies (with respect to a sampling frequency) and range from 0 to 1 – corresponds to one turn in the unit circle. In order to obtain a finite number of transformation values, the frequencies u and v are sampled equally spaced around the unit circle. Although in principal an infinitely dense sampling can be performed, one can show that a sampling of M and N points in u and v respectively suffice to represent the full information content of the signal. Note, the final formulas of the DFT do not contain any spatial spacing, and thus, the samples should be interpreted as a sequence of consecutive values rather than as values that are spatially related! 05.05.2009 Dr. Pierre Elbischger - MIP0'09SS - Fourier Transform 13 The 2D digital Fourier transform (DFT) Plausibility explanation: The digital Fourier transform can be interpreted as a discretized version of the continues Fourier transform. The discretization is performed in the spatial domain and in the frequency domain respectively. The sampling in the frequency domain enforces the periodicity of the spatial signal, see the previous slides. One period of the periodic discrete signal consists of N samples, resulting in N fundamental frequencies uk. y-component equidistant sampling The factor in front of the sums is explained by the exact derivation of the transform. [Signals & Systems, Oppenheim Willsky, Nawab, 1997] 05.05.2009 Dr. Pierre Elbischger - MIP0'09SS - Fourier Transform 14 Centered representation of the spectrum The spectrum of a discrete signal is a periodic function. As shown before, the spectrum of a real valued signal is symmetric about its origin. It is thus common to use a centered representation of the spectrum FFT 05.05.2009 centered FFT Dr. Pierre Elbischger - MIP0'09SS - Fourier Transform Matlab: fftshift 15 Orientated spatial texture/structure in the Fourier Domain The spatial orientation of a two-dimensional cosine or sine wave with spectral coordinates (k,l) is ¸r l k f(n,m) F(k,l) Conversely a two-dimensional sinusoid with effective frequency r=1/λr and spatial orientation ϕ is represented by the spectral coordinates A sinosoid with spatial orientation Ψ = 45 has spectral coefficients at the diagonal of the spectrum. Unless the image (and thus the spectrum) is quadratic (M=N), the angle of orientation in the image and in the spectrum are not the same. To obtain identical orientations one has to scale the spectrum to square size. 05.05.2009 Dr. Pierre Elbischger - MIP0'09SS - Fourier Transform 16 Effects of periodicity (1) When interpreting the 2D digital FT of images, one must always be aware of the fact that with any discrete Fourier transform, the distinct function is implicitly assumed to be periodic in every dimension. If there is a large intensity difference between opposing borders of an image, then this causes strong transitions in the resulting periodic signal and, thus to high bandwidth signals along the corresponding main axis. 05.05.2009 Dr. Pierre Elbischger - MIP0'09SS - Fourier Transform 17 Effects of periodicity (2) One solution of the problem is to multiply the image function f(x,y) by a suitable window function w(x,y). The window function should drop off continuously toward the image borders such that the transition between image replicas are effectively eliminated. Multiplying two functions in spatial domain results in a convolution of the corresponding spectra in the spectral domain. To apply the least possible damage to the Fourier transform of the image, the ideal spectrum of w(x,y) would be the impulse function δ(x,y), unfortunaltey resulting in a constant window function (box car window) again. In general, we can say that a broader spectrum of the windowing function smoothes the resulting spectrum more strongly and individual frequency components are harder to isolate. Taking a picture is equivalent to cutting out a finite region from an infinite image plane, which can be interpreted as a multiplication with a rectangular (box car) window, that is far from the ideal impulse function. Window functions should be as wide as possible to include a maximum part of the original function and they should also drop off to zero toward the image borders but then again not too steeply to maintain a narrow windowing spectrum. The ideal windowing function does not exist, it is always a trade off and its choice depends on the particular application. 05.05.2009 Dr. Pierre Elbischger - MIP0'09SS - Fourier Transform 18 Leakage and Windowing I A finite observation length broadens the spectrum of a sinusoid that ideally should be a Dirac delta function in the spectrum. The spectrum of the signal is convolved with the spectrum of the windowing function and reduces the spectral resolution Leakage. 05.05.2009 Dr. Pierre Elbischger - MIP0'09SS - Fourier Transform 19 Leakage and Windowing II • • • Windowing reduces the side lopes in the spectrum. Selecting a window function is not a simple task. Each window function has its own characteristics and suitability for different applications. Windowing is used to reduce the negative effects due to a limited observation length and/or discontinuities at the range boundaries – The DFT leads to a periodic spectrum as well as a periodic discrete signal that may lead to discontinuities at the borders of the signal periods. W(u) w(x) 05.05.2009 Dr. Pierre Elbischger - MIP0'09SS - Fourier Transform 20 Window functions not ideal window functions box car cosine elliptical Bartlett Gaussian Hanning elliptical Parzen 05.05.2009 Dr. Pierre Elbischger - MIP0'09SS - Fourier Transform 21 Application of windowing functions on images 05.05.2009 Dr. Pierre Elbischger - MIP0'09SS - Fourier Transform 22 Image sampling Spatial sampling Impulse function Frequency domain Sampling Nyquist criterion 05.05.2009 Dr. Pierre Elbischger - MIP0'09SS - Fourier Transform 23 Aliasing Without smoothing Gaussian smoothing The Fourier transform of the sampled signal consists of a sum of copies of the Fourier transform of the original signal, shifted with respect to each other by the sampling frequency. If they do intersect (as in this figure), the intersection region is added, and so we cannot obtain a separate copy of the Fourier transform, and the signal has aliased. At the top is a 256x256 pixel image showing a grid obtained by multiplying two sinusoids with linearly increasing frequency — one in x and one in y. The other images in the series are obtained by resampling by factors of two. To avoid aliasing at any orientation, the effective frequency r must be limited to 05.05.2009 Dr. Pierre Elbischger - MIP0'09SS - Fourier Transform 24 Examples (1) Rectangular pulse Strong oscillating spectrum (sinc-function) Stretching the image contracts the spectrum Repetitive pattern three dominant orientations Enlarging the image contracts the spectrum Superposition of image patterns Image rotation The dark beam in (b) causes broadband effects 0°, 15° and 30° 05.05.2009 Dr. Pierre Elbischger - MIP0'09SS - Fourier Transform 25 Examples (2) Natural images with no dominant orientation Print pattern Natural images with repetitive structures orientation 05.05.2009 Dr. Pierre Elbischger - MIP0'09SS - Fourier Transform 26 ...
View Full Document

This note was uploaded on 07/09/2009 for the course MEDIT 1 taught by Professor Pierreelschbinger during the Spring '09 term at Carinthia University of Applied Sciences.

Ask a homework question - tutors are online