Lena Image Fourier Transform

조회 수: 7 (최근 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 CenterFile Exchange에서 Image Segmentation and Analysis에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by