Image Processing Toolbox    
fft2

Compute two-dimensional fast Fourier transform

Syntax

Description

B = fft2(A) performs a two-dimensional fast Fourier transform (FFT), returning the result in B. B is the same size as A; if A is a vector, B has the same orientation as A.

B = fft2(A,m,n) truncates or zero pads A, if necessary, to create an m-by-n matrix before performing the FFT. The result B is also m-by-n.

Class Support

The input matrix A can be of class double or of any integer class. The output matrix B is of class double.

Remarks

fft2 is a function in MATLAB.

Example

Algorithm

fft2(A) is simply

This computes the one-dimensional fft of each column A, then of each row of the result. The time required to compute fft2(A) depends on the number of prime factors of m and n. fft2 is fastest when m and n are powers of 2.

See Also

dct2, fftshift, idct2, ifft2

fft, ifft in the MATLAB Function Reference


 erode fftn