diff --git a/MCamera/camera.py b/MCamera/camera.py index 481d18c..c5e0285 100644 --- a/MCamera/camera.py +++ b/MCamera/camera.py @@ -77,7 +77,7 @@ class Camera(object): record_signal = False # 閿欒璁℃暟 error_counting = 0 - max_error = 5 + max_error = 50 def __init__(self): """Start the background camera thread if it isn't running yet.""" diff --git a/MCamera/camera_test.py b/MCamera/camera_test.py index af2eeb7..0816608 100644 --- a/MCamera/camera_test.py +++ b/MCamera/camera_test.py @@ -8,7 +8,7 @@ from AcrossPlatform.get_platform import * def camera_is_available(source=0): # 根据平台导入对应的包 if SYS_PLATFORM == WINDOWS: - cap = cv2.VideoCapture(source) + cap = cv2.VideoCapture(source, cv2.CAP_DSHOW) elif SYS_PLATFORM == LINUX: cap = cv2.VideoCapture(source, cv2.CAP_V4L2) else: