How to set the optimal size of cv::getOptimalDFTSize for OpenCV-DFT
This article mainly introduces "how to set the optimal size of OpenCV-DFT cv::getOptimalDFTSize". In daily operation, I believe many people have doubts about how to set the optimal size of OpenCV-DFT cv::getOptimalDFTSize. The editor consulted all kinds of materials and sorted out simple and easy-to-use operation methods. I hope it will be helpful to answer the doubts of "how to set the optimal size of cv::getOptimalDFTSize in OpenCV-DFT". Next, please follow the editor to study!
Catalogue
Function prototype
Parameter description
Test code
Function prototype int getOptimalDFTSize (int vecsize); parameter description
Int type vecsize, vector size, usually the width or height of the picture.
Test code # include#include#includeusing namespace std;using namespace cv; cv::Mat image_make_border (cv::Mat & src); int main (void) {Mat test = imread ("liu.jpg", 0); cv::Mat result=image_make_border (test); imshow ("original", test); imshow ("result", result/255); waitKey (0); system ("pause"); return 0 } / / Image boundary processing cv::Mat image_make_border (cv::Mat & src) {cout