Commit ade475ba authored by Kyle Anderson's avatar Kyle Anderson

Use different video stream

Now using the cv2 video stream instead of the imUtils one, since it seems to be a little less latent.
parent 04489fd1
......@@ -82,7 +82,7 @@ def recognize_user(known_faces: dict, encoding_model: str = "hog", image_flip: i
timeout_time: float = time.time() + TIMEOUT
while time.time() < timeout_time:
# Read a image_frame from the video stream.
image_frame =
ret, image_frame =
if image_flip is not None:
image_frame = cv2.flip(image_frame, image_flip)
import time
import cv2
from import VideoStream
DATABASE_LOC = "./dataset/faces.pickle"
......@@ -14,6 +11,5 @@ def display_frame(frame):
def start_video_stream(camera: int):
"""Starts the video stream and returns the created stream.
Also waits for the video stream to open before returning it."""
video_stream = VideoStream(src=camera).start()
video_stream = cv2.VideoCapture(0)
return video_stream
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment