Spaces:
Runtime error
Runtime error
Commit
·
54bb4e5
1
Parent(s):
b0056be
Update app.py
Browse files
app.py
CHANGED
|
@@ -35,7 +35,8 @@ def detect_objects(frame):
|
|
| 35 |
|
| 36 |
# Function to capture video frames and process them
|
| 37 |
def capture_frames():
|
| 38 |
-
cap = cv2.VideoCapture(
|
|
|
|
| 39 |
|
| 40 |
while True:
|
| 41 |
ret, frame = cap.read()
|
|
|
|
| 35 |
|
| 36 |
# Function to capture video frames and process them
|
| 37 |
def capture_frames():
|
| 38 |
+
cap = cv2.VideoCapture(cv2.CAP_ANY)
|
| 39 |
+
# Use 0 for default camera, you can change it if needed
|
| 40 |
|
| 41 |
while True:
|
| 42 |
ret, frame = cap.read()
|