FFT on 2D data
Closed this issue · 1 comments
IS4Code commented
Hi! Nice library, I got just a quick thing to ask: could this be used to apply FFT on 2D things, like images? Would it be hard to add? I am looking for something to achieve similar results like here.
swharden commented
Hi @IllidanS4,
FftSharp doesn't do 2D FFTs at this time, but it is open to contributions! An easy/free library for working with supported 2D FFTs would be great for the community.
It looks like there are some commercial options:
- Numerics: https://www.extremeoptimization.com/QuickStart/CSharp/FourierTransforms.aspx
- NMath: https://www.centerspace.net/examples/nmath/csharp/core/fast-fourier-transform-2d-example.php
More about 2D FFT:
- https://www.robots.ox.ac.uk/~az/lectures/ia/lect2.pdf
- https://www.di.univr.it/documenti/OccorrenzaIns/matdid/matdid346761.pdf
- http://people.ciirc.cvut.cz/~hlavac/TeachPresEn/11ImageProc/12FourierTxEn.pdf
- https://homepages.inf.ed.ac.uk/rbf/HIPR2/fourier.htm
I'd be open to translating from python. Numpy has a ff2 function... but it's not trivial to narrow-in on where that source code actually lives. It's wrapped in lots of architecture that makes it hard to tactically go in and grab the useful bits.
- https://numpy.org/doc/stable/reference/generated/numpy.fft.fft2.html
- https://github.com/numpy/numpy/blob/v1.20.0/numpy/fft/_pocketfft.py#L919-L1012
- https://github.com/numpy/numpy/tree/v1.20.0/numpy/fft
- https://docs.scipy.org/doc/scipy/reference/generated/scipy.fftpack.fft2.html
- https://github.com/scipy/scipy/blob/v1.6.3/scipy/fftpack/basic.py#L370-L394
- https://github.com/scipy/scipy/tree/v1.6.3/scipy/fft/_pocketfft