How to Plot the discrete Fourier transform on an image ?

How to Plot the discrete Fourier transform on an image ?

4 Comments

What does that mean? The FT of an image is another image, or probably two of them, a real image and a imaginary image. When I think of a plot I think of a line curve. So what are you thinking of when you say that you want to plot a complex image ON an image (presumably the space domain original image)?
Question is that
Write a matlab program to input an image
a-) Find the fourier transformation of the intensity values b-) plot the magnitude results obtained in (a) c-) plot the discrete fourier transformation d-)reverse the process e-) plot the image in (d)
i didnt understand this question i didnt find any anwser :(
Perhaps it means to extract just one row of the FT image and plot that with the plot() function??? I'm not sure - it's your call.
yes exactly plot is plot() func.

Sign in to comment.

Answers (2)

%a
I=I=im2double(imread('circuit.tif'));
%b
F=fftshift(fft2(I)); % surface(abs(F))
%c
plot(abs(F)) % plot not surf
%d
IF=ifft2(fftshift(F));
%e
figure, imshow(IF)
Extract a line from the FFt image and plot it.
fftImage = fft2(grayImage);
fftImageRealPart = real(fftImage);
[rows, columns] = size(fftImageRealPart)
lineNumber = floor(rows/2); % Middle row
oneLine = fftImageRealPart(lineNumber, :);
plot(oneLine, 'r-', 'LineWidth', 2);
grid on;
I'm omitting the usual comments and other fancy display/plotting things that I usually include to make it shorter and simpler for you.

Asked:

on 23 Dec 2013

Answered:

on 23 Dec 2013

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!