如何计算一幅图像的处理时间

shn521 2011-10-28 04:48:51
例如我对一幅图像进行均值滤波,那么如何计算出处理这幅图像所要用的时间,感谢。
...全文
255 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
HarriLiu 2011-10-31
  • 打赏
  • 举报
回复
GetTickCount
fengbingchun 2011-10-31
  • 打赏
  • 举报
回复
#include <ctime>
using namespace std;

time_t tBegin, tEnd;

tBegin = clock();
........
tEnd = clock();

double(tEnd-tBegin)/CLOCKS_PER_SEC
libing64 2011-10-28
  • 打赏
  • 举报
回复
C++有个类clock_t 获取当前时间,(ms级),你在图像处理的开始和末尾分别获取时间,他们的差就是经过的时间(ms)
zhao1zhong6 2011-10-28
  • 打赏
  • 举报
回复
DWORD t = timeGetTime();
处理图像
DWORD tt= timeGetTime() - t;
cout<<tt;
zgl7903 2011-10-28
  • 打赏
  • 举报
回复

LARGE_INTEGER tBefore, tAfter, i64PerfFrequency;
// Figure out how often the performance counter increments
QueryPerformanceFrequency( &i64PerfFrequency );

// Get performance counter before the ANSI API loop
QueryPerformanceCounter( &tBefore );

//run your code here
……

// Get performance counter after the ANSI API loop
QueryPerformanceCounter( &tAfter );

double tSecond = (double)(tAfter.QuadPart - tBefore.QuadPart)/(double)i64PerfFrequency.QuadPart;






19,468

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC 图形处理/算法
社区管理员
  • 图形处理/算法社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧