OpenCV Q&A Forum - RSS feedhttp://answers.opencv.org/questions/OpenCV answersenCopyright <a href="http://www.opencv.org">OpenCV foundation</a>, 2012-2018.Thu, 18 Jan 2018 05:08:08 -0600Accuracy of OpenCV's DFT (C++ implementation)http://answers.opencv.org/question/182729/accuracy-of-opencvs-dft-c-implementation/I'm coding a with C++ and OpenCV. I'm comparing the outputs (complex numbers) of MATLAB's FFT function and OpenCV's DFT function. I am able to get identical results for normal images such as the one below (Fig. 1). However, after some processing to get the image (Fig. 2), the values are very different by orders of magnitude and I think the OpenCV's output is wrong.
Is this expected of the OpenCV's DFT function? I've tried all sorts of things like putting "DFT_SCALE" as well. Any suggestions please? Thanks!
![Fig.1](/upfiles/15162731822390162.jpg)
![Fig.2](/upfiles/15162732072692394.jpg)
I've also included my MATLAB code. Fig.1 is the variable assigned "S" and Fig.2 is the variable "Normin2". (product of imshow(Normin2)). Normin2 has a maximum value of 1.359 and a minimum value of -1.2667.
![MATLAB code](/upfiles/15162755494912427.jpg)Colin PeerisThu, 18 Jan 2018 05:08:08 -0600http://answers.opencv.org/question/182729/