cannot fix video source not found

This commit is contained in:
unknown
2025-12-22 12:13:23 +08:00
parent ad827efede
commit d4de3e84c4
2 changed files with 0 additions and 4 deletions
Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 MiB

After

Width:  |  Height:  |  Size: 2.1 MiB

-4
View File
@@ -59,9 +59,6 @@ class Sensor:
self.cap.set(cv2.CAP_PROP_FRAME_WIDTH, 1920)
self.cap.set(cv2.CAP_PROP_FRAME_HEIGHT, 1080)
if not self.cap.isOpened():
raise RuntimeError("Could not open video source")
# Wait for first valid frame
if self.verbose:
print("Sensor connecting to video source...")
@@ -70,7 +67,6 @@ class Sensor:
ret, frame = self.cap.read()
if not ret:
time.sleep(1)
raise RuntimeError("Could not open video source")
if self.verbose:
print("Video source connected.")