From: John Swensen <address@hidden>
Subject: Re: bandpass filter for 2D Data
To: "Dr. Johannes Zellner" <address@hidden>
Cc: address@hidden
Date: Thursday, August 27, 2009, 12:58 PM
On Aug 27, 2009, at 3:15 AM, Dr. Johannes Zellner wrote:
Hi
does anyone have an implementation of a 2D bandpass
filter?
Suppose I've 2d data in a matrix of 1000 x 1000 pixels
which
represents a spatial extension of 1 m (1 mm per
pixel).
Now I'd like to filter away all frequencies below a
wavelength of 50
mm and above a wavelength of 150 mm,
so the resulting data should only have frequencies
corresponding to
wavelengths between 50 and 150 mm.
Any octave examples for this?
--
Johannes
_______________________________________________
Help-octave mailing list
address@hidden
https://www-old.cae.wisc.edu/mailman/listinfo/help-octave
I don't know if there is an example of how to do this, but
I think I
remember doing the following pseudocode in my computer
visions class:
1) perform the 2D FFT
2) figure out, based on your spatial sampling frequency,
how much one
"pixel" in the magnitude portion of the 2D FFT is
3) set everything but an annulus whose larger radius
equates to 150mm
wavelength and inner radius equates to 50mm to zero.
4) Perform the inverse 2D FFT
Someone please correct me if this doesn't work, but I think
this ends
up being a fairly quick way to do what you ask and easy to
implement.
John Swensen
_______________________________________________