v04 update

This commit is contained in:
13339479676 2022-01-20 16:25:26 +08:00
parent 91a6bd6ea6
commit 349ea1774c
1 changed files with 4 additions and 4 deletions

View File

@ -16,6 +16,7 @@ from utils.args_yaml import argsYaml
from utils.compress import webcam_compress, is_compressFile
ROOT_PATH = sys.path[0] # 项目根目录
OWS_VERSION = 'OpenCV Webcam Script v0.4' # 版本号
def parse_args(known=False):
@ -141,13 +142,12 @@ def webcam_opencv(device_index="0",
frame_num = 0 # 总帧数
frame_hand_num = 0 # 手动保存帧数
ows_version = 'OpenCV Webcam Script v0.4' # 版本号
while(cap.isOpened()):
while(is_capOpened):
wait_key = cv2.waitKey(20) & 0xFF # 键盘监听
ret, frame = cap.read() # 捕获画面
_, frame = cap.read() # 捕获画面
frame_num += 1 # 帧计数
print(f'帧ID{frame_num}') # 输出帧ID信息
cv2.imshow(ows_version, frame) # 显示画面
cv2.imshow(OWS_VERSION, frame) # 显示画面
if (is_autoSaveFrame): # 自动保存
if (auto_frameNum > 0 and frame_num > auto_frameNum):