I want to apply 2d DFT to a N by N image. However, image is vectorized such that it is NxN by 1. How can i find the matrix form of 2d DFT such that resulting vector from multiplication is the vectorized NxN by 1 2d DFT of my N by N image?


In matrix form, we can write the 2-D DFT of an Image $\mathbf X$ via $\hat{\mathbf{X}} = \mathbf F \mathbf X \mathbf F^{\rm T}$.

This expression can be vectorized with the help of the Kronecker product. Using [*], we obtain $$\hat{{\mathbf{x}}} = {\rm vec}\{\hat{\mathbf{X}}\} = (\mathbf F \otimes \mathbf F) \cdot \mathbf{x}.$$

This shows that the matrix you need is $\mathbf F \otimes \mathbf F$.

| improve this answer | |
  • $\begingroup$ thank you very much. Works like a charm! I cannot upvote due to my reputation though :/ Have a nice day! $\endgroup$ – strahd Jul 9 '19 at 9:47
  • $\begingroup$ You're welcome! Glad to hear it helped. You should be able to accept it as an answer though. ;-) $\endgroup$ – Florian Jul 9 '19 at 10:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.