opencv:计时函数

getTickCount()函数返回CPU自某个时间以来走过的时钟周期数
getTickFrequency()函数返回CPU一秒钟所走的时钟周期数

示例:
double time0 = static_cast(getTickCount()); //记录起始时间
//进行图像处理操作。。。。。。。。。。。。。

time0 = ((double)getTickCount() - time0)/getTickFrequency();
cout << “此方法运行时间为:”<< time0 << “秒” << endl; //输出运行时间

猜你喜欢

转载自blog.csdn.net/qq_31935691/article/details/71699514