Can some one interprete for me this fft code in detail?

1 view (last 30 days)
Hello, I would sometime to interprete for me this code, placing emphasis on the differences in the operations produced when fft2 is applied other than the obvious observation that one has a multiplication by 100.
F = fft2(lena); imagesc(100*log(1+abs(fftshift(F)))); colormap(gray); figure;
F = fft2(lena); F = fftshift(F); F = abs(F); F = log(F+1); F = mat2gray(F); imshow(F,[]);
Thanx, Stephen

Answers (1)

Image Analyst
Image Analyst on 3 Sep 2014
One calls imagesc() so it will be pseudocolored until you call colormap(gray) when it will have 64 gray levels, while one calls imshow() which will be gray scale displayed with 256 gray levels. mat2gray scales the F to the range 0-1. Not sure what else you were thinking of.

Categories

Find more on Fourier Analysis and Filtering in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!