Finished the DFT tutorial for the core section.

This commit is contained in:
Bernat Gabor
2011-07-25 10:06:03 +00:00
parent d0cac8a93a
commit 2d3606a58f
6 changed files with 108 additions and 3 deletions

View File

@@ -28,7 +28,7 @@ int main(int argc, char ** argv)
Mat padded; //expand input image to optimal size
int m = getOptimalDFTSize( I.rows );
int n = getOptimalDFTSize( I.cols ); // on the border keep the values
int n = getOptimalDFTSize( I.cols ); // on the border add zero values
copyMakeBorder(I, padded, 0, m - I.rows, 0, n - I.cols, BORDER_CONSTANT, Scalar::all(0));
Mat planes[] = {Mat_<float>(padded), Mat::zeros(padded.size(), CV_32F)};

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB