You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
应该先将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
The text was updated successfully, but these errors were encountered:
代码中为:
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
The text was updated successfully, but these errors were encountered: