傅里叶位移定理 matlab [英] fourier shift theorem matlab

查看:36
本文介绍了傅里叶位移定理 matlab的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在尝试理解二维傅立叶位移定理.

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))));

在我看来,所有 3 个震级图都应该产生相同的结果.谁能解释一下我在这里做错了什么?

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

非常感谢您的帮助,

最好的问候,

迷你

推荐答案

我认为你想使用 fft2,而不是 fft.

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

fft2 计算二维傅立叶变换,这就是您所说的您正在研究的内容.fft 只计算每一行的傅立叶变换.

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

如果您在代码中将 fft2 替换为 fft,一切都应该可以正常工作.

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

这篇关于傅里叶位移定理 matlab的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆