我不明白关于使用 opencv 进行 dft 的一些事情
I don't understand something about use taking dft with opencv
我是使用 opencv
库的新手。这些天我正在尝试使用dft()
,但是在使用dft()
之前和使用dft()
之后我有些不明白。你能帮我理解一下吗?
我看了一些关于那个的 youtube 视频,但我还是不太明白。
Mat padded;
int m = getOptimalDFTSize( I.rows );
int n = getOptimalDFTSize( I.cols );
copyMakeBorder(I, padded, 0, m - I.rows, 0, n - I.cols, BORDER_CONSTANT, Scalar::all(0)); //here we are expanding the photo but i dont understand the operation in here
Mat q0(magI, Rect(0, 0, cx, cy));
Mat q1(magI, Rect(cx, 0, cx, cy));
Mat q2(magI, Rect(0, cy, cx, cy));
Mat q3(magI, Rect(cx, cy, cx, cy));
Mat tmp;
q0.copyTo(tmp);
q3.copyTo(q0); //here we are rearring the quadrants but how
tmp.copyTo(q3);
q1.copyTo(tmp);
q2.copyTo(q1);
tmp.copyTo(q2);
我是使用 opencv
库的新手。这些天我正在尝试使用dft()
,但是在使用dft()
之前和使用dft()
之后我有些不明白。你能帮我理解一下吗?
我看了一些关于那个的 youtube 视频,但我还是不太明白。
Mat padded;
int m = getOptimalDFTSize( I.rows );
int n = getOptimalDFTSize( I.cols );
copyMakeBorder(I, padded, 0, m - I.rows, 0, n - I.cols, BORDER_CONSTANT, Scalar::all(0)); //here we are expanding the photo but i dont understand the operation in here
Mat q0(magI, Rect(0, 0, cx, cy));
Mat q1(magI, Rect(cx, 0, cx, cy));
Mat q2(magI, Rect(0, cy, cx, cy));
Mat q3(magI, Rect(cx, cy, cx, cy));
Mat tmp;
q0.copyTo(tmp);
q3.copyTo(q0); //here we are rearring the quadrants but how
tmp.copyTo(q3);
q1.copyTo(tmp);
q2.copyTo(q1);
tmp.copyTo(q2);