Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Vec2f , mulSpectrums

i got the answer about mulSpectrum like this.

Mat z1(1,2,CV_32FC2),z2(1,2,CV_32FC2),z3;

z1.at<vec2f>(0, 0) = Vec2f(1,1);//1+i

z1.at<vec2f>(0, 1) = Vec2f(2,3);//2+3i

z2.at<vec2f>(0, 0) = Vec2f(2,1);//2+i

z2.at<vec2f>(0, 1) = Vec2f(3, 3);//3+3i

mulSpectrums(z1,z2,z3,0); cout<<z3; (1+i)<em="">(2+i) and (2+i)(3+3i) waitKey();

how can i change IplImage* to the form like above? do i have to use "for loop"? i meat that

CvMat* freq;

For example, (R0, I0), (R1, I1), (R2, I2), (R3, I3)..(Rn,In)

freq->data.db[0] means R0, freq->data.db[1] means I0,

freq->data.db[2] means R1, freq->data.db[3] means I1,

freq->data.db[4] means R2, freq->data.db[5] means I2, ...

something like this. i dont know how to convert that data to Vec form.

Thanks.