How to get the solution for FFT2 using opencv builtin method?
Code:
#include<stdio.h>
#include<stdlib.h>
#include<opencv\cv.h>
using namespace cv;
int main()
{
int flag = 0;
Mat* A = new Mat[4];
A->create(2,2,CV_64FC2);
A->at<double>(0,0)= 8;
A->at<double>(0,1)= 4;
A->at<double>(1,0)= 3;
A->at<double>(1,1)= 4;
Mat* B = new Mat[4];
B->create(2,2,CV_64FC2);
int n_chan = B->channels();
printf("The matrix B channels : %d\n",n_chan);
cvFFT(A,B,0,0);
printf("%lf",B->at<double>(0,0));
system("pause");
return 0;
}
i'm getting below mentioned error while running this code
"OpenCV Error: Bad argument (Unknown array type) in unknown function, file ....\ ..\src\opencv\modules\core\src\matrix.cpp, line 697"
This is probably more appropriate for an OpenCV forum.
http://answers.opencv.org