Converting an image to frequency response

Sir, i want to convert a 2D image into its corresponding frequency plot. I tried this code but it is giving a blank graph for all the images.
I= imread('abc.jpg');
grayImage = rgb2gray(I);
subplot(1,2,1);
imshow(grayImage);
axis on;
ft = fftshift(log(abs(fft2(grayImage))));
subplot(1,2,2);
imshow(ft, []);
axis on;

댓글 수: 2

gulu
gulu 2015년 1월 12일
Thank u for your help.. but is there any other way than using fft to plot the signal of an image. I will be thankful for your help.
Image Analyst
Image Analyst 2015년 1월 12일
You can use pwelch but I think that may need a 1D signal. Why do you need a different method?

댓글을 달려면 로그인하십시오.

 채택된 답변

Image Analyst
Image Analyst 2015년 1월 12일

0 개 추천

See my attached demos. If you still have problems, write back.

추가 답변 (0개)

질문:

2015년 1월 12일

댓글:

2015년 1월 12일

Community Treasure Hunt

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

Start Hunting!

Translated by