updated some requirements

This commit is contained in:
Kenneth Estanislao
2023-12-14 14:59:22 +08:00
parent 4dba8da59c
commit 7af8c7e493
3 changed files with 7 additions and 5 deletions

View File

@@ -257,11 +257,11 @@ def webcam_preview():
global preview_label, PREVIEW
cap = cv2.VideoCapture(0) # Use index for the webcam (adjust the index accordingly if necessary)
cap.set(cv2.CAP_PROP_FRAME_WIDTH, 854) # Set the width of the resolution
cap.set(cv2.CAP_PROP_FRAME_HEIGHT, 480) # Set the height of the resolution
cap.set(cv2.CAP_PROP_FRAME_WIDTH, 960) # Set the width of the resolution
cap.set(cv2.CAP_PROP_FRAME_HEIGHT, 540) # Set the height of the resolution
cap.set(cv2.CAP_PROP_FPS, 60) # Set the frame rate of the webcam
PREVIEW_MAX_WIDTH = 854
PREVIEW_MAX_HEIGHT = 480
PREVIEW_MAX_WIDTH = 960
PREVIEW_MAX_HEIGHT = 540
preview_label.configure(image=None) # Reset the preview image before startup