Three Quick and Easy Matlab 2D Filter Functions
In image processing (indeed in any signal processing), filtering is one of the most
important and frequenctly used operations. However, many situations, especially in
the initial stages of development, do not require an extremely specialized or
optomized filter. The following three Matlab functions provide a very quick method to
create the impulse response of two dimensional low, high, and bandpass filters.
The functions all involve creating a frequency domain prototype and then calculating
the filter coefficients using intrinsic Matlab functions. The three functions
automatically create the prototype and return the time domain impulse response.
All three functions take as arguments the desired order (or size) of the returned impulse
response and the normalized frequency cutoff(s). As indicated below, the resultant
filter is not identical to the desired. However, as expected, the resultant filter
improves as the order is increased:
These functions were created in Matlab for Windows 4.2 from
The MathWorks, Inc. and require the Image
Processing Toolbox.
Feel free to use and modify the code as you see fit. E-mail me if you have any
comments or corrections about the preceding discussion!!
Return to Paul Hartke's Homepage
If you have any comments or questions, contact Paul Hartke at
HartkePM@saber.udayton.edu.
This page was last modified on
28 September 1996 by Paul Hartke.