pythonsignal-processingfftdft

Conjugate symmetric: 3D Fourier transform dimension


I have a real-valued input 3D array with the shape of (H,W,D)=[8,8,20], where H, W, and D represent height, width and depth(z dimension), respectively. When computing the DFT, what will be the dimension of the DFT complex array (3D Fourier Transform)?

I read in one article that 2D DFT becomes like the following due to the conjugate symmetry:

enter image description here

For 2D arrays of real value with (H,W): [8,8], the dimension of DFT becomes [8, 8//2+1] = [8, 5]. In the case of 3D input real array, what will be the DFT array size?


Solution

  • For real-valued input, about half the values in the DFT are redundant because of the Hermitian symmetric property. The n-dimensional DFT tensor could omit half of any dimension. For example, PyTorch's torch.fft.rfftn omits half the length of the final dimension producing a tensor of size [D1, D2, ..., DN//2 + 1].