the problem is to fourie transform ( cv::dft ) a signal with fourie descriptors. So the mat should be complex numbers :(
But my problem is how can make a mat with complex numbers ? Please help me to find an example or any other that show me how to store a complex number(RE + IM) to a mat ?
Is there a way to use merge ?
My code
Mat koopa(contours5[0], true);
Mat re;
Mat im;
re.convertTo(re,CV_32SC1);
im.convertTo(re, CV_32SC1);
vector channel(2);
// split coordinates in two mat
split(koopa, channel);
re = channel[0];
im = channel[1];
Mat planes[] = { re, im };
Mat complexImg;
merge(planes, 2, complexImg);
dft(complexImg, complexImg);
split(complexImg, planes);
why doesn't work ? Link error picture