Lena Image Fourier Transform

5 ビュー (過去 30 日間)
Algorithms Analyst
Algorithms Analyst 2012 年 9 月 20 日
Can any one transform the image into its fourier transformation using matlab?
Thanks

回答 (2 件)

Wayne King
Wayne King 2012 年 9 月 20 日
編集済み: Wayne King 2012 年 9 月 20 日
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 件のコメント
Algorithms Analyst
Algorithms Analyst 2012 年 9 月 21 日
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 2012 年 9 月 21 日
There is no colormap named "in2rgb"

サインインしてコメントする。


Dr. Deepak Kumar Rout
Dr. Deepak Kumar Rout 2012 年 9 月 21 日
to the above code you have to add syntax so as to multiply (-1)^(x+y) that will center the low frequency components
  12 件のコメント
Image Analyst
Image Analyst 2012 年 9 月 23 日
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 2012 年 9 月 24 日
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

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeImage Processing Toolbox についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by