Definitions of Fourier Transform:
- The time domain (or spatial domain for image processing) and the frequency domain are both continuous, infinite domains. There is no explicit or implied periodicity in either domain. This is the one I call the Fourier transform.
- The time domain is continuous and the time-domain functions are periodic. The frequency domain is discrete. I call this the Fourier series.
- The time domain is discrete and infinite, and the frequency domain is continuous. In the frequency domain the transform is periodic. This is the discrete-time Fourier transform (DTFT).
- The time domain and the frequency domain are both discrete and finite. Although finite, the time and frequency domains are both implicitly periodic. This form is the discrete Fourier transform (DFT).
Fourier Visualization:
Here is the first example, the input image contains the single sinusoidal pattern, while doing 2D Discrete Fourier Transform it can be seen that the output contains slanting line which actually contributes to the image energy along with some vertical and horizontal lines. The reason can be understood by replicating the first picture as shown and you can easily see the discontinuity in the edges (horizontal and vertical lines). This discontinuity has broad range of energy in various frequency bands and thus contributing to straight vertical and horizontal lines. This effect can be removed by tapering the boundaries with zeros intensity values. The output of the Fourier transform after tapering is shown in the last figure.
MATLAB CODE:
url = 'http://blogs.mathworks.com/images/steve/2009/lines.png';
f = imread(url);
imshow(f)
F = fft2(f); %2D Discrete Fourier Transform using Fast fourier transform method
imshow(log(abs(fftshift(F)) + 1), []) %To plot the output
I4 = repmat(I, 2, 2); %to repeat the image
imshow(I4)
[M, N] = size(f);
w1 = cos(linspace(-pi/2, pi/2, M)); %Tapering the Edges
w2 = cos(linspace(-pi/2, pi/2, N));
w = w1' * w2;
f2 = im2uint8(im2single(f) .* w);
imshow(f2)
Comments
Post a Comment