FFT OF A NON RECTANGULAR IMAGE [message #63086] |
Tue, 28 October 2008 09:23  |
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 #63160 is a reply to message #63086] |
Tue, 28 October 2008 18:35   |
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 #63233 is a reply to message #63160] |
Thu, 30 October 2008 08:10  |
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
|
|
|