Fourier Matlab shift theorem

I'm currently trying to understand the two-dimensional shift theorem.

In accordance with what I have studied so far, translation in the space of images leads to differences in phase, but not to magnitude in the frequency space.

I tried to demonstrate this with a small example, but it worked only for line offsets, but not in columns. Here is a small demonstration (here I show only graphs of quantities)

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-digit charts should give the same result. Can someone explain to me what I'm doing wrong here?

Many thanks for your help,

Best wishes,

Mini

+4
source share
1 answer

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

fft2 computes the 2d Fourier transform, which, as you stated, you are studying. fft only calculates the Fourier transform of each row.

Everything should work if you just replace fft2 with fft in your code.

+3
source

All Articles