Method to take the two-dimensional Forward FFT of a real data held in one dimensional double array. The
i,j
pixel of the real image is located in array element j*width + i.
The Complex FFT is returned in a double array with real/imag parts in even/odd elements, with the k,l
Complex components with:
Real part in location 2(l x wft + k)
Imag part in location 2(l x wft + k) + 1
where wft = width/2 + 1
@param width the image width.
@param height the image height.
@param realArray the image data in double[]
of length width*height
.
@param complexArray the output array of length 2*height*(width/2 + 1)
. If null
or wrong length, then a new array will be created.
@return double[]
DFT packed into one dimensional array
@throws IllegalArgumentException
ifwidth*height
does not match the array length.