Way to calculate/approximate 2D Fourier transform?

In summary, the function tanh(w)/w, where w is the absolute value of the vector (wx, wy), can be written as tanh(sqrt(wx^2+wy^2))/sqrt(wx^2+wy^2) and the variables used in the Fourier transforms are wx and wy. The goal is to construct a 2D filter that filters each frequency w with the factor tanh(w)/w, regardless of the direction along the surface. The 2D Fourier transform can be approximated using the Hankel transform, which takes into account the circular symmetry of the function. This can be achieved by converting the Fourier transform to polar coordinates. Sacrificing resolution or range in the original function can result in deviations from the
  • #1
TriKri
72
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.
 
Mathematics news on Phys.org
  • #2
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:
  • #3
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.
 
  • #4
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
 
  • #5
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.
 
  • #6
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
 
  • #7
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:

FAQ: Way to calculate/approximate 2D Fourier transform?

What is the 2D Fourier Transform?

The 2D Fourier Transform is a mathematical operation that converts a two-dimensional signal from the time/space domain into the frequency/wavenumber domain. It is commonly used in fields such as signal processing, image processing, and quantum mechanics.

How is the 2D Fourier Transform calculated?

The 2D Fourier Transform is calculated by taking the spatial signal and breaking it down into its individual frequency components using complex numbers. This is done by integrating the signal over all space and time, with a specific mathematical formula.

What is the difference between 2D Fourier Transform and 1D Fourier Transform?

The main difference between the two transforms is the dimensionality of the signal. The 1D Fourier Transform is used for signals that vary only in one dimension, while the 2D Fourier Transform is used for signals that vary in two dimensions, such as images.

How can we approximate the 2D Fourier Transform?

One way to approximate the 2D Fourier Transform is by using the fast Fourier transform (FFT) algorithm. This algorithm allows for a faster and more efficient calculation of the transform compared to the traditional method, especially for large signals.

What are some practical applications of the 2D Fourier Transform?

The 2D Fourier Transform has many practical applications, such as image and signal filtering, image reconstruction, and pattern recognition. It is also commonly used in medical imaging, radar and sonar systems, and astronomy for data analysis and visualization.

Similar threads

Replies
4
Views
2K
Replies
5
Views
994
Replies
5
Views
1K
Replies
2
Views
2K
Replies
6
Views
2K
Replies
1
Views
1K
Back
Top