fix print bug
This commit is contained in:
parent
0ec206d194
commit
80393fa7e9
|
@ -5,4 +5,9 @@
|
|||
*.avi
|
||||
.ipynb_checkpoints
|
||||
__pycache__
|
||||
utils/__pycache__
|
||||
/utils/__pycache__
|
||||
|
||||
setup.py
|
||||
/build
|
||||
/dist
|
||||
/opencv_webcam_script.egg-info
|
|
@ -71,7 +71,7 @@ def webcam_opencv(device_index=0, quit_key="q", pause_key="p", is_autoSaveFrame=
|
|||
|
||||
if success: # 连接设备成功
|
||||
print(f'摄像头连接成功!')
|
||||
|
||||
frame_savePath = "" # 保存路径
|
||||
if is_autoSaveFrame or is_handSaveFrame:
|
||||
# 帧保存路径管理
|
||||
frame_savePath = increment_path(
|
||||
|
@ -105,7 +105,8 @@ def webcam_opencv(device_index=0, quit_key="q", pause_key="p", is_autoSaveFrame=
|
|||
print(f'已暂停!按任意键继续。。。')
|
||||
cv2.waitKey(0) # 暂停,按任意键继续
|
||||
|
||||
print(f'共计{frame_num}帧,已保存在:{frame_savePath}')
|
||||
if (frame_savePath != ""):
|
||||
print(f'共计{frame_num}帧,已保存在:{frame_savePath}')
|
||||
# 释放缓存资源
|
||||
cap.release()
|
||||
cv2.destroyAllWindows()
|
||||
|
|
Loading…
Reference in New Issue