Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

时间统计错误,VGA图片人脸检测结果为约400ms #26

Open
horse007666 opened this issue Oct 16, 2018 · 0 comments
Open

时间统计错误,VGA图片人脸检测结果为约400ms #26

horse007666 opened this issue Oct 16, 2018 · 0 comments

Comments

@horse007666
Copy link

horse007666 commented Oct 16, 2018

代码中为:
clock_t start; start = clock(); find.findFace(image); imshow("result", image); imwrite("result.jpg",image); start = clock() -start; cout<<"time is "<<start/10e3<<endl;
有错误

应该先将start转换为秒,再转换为ms,转换为s要除以CLOCKS_PER_SEC
实际上1s=1000ms,从s到ms的转换应该是乘以1000.
正确代码应该为:
cout<<"time is "<<(double)start/CLOCKS_PER_SEC*1000<<" ms "<<endl;
得到人脸探测时间为400ms, 也就是0.4s

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant