fourier shift theorem matlab

自闭症网瘾萝莉.ら 提交于 2019-12-23 13:38:14

问题


I'm currently trying to understand the 2d fourier shift theorem.

According to what I've learnd so far a translation in the image space leads to differences in phase but not the magnitude in frequency space.

I tried to demonstrate this with a little example but it only worked for shifts in rows but not in columns. Here's the little demo (I'm only showing the magnitude plots here)

clear all
close all
Iin = zeros(128);
Iin(10:20,10:20)=1;
figure,imagesc(Iin)
Y = fft(Iin);
figure, imagesc(fftshift(log10(abs(Y))));

Iin = zeros(128);
Iin(10:20,20:30)=1;
figure,imagesc(Iin)
Y = fft(Iin);
figure, imagesc(fftshift(log10(abs(Y))));

Iin = zeros(128);
Iin(20:30,10:20)=1;
figure,imagesc(Iin)
Y = fft(Iin);
figure, imagesc(fftshift(log10(abs(Y))));

In my opinion all 3 magnitude plots should yield the same result. Can anyone explain me what I'm doing wrong here?

Thank you very much for your help,

best regards,

Mini


回答1:


I think you want to use fft2, not fft for this.

fft2 calculates the 2d fourier transform, which is what you stated you are studing. fft only calculates the fourier transform of each row.

Everything should work if you just substitute fft2 for fft in your code.



来源:https://stackoverflow.com/questions/13811083/fourier-shift-theorem-matlab

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!