首页 > 其他 > 详细

证明2D-FFT能够拆分成两个1D-FFT

时间:2015-05-25 14:49:58      阅读:320      评论:0      收藏:0      [点我收藏+]

经常可以在文献上看到2D-FFT能够以两个1D-FFT来实现,今天我用MATLAB证明了,的确如此。MATLAB的代码如下

clear all;
clc;
f=ones(256,256);
center_loc = size(f);
rd = 2;
f(round(center_loc(1)/2)-rd:round(center_loc(1)/2)+rd, round(center_loc(2)/2)-rd:round(center_loc(2)/2)+rd) = 0;
figure(1);imshow(f);
f2=fft2(f);
f3=(abs(f2));
figure(2);imshow(f3);

tmp=zeros(center_loc(1),center_loc(2));
%-the first 1D-FFT, for each row
for i= 1:center_loc(1)
    tmp(i, :) = fft(f(i, :), center_loc(2));
end
%-transpose the tmp, for column-based 1d-fft
tmp = tmp‘;
%-the second 1d-fft, for each column
for i= 1:center_loc(1)
    tmp(i, :) = fft(tmp(i, :), center_loc(2));
end
tt = abs(tmp);
figure(3); imshow(tt);


以下三张图从上到下,分别对应代码中的figure(1~3)。

Figure(1):

技术分享

figure(2):

技术分享


figure(3):


技术分享



证明2D-FFT能够拆分成两个1D-FFT

原文:http://rchen.blog.51cto.com/3126333/1654896

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!