WolframAlpha.com
WolframCloud.com
All Sites & Public Resources...
Products & Services
Wolfram|One
Mathematica
Wolfram|Alpha Notebook Edition
Finance Platform
System Modeler
Wolfram Player
Wolfram Engine
WolframScript
Enterprise Private Cloud
Application Server
Enterprise Mathematica
Wolfram|Alpha Appliance
Enterprise Solutions
Corporate Consulting
Technical Consulting
Wolfram|Alpha Business Solutions
Resource System
Data Repository
Neural Net Repository
Function Repository
Wolfram|Alpha
Wolfram|Alpha Pro
Problem Generator
API
Data Drop
Products for Education
Mobile Apps
Wolfram Player
Wolfram Cloud App
Wolfram|Alpha for Mobile
Wolfram|Alpha-Powered Apps
Services
Paid Project Support
Wolfram U
Summer Programs
All Products & Services »
Technologies
Wolfram Language
Revolutionary knowledge-based programming language.
Wolfram Cloud
Central infrastructure for Wolfram's cloud products & services.
Wolfram Science
Technology-enabling science of the computational universe.
Wolfram Notebooks
The preeminent environment for any technical workflows.
Wolfram Engine
Software engine implementing the Wolfram Language.
Wolfram Natural Language Understanding System
Knowledge-based broadly deployed natural language.
Wolfram Data Framework
Semantic framework for real-world data.
Wolfram Universal Deployment System
Instant deployment across cloud, desktop, mobile, and more.
Wolfram Knowledgebase
Curated computable knowledge powering Wolfram|Alpha.
All Technologies »
Solutions
Engineering, R&D
Aerospace & Defense
Chemical Engineering
Control Systems
Electrical Engineering
Image Processing
Industrial Engineering
Mechanical Engineering
Operations Research
More...
Finance, Statistics & Business Analysis
Actuarial Sciences
Bioinformatics
Data Science
Econometrics
Financial Risk Management
Statistics
More...
Education
All Solutions for Education
Tech & Trends
Machine Learning
Multiparadigm Data Science
High-Performance Computing
Quantum Computation Framework
Software & Web
Software Development
Authoring & Publishing
Interface Development
Web Development
Sciences
Astronomy
Biology
Chemistry
More...
All Solutions »
Learning & Support
Learning
Wolfram Language Documentation
Fast Introduction for Programmers
Wolfram U
Videos & Screencasts
Wolfram Language Introductory Book
Webinars & Training
Summer Programs
Books
Need Help?
Support FAQ
Wolfram Community
Contact Support
Premium Support
Paid Project Support
Technical Consulting
All Learning & Support »
Company
About
Company Background
Wolfram Blog
Events
Contact Us
Work with Us
Careers at Wolfram
Internships
Other Wolfram Language Jobs
Initiatives
Wolfram Foundation
MathWorld
Computer-Based Math
A New Kind of Science
Wolfram Technology for Hackathons
Student Ambassador Program
Wolfram for Startups
Demonstrations Project
Wolfram Innovator Awards
Wolfram + Raspberry Pi
Summer Programs
More...
All Company »
Search
Legacy Documentation
Digital Image Processing
(2000)
This is documentation for an obsolete product.
Current products and services
User's Guide
Image Transforms
8.2 Discrete Fourier Transform
The discrete Fourier transform (DFT) is a frequency domain representation of finite-extent sequences. The DFT is a decomposition of a finite-extent sequence by a family of complex exponential sequences. The DFT of a discrete-time sequence of length N is itself a sequence of length
N
.
The DFT plays a central role in the implementation of many signal and image processing algorithms. Particularly important has been the discovery of a fast algorithm, the fast Fourier transform (FFT) [
Coo65
], that reduces the number of complex multiplications needed to compute an
N
-point DFT by a factor of
.
Transform
Short
DiscreteFourierTransform
[
img
]
DFT[
img
]
discrete Fourier transform of
img
InverseDiscreteFourierTransform
[
coef
]
IDFT[
coef
]
inverse discrete Fourier transform of
coef
FourierMatrix
[
n
]
returns an
n
×
n
matrix of
n-
Fourier basis sequences
Image transforms.
The 1D discrete Fourier transform (1D DFT) is a unique decomposition of a discrete-time, finite-length signal onto a finite family (basis) of discrete, periodic, complex exponential sequences of the form
, where k,n,N
(integers). The ratio
is the fundamental frequency. The symmetric DFT formulation is given by the following pair of equations:
X[k] is known as the
N
-point DFT of the sequence x[n]. Equations (8.2.1) and (8.2.2) are the analysis and synthesis equations, respectively.
This loads the
ImageProcessing
package.
In[1]:=
We conclude this section with a couple of examples of computing the DFT. We first calculate the DFT of the following sequence:
Here is the sequence x[n] of length 32 and its DFT.
In[2]:=
Out[2]=
The 2D discrete Fourier transform (2D DFT) is a straightforward extension of the 1D formulation. The DFT X[k
1
,k
2
] of a 2D sequence
x[n
1
,n
2
] , with
, is defined as
for 0≤k
1
≤N
1
-1, 0≤k
2
≤N
2
-1 and
for 0≤ n
1
≤N
1
-1, 0≤n
2
≤N
2
-1.
Next we obtain the DFT of a 2D sequence defined by the following formula:
Here is the N×N matrix representation of this sequence (N=8).
In[3]:=
Out[3]//MatrixForm=
Here is the 32-point DFT of the sequence x[n
1
,n
2
].
In[4]:=
Here we plot the magnitude and phase of the 2D example sequence.
In[5]:=
Out[5]=
Finally, we compute the 2D DFT of one of the example images.
In[6]:=
Here is the original image.
In[7]:=
Out[7]=
Here we display the magnitude (left) and phase (right) spectra of the image.
In[8]:=
Out[8]=
In visualizing the frequency response of a sequence, it is common to use a centered DFT domain.
In[9]:=
Out[9]=
The energy compaction property of the DFT is clearly visible. Most of the signal's energy is concentrated at the four corners of the DFT magnitude matrix, which are the low-frequency zones of the transform domain. Note that a large majority of the Fourier coefficients have relatively small values and therefore contribute little to the signal's total energy.
Enable JavaScript to interact with content and submit forms on Wolfram websites.
Learn how »