Output error dft() function
I am trying to use following code, but it gives error. Error message is like : OpenCV Error: Assertion failed (dims <= 2 && data && (unsigned)i0 < (unsigned)si ze.p[0] && (unsigned)(i1DataType<_Tp>::channels) < (unsigned)(size.p[1]channel s()) && ((((sizeof(size_t)<<28)|0x8442211) >> ((DataType<_Tp>::depth) & ((1 << 3 ) - 1))*4) & 15) == elemSize1()) in unknown function, file c:\program files (x86 )\opencv2.2\include\opencv2\core\mat.hpp, line 517
My code is given below:
int main(.....)
{
vector<double>pdf_vector;
//read data from file and put it in pdf_vector.
vector<double>all_vector;
Mat dft_input_vector(pdf_vector);
Mat dft_output_vector;
dft(dft_input_vector, dft_output_vector);
for(i=0;i<1;i++)
{
for(j=0;j<pdf_vector.size ();j++)
{
all_vector.push_back (dft_output_vector.at <float>(i,j));
}
}
.................
}