在网上很粗略地搜了一下,没发现比较好的例子。先自己用matlab做了一些供参考。
matlab对应的代码:
% clc;
clear;
c1 = imread('../images/symmetric1.jpg');
c2 = imread('../images/symmetric2.png');
c3 = imread('../images/exp_fft2.jpeg');
F1 = fft2(c1);
F2 = fft2(c2);
F3 = fft2(c3);
fft2_visualization(F1);
fft2_visualization(F2);
fft2_visualization(F3);
可视化代码
function fft2_visualization(F) % 可视化代码,用的是stackoverflow上的回答 % http://stackoverflow.com/questions/13549186/how-to-plot-a-2d-fft-in-matlab figure; F = fftshift(F); % Center FFT F = abs(F); % Get the magnitude F = log(F+1); % Use log, for perceptual scaling, and +1 since log(0) is undefined F = mat2gray(F); % Use mat2gray to scale the image between 0 and 1 imshow(F,[]); % Display the result end
图与可视化如下
图像一:斜方向的周期性比较多

结果如下,可以看到对角方向比较强
图像二:水平竖直方向的周期性较多,斜方向的周期性减弱

结果如下

图像三:经典图像

傅里叶变换后的可视化如下,可以看到就不那么有规律可言了。

