//注意添加头文件
#include <cv.h>
using namespace std;
double t = (double)cvGetTickCount();
//。。。。。。算法或程序代码
t = (double)cvGetTickCount() - t;
printf( "processing time = %gms\n", t/(cvGetTickFrequency()*1000) );//输出时间为ms
printf( "processing time = %gs\n", t/(cvGetTickFrequency()*1000000) );//输出时间为s
opencv:计算程序运行时间
最新推荐文章于 2022-10-03 20:22:21 发布