common.py 386 Bytes
Newer Older
1 2
import cv2

Kyle Anderson's avatar
Kyle Anderson committed
3
DATABASE_LOC = "./dataset/faces.pickle"
4 5 6 7 8 9 10 11 12 13


def display_frame(frame):
    """Displays the frame to the user."""
    cv2.imshow("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."""
Kyle Anderson's avatar
Kyle Anderson committed
14
    video_stream = cv2.VideoCapture(0)
15
    return video_stream