작업/OpenCV

처리시간 측정

Machine Creator 2020. 7. 17. 17:49

OpneCV를 사용하는 MFC Project에서 처리시간 측정을 위한 코드.

double t = cvGetTickCount();
//--------------
//측정하고자 하는 코드.
.
.
.
//--------------
t = cvGetTickCount() - t;
double nLoadingTime_ms = t / ((double)cvGetTickFrequency()*1000.0);
CString strMsg;
strMsg.Format(L"%0.1fms", nLoadingTime_ms);
AfxMessageBox(strMsg);