I am using the CUFFT library for calculating the Fourier Transform of images. I am trying to display the magnitude of the Fourier transform calculated, but the displayed FFT is not what it should look like. I am trying to display the square-root of sum of real value and complex value in the FFT matrix. Attached image shows the display. I am assuming there is some sort of packing happening in CUDA for the FFT matrix (I guess this from the fact that the last dimension in the FFT matrix is reduced in half by CUFFT to avoid saving redundant values - the documentation says so). Can someone explain what that packing scheme is, because I want to make changes to the FFT values in the matrix.
Also, the CUFFT documentation is a little unclear about what they mean by rows and columns of the FFT. They say on page 6 of CUDA CUFFT 1.1 library documentation “The transform size in X dimension (number of rows)” and “The transform size in Y dimension (number of columns)”. Does that mean the FFT X dimension is vertical and Y dimension is horizontal?
I am trying to attach an image that shows the input image, the CUFA FFT image, and the expected FFT. Does anyone have any suggestions?