OpenCV (未完待续……)

API文档:https://docs.opencv.org/2.4/modules/highgui/doc/user_interface.html#

  • cv.getTickCount() / cv.getTickFrequency()

返回tick的值,可用于记录某个步骤或方法花费了多长时间(计算出来的单位为'秒')。

import cv2 as cv

t = cv.getTickCount()

'''
Invoke some functions at here
'''

t = (cv.getTickCount() - t) / cv.getTickFrequency() # Time unit is 'second'
print("Cost %f s" % (t))
发布了4 篇原创文章 · 获赞 0 · 访问量 74

猜你喜欢

转载自blog.csdn.net/scorpioji/article/details/104183422