WolframAlpha.com
WolframCloud.com
All Sites & Public Resources...
Products & Services
Mathematica
Mathematica Online
Development Platform
Programming Lab
Data Science Platform
Finance Platform
SystemModeler
Enterprise Private Cloud
Enterprise Mathematica
Wolfram|Alpha Appliance
Enterprise Solutions
Corporate Consulting
Technical Services
Wolfram|Alpha Business Solutions
Products for Education
Wolfram|Alpha
Wolfram|Alpha Pro
Problem Generator
API
Data Drop
Mobile Apps
Wolfram Cloud App
Wolfram|Alpha for Mobile
Wolfram|Alpha-Powered Apps
Services
Paid Project Support
Training
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.
Computable Document Format
Computation-powered interactive documents.
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...
Education
All Solutions for Education
Web & Software
Authoring & Publishing
Interface Development
Software Engineering
Web Development
Finance, Statistics & Business Analysis
Actuarial Sciences
Bioinformatics
Data Science
Econometrics
Financial Risk Management
Statistics
More...
Sciences
Astronomy
Biology
Chemistry
More...
Trends
Internet of Things
High-Performance Computing
Hackathons
All Solutions »
Support & Learning
Learning
Wolfram Language Documentation
Fast Introduction for Programmers
Training
Videos & Screencasts
Wolfram Language Introductory Book
Virtual Workshops
Summer Programs
Books
Need Help?
Support FAQ
Wolfram Community
Contact Support
Premium Support
Premier Service
Technical Services
All Support & Learning »
Company
About
Company Background
Wolfram Blog
Announcements
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
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 »