完整代码:
from cv2 import getTickCount, getTickFrequency
loop_start = getTickCount()
# 中间测帧率的代码段
loop_time = cv2.getTickCount() - loop_start
total_time = loop_time/(cv2.getTickFrequency()) # 使用getTickFrequency()更加准确
running_FPS = int(1/total_time) # 帧率取整
print("running_FPS:",running_FPS)
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)