I have an image that I want to convert to the frequency domain using FFT, it seems that for Java there are not enough libraries for them, but I found two. One of them is JTransforms, and the other is less known and has no name.
With the lesser known of them, 2D could only have lengths of degrees of two, but it had simple methods like FastFourierTransform.fastFT(real, imaginary, true); , and the real one was a two-dimensional array of doublings, full of all pixel values, and the imaginary part was a 2D array of the same size as zeros. The boolean value will depend on the forward or reverse conversion. It made sense to me, and it worked, except for the strength of the two requirements that ruined any transformation I did (initially I added black space around the image to fit its maximum power), which I struggle with, use equivalent methods to JTransforms and would appreciate any advice with this. I will tell you what I'm doing right now.
I believe that the corresponding class will be DoubleFFT_2D , its constructor takes up several rows and columns, which I would call the width and height of my image. Since my image does not have imaginary parts, I think I can use doubleFFT.realForwardFull(real); which treats the imaginary parts as zero and transmits a real 2D array full of pixels. Unfortunately, this does not work at all. JavaDoc state the input array must be of size rows*2*columns, with only the first rows*columns elements filled with real data But I donβt see how this relates to my image and what I need to do to fulfill this requirement.
Sorry for the lengthy and poor explanation, if any additional information is needed, I would be happy to provide it.
The JTransforms library and documents can be found here: https://sites.google.com/site/piotrwendykier/software/jtransforms
source share