v04 update

This commit is contained in:
13339479676 2022-01-17 12:54:11 +08:00
parent 44dd909358
commit 085a65159e
1 changed files with 4 additions and 4 deletions

View File

@ -1,6 +1,6 @@
# OpenCV Webcam Script v0.3
# OpenCV Webcam Script v0.4
# 创建人:曾逸夫
# 创建时间2022-01-08
# 创建时间2022-01-17
import cv2
from pathlib import Path
@ -18,7 +18,7 @@ from utils.args_yaml import argsYaml
def parse_args(known=False):
parser = argparse.ArgumentParser(description='OpenCV Webcam Script v0.3')
parser = argparse.ArgumentParser(description='OpenCV Webcam Script v0.4')
parser.add_argument('--device', '-dev', default='0',
type=str, help='device index for webcam, 0 or rtsp')
parser.add_argument('--quit', '-q', default="q",
@ -121,7 +121,7 @@ def webcam_opencv(device_index="0",
frame_savePath.mkdir(parents=True, exist_ok=True) # 创建目录
frame_num = 0 # 帧数
ows_version = 'OpenCV Webcam Script v0.3' # 版本号
ows_version = 'OpenCV Webcam Script v0.4' # 版本号
while(cap.isOpened()):
wait_key = cv2.waitKey(20) & 0xFF # 键盘监听
ret, frame = cap.read() # 捕获画面