Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import cv2
|
2 |
+
|
3 |
+
cap = cv2.VideoCapture(0)
|
4 |
+
|
5 |
+
while True:
|
6 |
+
ret, frame = cap.read()
|
7 |
+
if not ret:
|
8 |
+
break
|
9 |
+
cv2.imshow('Camera Stream', frame)
|
10 |
+
if cv2.waitKey(1) == ord('q'):
|
11 |
+
break
|
12 |
+
|
13 |
+
cap.release()
|
14 |
+
cv2.destroyAllWindows()
|