Way to calculate/approximate 2D Fourier transform?

Click For Summary

Discussion Overview

The discussion revolves around the calculation or approximation of the 2D Fourier transform of the function tanh(w)/w, where w is the absolute value of a vector (wx, wy). Participants explore methods to construct a filter that acts on a 2D surface, applying the Fourier transform to achieve a convolution filter. The scope includes mathematical reasoning and technical exploration of Fourier and related transforms.

Discussion Character

  • Exploratory, Technical explanation, Debate/contested, Mathematical reasoning

Main Points Raised

  • One participant seeks to approximate the 2D Fourier transform of the function tanh(w)/w for use in a filter on a 2D surface.
  • Another participant suggests using the fft2 function in Octave but notes challenges with resolution due to matrix size limitations.
  • A different participant proposes the Hankel transform as a potential alternative due to the circular symmetry of the function.
  • Concerns are raised about the trade-offs between resolution and the range of the original function when creating a sufficiently small matrix for transformation.
  • One participant mentions that high-frequency components fall off rapidly, suggesting that lower resolution may still yield usable results.
  • There is a suggestion to convert the Fourier transform to polar coordinates to leverage symmetry, although the specific transform is not recalled.

Areas of Agreement / Disagreement

Participants express differing views on the best approach to take, with some advocating for the Hankel transform while others emphasize the limitations of matrix size and resolution in Fourier transforms. The discussion remains unresolved regarding the optimal method for approximating the 2D Fourier transform.

Contextual Notes

Limitations include the dependence on matrix size for computational feasibility and the potential deviation from true values when sacrificing resolution or range. The discussion also highlights the need for further exploration of transforms suitable for circularly symmetric functions.

TriKri
Messages
72
Reaction score
0
Hi! I have a function for which I need to calculate or at least approximate the 2D Fourier transform, that is, the Fourier transform applied twice on the function but on different variables. The function is tanh(w)/w, where w is the absolute value of the vector (wx, wy). So the function can be written as tanh(sqrt(wx^2+wy^2))/sqrt(wx^2+wy^2) (I'm sorry but I don't know how to get latex working). The variables that are supposed to be used in the Fourier transforms are then wx and wy respectivelly.

The reason I'm asking is because I need to construct a filter that acts on a 2D surface, which filters each frequency w with the factor tanh(w)/w, disregarding of the direction along the surface. If I can only calculate the Fourier transform of the function just gave, I will get a 2d convolution filter which I can use.

Any idéas of how to approximate the 2D Fourier transform of the function? Thanks in advance.
 
Physics news on Phys.org
trikri said:
hi! I have a function for which i need to calculate or at least approximate the 2d Fourier transform, that is, the Fourier transform applied twice on the function but on different variables. The function is tanh(w)/w, where w is the absolute value of the vector (wx, wy). So the function can be written as tanh(sqrt(wx^2+wy^2))/sqrt(wx^2+wy^2) (i'm sorry but i don't know how to get latex working). The variables that are supposed to be used in the Fourier transforms are then wx and wy respectivelly.

The reason I'm asking is because i need to construct a filter that acts on a 2d surface, which filters each frequency w with the factor tanh(w)/w, disregarding of the direction along the surface. If i can only calculate the Fourier transform of the function just gave, i will get a 2d convolution filter which i can use.

Any idéas of how to approximate the 2d Fourier transform of the function? Thanks in advance.
2d FFT

CB
 
Last edited:
Thank you CB, I tried with the fft2 function in Octave but it's difficult to get an image with good enough resolution when there is a size limit to how large matrixes the program can handle.

Instead, I found this transform: en.wikipedia.org/wiki/Hankel_transform#Relation_to_the_Fourier_transform, which I think I can use in this case since my function is circularly symmetric. I will try to use that instead and see what result I get.
 
TriKri said:
Thank you CB, I tried with the fft2 function in Octave but it's difficult to get an image with good enough resolution when there is a size limit to how large matrixes the program can handle.

Instead, I found this transform: en.wikipedia.org/wiki/Hankel_transform#Relation_to_the_Fourier_transform, which I think I can use in this case since my function is circularly symmetric. I will try to use that instead and see what result I get.

You don't need such a good image since the high frequency components fall off rapidly. The spectrum if not of sufficient resolution can be interpolated (since there is not much information in it)

CB
 
In order to get a small enough matrix so that it becomes possible to transform it, you either have to sacrifice the resolution or the range of the original function. Both of those options are bad and will make the transformed function deviate from the true value.
 
TriKri said:
In order to get a small enough matrix so that it becomes possible to transform it, you either have to sacrifice the resolution or the range of the original function. Both of those options are bad and will make the transformed function deviate from the true value.

How small is small, the hardware on the not exceptional machines I use will handle 1000x1000 matrix, estimated time is of the order of 100-200 ms

CB
 
TriKri said:
In order to get a small enough matrix so that it becomes possible to transform it, you either have to sacrifice the resolution or the range of the original function. Both of those options are bad and will make the transformed function deviate from the true value.

The alternative is to use the symmetry and convert the FT to polars where you will end up with ... (I forget which, transform and I am not going to look it up as I don't have a suitable reference to hand). Which is probably what the Wiokipedia article you mention is about.

CB
 
Last edited:

Similar threads

  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 2 ·
Replies
2
Views
1K
  • · Replies 12 ·
Replies
12
Views
2K
  • · Replies 5 ·
Replies
5
Views
4K
  • · Replies 11 ·
Replies
11
Views
3K