Way to calculate/approximate 2D Fourier transform?

Click For Summary
SUMMARY

The discussion focuses on calculating or approximating the 2D Fourier transform of the function tanh(w)/w, where w represents the absolute value of the vector (wx, wy). Users explore the limitations of the fft2 function in Octave due to matrix size constraints and discuss the applicability of the Hankel transform for circularly symmetric functions. The conversation highlights the trade-offs between resolution and range when transforming matrices, emphasizing the need for careful consideration of these factors to maintain accuracy in the transformed function.

PREREQUISITES
  • Understanding of 2D Fourier transforms and their applications
  • Familiarity with the function tanh(w)/w and its properties
  • Experience with Octave or similar numerical computing tools
  • Knowledge of the Hankel transform and its relation to Fourier transforms
NEXT STEPS
  • Research the implementation of the Hankel transform in numerical computing environments
  • Learn about optimizing matrix sizes for FFT operations in Octave
  • Explore techniques for interpolating Fourier transform spectra
  • Investigate the use of polar coordinates in Fourier transform calculations
USEFUL FOR

Mathematicians, physicists, and engineers involved in signal processing, particularly those working with 2D Fourier transforms and convolution filters.

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
923
  • · Replies 12 ·
Replies
12
Views
2K
  • · Replies 5 ·
Replies
5
Views
4K
  • · Replies 11 ·
Replies
11
Views
3K