comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: FFT OF A NON RECTANGULAR IMAGE
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: FFT OF A NON RECTANGULAR IMAGE [message #63071] Tue, 28 October 2008 14:07 Go to next message
R.G. Stockwell is currently offline  R.G. Stockwell
Messages: 363
Registered: July 1999
Senior Member
<pgrigis@gmail.com> wrote in message
news:3cb784b7-dfed-4c87-a2ab-d775d1edec0e@f40g2000pri.google groups.com...
> Maybe you could do a (slow) FT instead of FFT?
>
> Ciao,
>
> Paolo


Not directly. DFT and FFT are the same, the difference is in how the
calculation is done.


One could simply do a series of one dimensional FFTs on the data (each of
differing length,
and just combine them into a couple of image. i.e. just look at an image of
kx spectra,
then a different image of ky spectra.

Also, one can write the 2D FT as a series of 1D ffts, and perhaps that
approach
would get what the OP wants (if that is what you are talking about).


Cheers,
bob
Re: FFT OF A NON RECTANGULAR IMAGE [message #63075 is a reply to message #63071] Tue, 28 October 2008 13:15 Go to previous messageGo to next message
pgrigis is currently offline  pgrigis
Messages: 436
Registered: September 2007
Senior Member
Maybe you could do a (slow) FT instead of FFT?

Ciao,

Paolo

legall_al...@yahoo.fr wrote:
> Hi all:
>
> How can we do a FFT on a 2D-function that defines a non-rectangular
> image?
>
> Here is an example: the region of interest is an inclined ellipse. To
> be able to apply FFT(array,1), I created an array where all the pixels
> around the ellipse are set to the value zero. I would like to exclude
> from the FFT process the black area (zero value pixels) surrounding
> the ellipse.
>
>
> Thank you a lot in advance for your help,
>
> Alice Le Gall
Re: FFT OF A NON RECTANGULAR IMAGE [message #63079 is a reply to message #63075] Tue, 28 October 2008 11:58 Go to previous messageGo to next message
R.G. Stockwell is currently offline  R.G. Stockwell
Messages: 363
Registered: July 1999
Senior Member
<legall_alice@yahoo.fr> wrote in message
news:4a2c3474-def0-48fc-8611-05635d75f05d@v39g2000pro.google groups.com...
> Hi all:
>
> How can we do a FFT on a 2D-function that defines a non-rectangular
> image?
>
> Here is an example: the region of interest is an inclined ellipse. To
> be able to apply FFT(array,1), I created an array where all the pixels
> around the ellipse are set to the value zero. I would like to exclude
> from the FFT process the black area (zero value pixels) surrounding
> the ellipse.

No. The typical FFT requires uniform sampling, with constant length
rows and columns.

So if you put your ellipse of data into this form, then you are essentially
multiplying the rectangle with an eclipse shaped window (= 1 where you
have data, and 0 where you don't), and you are therefore convolving the
2D spectrum with the spectrum of that window.

So, you can do it, but there are consequences.

Cheers,
bob
Re: FFT OF A NON RECTANGULAR IMAGE [message #63169 is a reply to message #63071] Tue, 28 October 2008 14:21 Go to previous message
pgrigis is currently offline  pgrigis
Messages: 436
Registered: September 2007
Senior Member
R.G. Stockwell wrote:
> <pgrigis@gmail.com> wrote in message
> news:3cb784b7-dfed-4c87-a2ab-d775d1edec0e@f40g2000pri.google groups.com...
>> Maybe you could do a (slow) FT instead of FFT?
>>
>> Ciao,
>>
>> Paolo
>
>
> Not directly. DFT and FFT are the same, the difference is in how the
> calculation is done.

What I meant was, for every frequency vector (kx,ky),
evaluate the Furier transform F(kx,ky) by computing
the integral of the input function (or table of values)
multiplied by the Fourier basis function of kx,ky over
the elliptical domain....
On second thought, this would be extremly slow...

Ciao,
Paolo

>
>
> One could simply do a series of one dimensional FFTs on the data (each of
> differing length,
> and just combine them into a couple of image. i.e. just look at an image of
> kx spectra,
> then a different image of ky spectra.
>
> Also, one can write the 2D FT as a series of 1D ffts, and perhaps that
> approach
> would get what the OP wants (if that is what you are talking about).
>
>
> Cheers,
> bob
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: changing font type on a widget
Next Topic: Multiple click region growing

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 15:58:08 PDT 2025

Total time taken to generate the page: 0.00597 seconds