From 9d35ccfee95e4cd426050ce83abf8b82ab588f98 Mon Sep 17 00:00:00 2001 From: Thomas Date: Fri, 28 Feb 2020 16:54:54 +0100 Subject: [PATCH 1/2] Fixing bug #318 --- src/cli/add.py | 2 +- src/cli/test.py | 2 +- src/compare.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/cli/add.py b/src/cli/add.py index 3106055..e97c627 100644 --- a/src/cli/add.py +++ b/src/cli/add.py @@ -109,7 +109,7 @@ elif config.get("video", "recording_plugin") == "pyv4l2": video_capture = pyv4l2_reader(config.get("video", "device_path"), config.get("video", "device_format")) else: # Start video capture on the IR camera through OpenCV - video_capture = cv2.VideoCapture(config.get("video", "device_path")) + video_capture = cv2.VideoCapture(config.get("video", "device_path"), cv2.CAP_V4L) # Force MJPEG decoding if true if config.getboolean("video", "force_mjpeg", fallback=False): diff --git a/src/cli/test.py b/src/cli/test.py index 16fadb1..d221470 100644 --- a/src/cli/test.py +++ b/src/cli/test.py @@ -21,7 +21,7 @@ if config.get("video", "recording_plugin") != "opencv": sys.exit(12) # Start capturing from the configured webcam -video_capture = cv2.VideoCapture(config.get("video", "device_path")) +video_capture = cv2.VideoCapture(config.get("video", "device_path"), cv2.CAP_V4L) # Force MJPEG decoding if true if config.getboolean("video", "force_mjpeg", fallback=False): diff --git a/src/compare.py b/src/compare.py index 98c6b72..c316fef 100644 --- a/src/compare.py +++ b/src/compare.py @@ -124,7 +124,7 @@ elif config.get("video", "recording_plugin") == "pyv4l2": video_capture = pyv4l2_reader(config.get("video", "device_path"), config.get("video", "device_format")) else: # Start video capture on the IR camera through OpenCV - video_capture = cv2.VideoCapture(config.get("video", "device_path")) + video_capture = cv2.VideoCapture(config.get("video", "device_path"), cv2.CAP_V4L) # Force MJPEG decoding if true if config.getboolean("video", "force_mjpeg", fallback=False): From f826d91a30c2f199e1c1408f8f715fe07eaacf2a Mon Sep 17 00:00:00 2001 From: Ryan Butler Date: Sat, 20 Jun 2020 12:34:51 -0400 Subject: [PATCH 2/2] Inaccurate cli message fixed --- src/cli/list.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cli/list.py b/src/cli/list.py index 08a1e9f..2cc9b9c 100644 --- a/src/cli/list.py +++ b/src/cli/list.py @@ -14,7 +14,7 @@ user = builtins.howdy_user # Check if the models file has been created yet if not os.path.exists(path + "/models"): print("Face models have not been initialized yet, please run:") - print("\n\thowdy " + user + " add\n") + print("\n\tsudo howdy -U " + user + " add\n") sys.exit(1) # Path to the models file