Performance Profiling

학술 2010. 10. 25. 10:11 Posted by 양고
대략 이와 같이 하면 편함.

 int j = 0;
 LARGE_INTEGER freq, t[20];
 QueryPerformanceFrequency(&freq);
 QueryPerformanceCounter(&t[j++]);
// warp
 cvWarpPerspective(iObj, iPred, &_homography); // takes 10ms !!
 QueryPerformanceCounter(&t[j++]);
 printf("warping: %g ms\n", (t[j-1].QuadPart - t[j-2].QuadPart)*1000./freq.QuadPart);
// ...