From 7e75f078792a2a0dafe4006bbe17d5377316da29 Mon Sep 17 00:00:00 2001 From: highbuyer Date: Wed, 2 Oct 2024 11:16:10 +0800 Subject: [PATCH] update create_webcam_preview --- modules/ui.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/ui.py b/modules/ui.py index ec2210a..a98b3aa 100644 --- a/modules/ui.py +++ b/modules/ui.py @@ -972,9 +972,11 @@ def webcam_preview(root: ctk.CTk): def create_webcam_preview(): global preview_label, PREVIEW - + stream_url = 'http://192.168.0.103:4747' camera = cv2.VideoCapture( - 0 + # stream_url + #7 + 1, cv2.CAP_DSHOW ) # Use index for the webcam (adjust the index accordingly if necessary) camera.set( cv2.CAP_PROP_FRAME_WIDTH, PREVIEW_DEFAULT_WIDTH