# Is there any p5 function for 2d FFT?

**URL:** <https://discourse.processing.org/t/is-there-any-p5-function-for-2d-fft/39541>\
**Category:** Libraries\
**Created:** [November 1, 2022, 8:57am UTC](https://discourse.processing.org/t/is-there-any-p5-function-for-2d-fft/39541 "2022-11-01T08:57:55Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![josephh](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/josephh/32/210_2.png) [@josephh](https://discourse.processing.org/u/josephh)\
**Post date:** [November 2, 2022, 10:13am UTC](https://discourse.processing.org/t/is-there-any-p5-function-for-2d-fft/39541/2 "2022-11-02T10:13:31Z")

</div>

Hi @wonwoo,

You may want to look at “2D FFT javascript” on the web. You can use external JavaScript libraries:

> **[GitHub - turbomaze/JS-Fourier-Image-Analysis: Javascript implementation of a...](https://github.com/turbomaze/JS-Fourier-Image-Analysis)**
>
> Javascript implementation of a 2D FFT for images. Makes it easy to apply low pass/high pass/band filters. - GitHub - turbomaze/JS-Fourier-Image-Analysis: Javascript implementation of a 2D FFT for i...

There’s also a similar unanswered topic:

> [@Fourier image analysis in P5](https://discourse.processing.org/t/fourier-image-analysis-in-p5/38121):
>
> Hello everyone! I’ve been trying to make a little diffraction simulator and I’m struggling with finding 2D FFT and IFFT libraries to work along with P5. The program I’m trying to do should do the following: Get a FFT of the aperture image; Get the FFT of the image; Multiply the magnitude of both; IFFT the result. OpenCV.js’ FFT works just fine, but the library has no inverse function. Has anyone tried (and hopefully succeeded) to do this? Any pointers on how to go about it? Thank you in …

---

_[View the full topic](https://discourse.processing.org/t/is-there-any-p5-function-for-2d-fft/39541)._
