TAGS :Viewed: 11 - Published at: a few seconds ago

[ Matlab Image FFT ]

AFter calculating FFT for 2-D matrix. I want to plot the spectrum. I used the command imshow for displaying image.

But i also want to display the frequncy values on X and Y axis. I'm unable to use linspace command.

Can someone help in plotting the frequency values on Axis.

%imshow(FF,[]) is my command for 256*256 image. Now I want to keep the tick labels on putput image. say 1,50,100,150,200 on both axis. please write the code for it.that could be really helpful

Answer 1


It is a bit unclear what you want to achieve, but here is a code snippet for plotting the Fourier transform of an image.

% Compute Fourier transform
f = imread(X);        % Reading some image X
F = fft2(double(f));  % Taking Fourier transform to the input image

% Show transform image using imshow (by scaling to range 0-255)
imshow(F./max(max(F))*255);