Lena Image Fourier Transform

5 Ansichten (letzte 30 Tage)
Algorithms Analyst
Algorithms Analyst am 20 Sep. 2012
Can any one transform the image into its fourier transformation using matlab?
Thanks

Antworten (2)

Wayne King
Wayne King am 20 Sep. 2012
Bearbeitet: Wayne King am 20 Sep. 2012
Yes, use fft2()
This question seems identical (but with less detail) to this one:
It is not good practice to simply keep creating a new thread for the same question. I think you will get much more help if you show what you have tried; the code you have written.
  6 Kommentare
Algorithms Analyst
Algorithms Analyst am 21 Sep. 2012
my code is here.
imageA=imread('lena.bmp');
figure,imshow(imageA)
title('Original Grayscale Lena Image');
imageA=double(rgb2gray(imageA));
fftA=fft2(imageA);
figure,imagesc(abs(fftshift(fftA)));
colormap gray;
imagesc(log(abs(fftshift(fftA))));
title('RGB lena Image Magnitude throught Fourier Transforms');
figure,imshow(angle(fftshift(fftA)),[-pi,pi]),colormap gray
title('RGB Lena Image Phase through fourier transform');
fftB = abs(fftA).*exp(i*angle(fftA));
imageB=ifft2(fftB);
cmin=min(min(abs(imageB)));
cmax=max(max(abs(imageB)));
figure,imshow(abs(imageB),[cmin cmax]); colormap in2rgb;
Walter Roberson
Walter Roberson am 21 Sep. 2012
There is no colormap named "in2rgb"

Melden Sie sich an, um zu kommentieren.


Dr. Deepak Kumar Rout
Dr. Deepak Kumar Rout am 21 Sep. 2012
to the above code you have to add syntax so as to multiply (-1)^(x+y) that will center the low frequency components
  12 Kommentare
Image Analyst
Image Analyst am 23 Sep. 2012
I think you misunderstood. I did not ask "Did this code work?", I asked "What about the code did not work?". In other words, I assume you tried what I suggested and am asking why it didn't work, for example you had an error message or unexpected results and what was the error message or unexpected result.
Usually people try to help people who are trying to help them. One word answers tell people that they're not interested in investing enough time to allow people to help them, which leads us volunteers to not help. I can't solve problems with single words so if you give them, and want responses just as terse, then I'm not your man. You get what you give.
Algorithms Analyst
Algorithms Analyst am 24 Sep. 2012
I can understand you.may be you are right.But where should I integrate this code
fftofChannel=fft(redchannel)
where should I integrate it with my code.As fftB = abs(fftA).*exp(i*angle(fftA)); imageB=ifft2(fftb)
where should I add it. Thanks

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Image Processing Toolbox finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by