Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Searching library for a 3D fft based convolution [closed]

I have a large 3D matrix and a small 3D matrix which I want to use 3D fft based convolution to find the best match for my small 3D matrix in the larger matrix. Do you have any code in C++ that can do it?

like image 883
Sam Avatar asked Feb 25 '26 23:02

Sam


1 Answers

Stackoverflow is no community where one can request a code then gets it done by us, yet we can help you find the necessary resources and information so you are able to do so for yourself (usually questions on how to use libraries and help on specific topics are ok).

Let's come to your question: you already mentioned that you want to use FFT which is by far the best approach - a suitable library would be FFTW, so please take a look at it and keep the following things in mind:

  • To improve performace try to pad to powers of two which will speed up the process a lot!
  • Using real FFT and not complex will simplify and speed up this, too.
  • Usually single precision should be enough to achieve the desired results.
like image 180
Christian Ivicevic Avatar answered Feb 27 '26 13:02

Christian Ivicevic



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!