opencv-cvRound返回整数值-四舍五入
#include<opencv2/opencv.hpp> #include<iostream> #include <vector> int main(int argc, char** argv) { std::cout << "cvRound(3.7) = " << cvRound(3.7) << std::endl; std::cout << "cvRound(3.2) = " << cvRound(3.2) << std::endl; std::cout << "cvRound(-3.7) = " << cvRound(-3.7) << std::endl; std::cout << "cvRound(-3.2) = " << cvRound(-3.2) << std::endl; //返回四舍五入后的整数值 cv::waitKey(0); return 0; }