EE 7730 2 D Discrete Fourier Transform DFT
- Slides: 42
EE 7730 2 D Discrete Fourier Transform (DFT) Bahadir K. Gunturk EE 7730 - Image Analysis I
2 D Discrete Fourier Transform n 2 D Discrete Fourier Transform (DFT) 2 D DFT is a sampled version of 2 D FT. Bahadir K. Gunturk EE 7730 - Image Analysis I 2
2 D Discrete Fourier Transform n 2 D Discrete Fourier Transform (DFT) where n and Inverse DFT Bahadir K. Gunturk EE 7730 - Image Analysis I 3
2 D Discrete Fourier Transform n It is also possible to define DFT as follows where n and Inverse DFT Bahadir K. Gunturk EE 7730 - Image Analysis I 4
2 D Discrete Fourier Transform n Or, as follows where n and Inverse DFT Bahadir K. Gunturk EE 7730 - Image Analysis I 5
2 D Discrete Fourier Transform Bahadir K. Gunturk EE 7730 - Image Analysis I 6
2 D Discrete Fourier Transform Bahadir K. Gunturk EE 7730 - Image Analysis I 7
2 D Discrete Fourier Transform Bahadir K. Gunturk EE 7730 - Image Analysis I 8
2 D Discrete Fourier Transform Bahadir K. Gunturk EE 7730 - Image Analysis I 9
Periodicity n [M, N] point DFT is periodic with period [M, N] 1 Bahadir K. Gunturk EE 7730 - Image Analysis I 10
Periodicity n [M, N] point DFT is periodic with period [M, N] 1 Bahadir K. Gunturk EE 7730 - Image Analysis I 11
Convolution n Be careful about the convolution property! Length=P Length=Q Length=P+Q-1 For the convolution property to hold, M must be greater than or equal to P+Q-1. Bahadir K. Gunturk EE 7730 - Image Analysis I 12
Convolution n Zero padding 4 -point DFT (M=4) Bahadir K. Gunturk EE 7730 - Image Analysis I 13
DFT in MATLAB n Let f be a 2 D image with dimension [M, N], then its 2 D DFT can be computed as follows: Df = fft 2(f, M, N); n n n puts the zero-frequency component at the top-left corner. fftshifts the zero-frequency component to the center. (Useful for visualization. ) Example: fft 2 f = imread(‘saturn. tif’); f = double(f); Df = fft 2(f, size(f, 1), size(f, 2)); figure; imshow(log(abs(Df)), [ ]); Df 2 = fftshift(Df); figure; imshow(log(abs(Df 2)), [ ]); Bahadir K. Gunturk EE 7730 - Image Analysis I 14
DFT in MATLAB f Df = fft 2(f) After fftshift Bahadir K. Gunturk EE 7730 - Image Analysis I 15
DFT in MATLAB n Let’s test convolution property f = [1 1]; g = [2 2 2]; Conv_f_g = conv 2(f, g); figure; plot(Conv_f_g); Dfg = fft (Conv_f_g, 4); figure; plot(abs(Dfg)); Df 1 = fft (f, 3); Dg 1 = fft (g, 3); Dfg 1 = Df 1. *Dg 1; figure; plot(abs(Dfg 1)); Df 2 = fft (f, 4); Dg 2 = fft (g, 4); Dfg 2 = Df 2. *Dg 2; figure; plot(abs(Dfg 2)); Inv_Dfg 2 = ifft(Dfg 2, 4); figure; plot(Inv_Dfg 2); Bahadir K. Gunturk EE 7730 - Image Analysis I 16
DFT in MATLAB n Increasing the DFT size f = [1 1]; g = [2 2 2]; Df 1 = fft (f, 4); Dg 1 = fft (g, 4); Dfg 1 = Df 1. *Dg 1; figure; plot(abs(Dfg 1)); Df 2 = fft (f, 20); Dg 2 = fft (g, 20); Dfg 2 = Df 2. *Dg 2; figure; plot(abs(Dfg 2)); Df 3 = fft (f, 100); Dg 3 = fft (g, 100); Dfg 3 = Df 3. *Dg 3; figure; plot(abs(Dfg 3)); Bahadir K. Gunturk EE 7730 - Image Analysis I 17
DFT in MATLAB n Scale axis and use fftshift f = [1 1]; g = [2 2 2]; Df 1 = fft (f, 100); Dg 1 = fft (g, 100); Dfg 1 = Df 1. *Dg 1; t = linspace(0, 1, length(Dfg 1)); figure; plot(t, abs(Dfg 1)); Dfg 1_shifted = fftshift(Dfg 1); t 2 = linspace(-0. 5, length(Dfg 1_shifted)); figure; plot(t, abs(Dfg 1_shifted)); Bahadir K. Gunturk EE 7730 - Image Analysis I 18
Example Bahadir K. Gunturk EE 7730 - Image Analysis I 19
Example Bahadir K. Gunturk EE 7730 - Image Analysis I 20
DFT-Domain Filtering a = imread(‘cameraman. tif'); Da = fft 2(a); Da = fftshift(Da); figure; imshow(log(abs(Da)), []); H = zeros(256, 256); H(128 -20: 128+20, 128 -20: 128+20) = 1; figure; imshow(H, []); H Db = Da. *H; Db = fftshift(Db); b = real(ifft 2(Db)); figure; imshow(b, []); Frequency domain Bahadir K. Gunturk EE 7730 - Image Analysis I Spatial domain 21
Low-Pass Filtering 61 x 61 Bahadir K. Gunturk 81 x 81 EE 7730 - Image Analysis I 121 x 121 22
Low-Pass Filtering h = * DFT(h) Bahadir K. Gunturk EE 7730 - Image Analysis I 23
High-Pass Filtering h = * DFT(h) Bahadir K. Gunturk EE 7730 - Image Analysis I 24
High-Pass Filtering High-pass filter Bahadir K. Gunturk EE 7730 - Image Analysis I 25
Anti-Aliasing a=imread(‘barbara. tif’); Bahadir K. Gunturk EE 7730 - Image Analysis I 26
Anti-Aliasing a=imread(‘barbara. tif’); b=imresize(a, 0. 25); c=imresize(b, 4); Bahadir K. Gunturk EE 7730 - Image Analysis I 27
Anti-Aliasing a=imread(‘barbara. tif’); b=imresize(a, 0. 25); c=imresize(b, 4); H=zeros(512, 512); H(256 -64: 256+64, 256 -64: 256+64)=1; Da=fft 2(a); Da=fftshift(Da); Dd=Da. *H; Dd=fftshift(Dd); d=real(ifft 2(Dd)); Bahadir K. Gunturk EE 7730 - Image Analysis I 28
Noise Removal n For natural images, the energy is concentrated mostly in the low-frequency components. “Einstein” DFT of “Einstein” Profile along the red line Signal vs Noise=40*rand(256, 256); Bahadir K. Gunturk EE 7730 - Image Analysis I 29
Noise Removal n At high-frequencies, noise power is comparable to the signal power. Signal vs Noise n Low-pass filtering increases signal to noise ratio. Bahadir K. Gunturk EE 7730 - Image Analysis I 30
Appendix Bahadir K. Gunturk EE 7730 - Image Analysis I 31
Appendix: Impulse Train ■ The Fourier Transform of a comb function is Bahadir K. Gunturk EE 7730 - Image Analysis I 32
Impulse Train (cont’d) ■ The Fourier Transform of a comb function is (Fourier Trans. of 1) ? Bahadir K. Gunturk EE 7730 - Image Analysis I 33
Impulse Train (cont’d) ■ Proof Bahadir K. Gunturk EE 7730 - Image Analysis I 34
Appendix: Downsampling n Question: What is the Fourier Transform of Bahadir K. Gunturk EE 7730 - Image Analysis I ? 35
Downsampling n Let Using the multiplication property: Bahadir K. Gunturk EE 7730 - Image Analysis I 36
Downsampling where Bahadir K. Gunturk EE 7730 - Image Analysis I 37
Example Bahadir K. Gunturk EE 7730 - Image Analysis I 38
Example ? Bahadir K. Gunturk EE 7730 - Image Analysis I 39
Downsampling Bahadir K. Gunturk EE 7730 - Image Analysis I 40
Example Bahadir K. Gunturk EE 7730 - Image Analysis I 41
Example No aliasing if Bahadir K. Gunturk EE 7730 - Image Analysis I 42
- Forward and inverse fourier transform
- Discrete fourier transform
- Discrete time fourier transform
- Discrete fourier transform
- Fftshift
- Fourier transform formula
- Discrete fourier transform
- Dft
- Fft decimation in frequency
- Application of discrete fourier transform
- Magnitude and phase response
- Fourier analysis of discrete time signals
- Transformée de fourier discrète
- Discrete time fourier series
- Discrete cosine transform formula
- Fast dct
- Dft
- Transform and conquer
- Relationship between laplace and fourier transform
- Fourier series of even periodic function contains only
- Fast fourier transform in r
- Fourier transform of kronecker delta
- Filter
- Sinc squared function
- Fourier transform trading indicator
- Fast fourier transform (fft)
- Polar fourier series
- Fourier transform computer vision
- Frequency differentiation property of fourier transform
- Fft integer multiplication
- Parseval's identity for fourier transform
- Fourier transform formula
- Windowed fourier transform
- Convolution laplace transform
- Fourier transform of impulse train
- Fourier transform is defined for
- Fourier transform
- Inverse fourier transform formula
- Inverse fourier transform of unit step function
- Transformata laplace calculator
- Fourier transform of ramp function
- Introduction to fast fourier transform
- Chirped pulse fourier transform microwave spectroscopy