Reputation: 11
Mat fourierTransform(1,final.size()-1, CV_64FC1);
//Mat fourierTransform;
Mat ans(1,final.size()-1, CV_64FC1)
cv::dft(signal, fourierTransform,cv::DFT_COMPLEX_OUTPUT);
I am following this approach and then I am stuck at how to obtain the complex part of DFT. Can anybody tell how to about it to obtain it. Thanks in advance.
Upvotes: 1
Views: 2655
Reputation: 1227
Here is a tutorial on how you can use OpenCV's DFT function: Discrete Fourier Transform
Essentially, it will store the output matrix as a two-channel matrix. The first channel is for real values, and the second channel is for complex values.
Upvotes: 1