How to perform 2-D DFT via 1-D DFT

Take the 1-D DFT of one image, first row-wise 1-D DFT and followed by column-wise 1-D DFT to create the resulting F1(u,v) .

 Réponse acceptée

Wayne King
Wayne King le 28 Juin 2012

0 votes

It actually doesn't matter, but you can do this
X = randn(8,8);
Y = fft2(X);
% ok let's first take the DFT along the rows
rowdft = fft(X,[],2);
% now take it along the columns
coldft = fft(rowdft,[],1);
max(max(abs(coldft-Y)))
See the maximum difference in absolute value is only on the order of 10^(-15)

1 commentaire

P
P le 30 Jan 2013
Can you perform this same function without using fft2 or fft? that is doing the 2d dft first along the row and then along the col without using fft2 or fft.

Connectez-vous pour commenter.

Plus de réponses (1)

Wayne King
Wayne King le 22 Juin 2012

0 votes

Here is an example that shows you how to do it
X = randn(8,8);
fft2(X)
% now use fft
fft(fft(X).').'

1 commentaire

Khoa
Khoa le 22 Juin 2012
but there is something like "first row-wise 1-D DFT and followed by column-wise 1-D DFT to create the resulting F1(u,v) ". I really dont understand this.

Connectez-vous pour commenter.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by