annotation update
This commit is contained in:
parent
91bc7679e2
commit
637a50035f
|
@ -60,6 +60,7 @@ def webcam_opencv(device_index, quit_key, pause_key, is_autoSaveFrame, frame_sav
|
|||
keyList = [quit_key, frame_capKey, pause_key] # 快捷键列表
|
||||
hotkey_judge(keyList) # 快捷键冲突判断
|
||||
|
||||
#------------------程序开始------------------
|
||||
s_time = time.time() # 起始时间
|
||||
cap = cv2.VideoCapture(device_index) # 连接设备
|
||||
frame_width = cap.get(3) # 宽度
|
||||
|
@ -105,12 +106,12 @@ def webcam_opencv(device_index, quit_key, pause_key, is_autoSaveFrame, frame_sav
|
|||
cv2.waitKey(0) # 暂停,按任意键继续
|
||||
|
||||
print(f'一共处理了{frame_num}帧')
|
||||
# 释放缓存
|
||||
# 释放缓存资源
|
||||
cap.release()
|
||||
cv2.destroyAllWindows()
|
||||
else: # 连接设备失败
|
||||
print(f'摄像头连接异常!')
|
||||
|
||||
#------------------程序结束------------------
|
||||
print(f'程序结束!')
|
||||
e_time = time.time() # 终止时间
|
||||
print(f'用时:{round((e_time - s_time), 3)}秒, {round((e_time - s_time)/60, 3)}分, {round((e_time - s_time)/3600, 3)}小时')
|
||||
|
|
Loading…
Reference in New Issue