Merge pull request #7 from mattm/create-frames-dir

Create frames dir
This commit is contained in:
Charlie Holtz 2023-11-15 21:49:46 -05:00 committed by GitHub
commit c985bf5a47
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

@ -2,10 +2,15 @@ import cv2
import time
from PIL import Image
import numpy as np
import os
# Folder
folder = "frames"
# Create the frames folder if it doesn't exist
frames_dir = os.path.join(os.getcwd(), folder)
os.makedirs(frames_dir, exist_ok=True)
# Initialize the webcam
cap = cv2.VideoCapture(0)