程序执行时间测算

1    int64 st1,et1;
2    st1 = cvGetTickCount();
3     const char* imagename = "lenaBG.jpg";
4     //从文件中读入图像
5     Mat img = imread(imagename);
6    et1 = cvGetTickCount();
8    printf("cost: %f milliseconds\n\n", (et1-st1)/(double)cvGetTickFrequency()/1000.0);   

 

posted @ 2014-03-17 13:42  ONWAYO  阅读(197)  评论(0编辑  收藏  举报