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
Filter Design
9.4 2D FIR Filter Design Methods
A common method of obtaining 2D filters is to obtain them indirectly by transforming 1D prototypes. The simplest method imposes rectangular symmetry on the resulting 2D filter by taking the outer product of two 1D filters. Its impulse response is separable and may be written as a product of two 1D impulse responses.
for 0≤n
1
≤N
1
-1 and 0≤n
2
≤N
2
-1. Typically, f = g.
In order to obtain a circularly symmetric 2D filter from a 1D prototype, the common approach is to use the McClellan transformation or simply the frequency transformation [
McC73a
]. The resulting filters have good performance, circular symmetry, and under a restricted set of conditions, have been shown to be optimal.
FrequencyTransformation
[
h
]
returns a circularly symmetric
2
D FIR filter from 1D prototype
h
using the McClellan frequency transformation
Filter2D
[
h
,
g
]
returns
1D to 2D conversion functions.
This loads the package.
In[1]:=
Here we use the McClellan transformation to transform a 1D equiripple filter to a circularly symmetric 2D filter. The prototype filter is lowpass.
In[2]:=
This calculates the magnitude spectrum of the 2D lowpass filter using a 64-point DFT.
In[3]:=
This plots the magnitude spectrum.
In[4]:=
Out[4]=
A rectangularly supported 2D FIR filter based on the same 1D prototype has the following magnitude response.
In[5]:=
We can now view the magnitude spectrum of this filter by computing a 64-point DFT of the 2D sequence.
In[6]:=
Out[6]=
A direct method of designing 2D FIR filters is available by using windows. Design of 2D FIR filters using the window method is similar to its 1D counterpart. The infinite impulse response sequence is obtained from the ideal, desired frequency response by means of the inverse DTFT. Closed-form solutions exist for the 2D impulse response sequences of circularly symmetric filters [
Dud84
]. For example, the infinite impulse response sequence of the ideal, circularly symmetric lowpass filter is given by
WindowFilter2D
[
N
,
{
f
1
,
f
2
,
...
}
,
{
v
1
,
v
2
,
...
}
]
returns an
N
×
N
linear-phase FIR filter given a specification that consists of filter length
N
, cutoff frequencies
f
over the symmetric, normalized
0
and values of the frequency response
v
i
; the
2D filter design function.
For example, the infinite impulse response sequence of the ideal, circularly symmetric lowpass filter is given by
where J
1
(.) is the Bessel function of the first kind of order 1,
C
is the cutoff frequency, and
. A circularly symmetric highpass filter has an impulse response given by
where J
1
(.) is the Bessel function of the first kind of order 1,
C
is the cutoff frequency, and
. Other types of piecewise constant bandpass filters may be constructed from combinations of lowpass and highpass impulse responses. The impulse response is next truncated and smoothed with an appropriate window sequence.
DiscreteWindow2D
[
N
,
type
]
returns an
N
×
N
circularly symmetric window sequence with shape given by
type
DiscreteWindow2D
[
{
N
1
,
N
2
}
,
type
]
returns an
N
1
×
N
2
rectangularly symmetric window sequence with shape given by
type
2D window sequences.
Here we illustrate the design of a circularly symmetric lowpass filter using the window method. We use the same cutoff frequency as in the 1D design example, namely f
c
=0.225 Hz.
In[7]:=
Here we plot the filter's magnitude spectrum.
In[8]:=
Out[8]=
Enable JavaScript to interact with content and submit forms on Wolfram websites.
Learn how »