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

Home » Public Forums » archive » 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
FFT OF A NON RECTANGULAR IMAGE [message #63086] Tue, 28 October 2008 09:23 Go to next message
legall_alice is currently offline  legall_alice
Messages: 2
Registered: October 2008
Junior Member
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 #63151 is a reply to message #63086] Tue, 28 October 2008 20:56 Go to previous messageGo to next message
legall_alice is currently offline  legall_alice
Messages: 2
Registered: October 2008
Junior Member
Many thanks for your answers.
The ellipse was just an example. I was thinking of doing FFT on areas
defines by polygons and that can contains holes (shapefiles created
with ArcGis).
For the ellipse,you are right, I mapped it to a rectangle and the
resulting FFT is fine.
Thanks again,
Alice
Re: FFT OF A NON RECTANGULAR IMAGE [message #63160 is a reply to message #63086] Tue, 28 October 2008 18:35 Go to previous messageGo 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:a67d1bc7-604e-4d94-83c3-e2ff5d662a1c@p10g2000prf.google groups.com...
>
>
> 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

I stake my life (no wait, your life) on the fact that the final result would
be
identical, allowing for differences due to lost precision (FFT would be
superior in that respect).

Cheers,
bob


PS try it out, you can write a DFT in about 3 lines.
Re: FFT OF A NON RECTANGULAR IMAGE [message #63164 is a reply to message #63086] Tue, 28 October 2008 11:12 Go to previous messageGo to next message
Kenneth P. Bowman is currently offline  Kenneth P. Bowman
Messages: 585
Registered: May 2000
Senior Member
In article
<4a2c3474-def0-48fc-8611-05635d75f05d@v39g2000pro.googlegroups.com>,
legall_alice@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

By their nature, Fourier transforms are global.

Can you map the ellipse to a rectangle? (http://en.wikipedia.org/wiki/Conformal_map)

Ken Bowman
Re: FFT OF A NON RECTANGULAR IMAGE [message #63233 is a reply to message #63160] Thu, 30 October 2008 08:10 Go to previous message
pgrigis is currently offline  pgrigis
Messages: 436
Registered: September 2007
Senior Member
On Oct 28, 9:35 pm, "R.G. Stockwell" <notha...@noemail.com> wrote:
> <pgri...@gmail.com> wrote in message
>
> news:a67d1bc7-604e-4d94-83c3-e2ff5d662a1c@p10g2000prf.google groups.com...
>
>
>
>> R.G. Stockwell wrote:
>>> <pgri...@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
>
> I stake my life (no wait, your life) on the fact that the final result would
> be
>  identical, allowing for differences due to lost precision (FFT would be
> superior in  that respect).
>
> Cheers,
> bob
>
> PS try it out, you can write a DFT in about 3 lines.

You mean, by setting the value of the function
outside the support [i.e. ellipse or whatever]
to 0? Yes, I can see that in this case the Fourier
integral will be the same as if it were evaluated
only on the support (because integrating 0 over
any area will always give 0). So yes, I agree with
you, let's disregard my previous post.

Paolo
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: New Widgets Needed
Next Topic: Re: position plot in iplot

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

Current Time: Wed Oct 08 14:00:25 PDT 2025

Total time taken to generate the page: 0.00605 seconds