#include <opencv2/opencv.hpp>
#include <iostream>
using namespace std;
using namespace cv;
void main()
{
int s = 0;
double time0 = static_cast<double>(getTickCount());//取得开始时间
for (size_t i = 0; i < 100000; i++)
{
s += i;
}
time0 = ((double)getTickCount() - time0);//计算消耗时间
cout << time0 <<"ms"<< endl;
}
2.3OpenCV程序计时
最新推荐文章于 2025-04-30 23:15:02 发布
