Spaces:
Runtime error
Runtime error
Mauricio A. Guerta
commited on
Commit
·
d05fe89
1
Parent(s):
9225465
Adicionar opencv2 2
Browse files
app.py
CHANGED
@@ -5,7 +5,7 @@ import streamlit as st
|
|
5 |
|
6 |
### CONNECT TO CAMERA
|
7 |
# either like this using your own camera IP
|
8 |
-
capture = cv2.VideoCapture('rtsp://192.168.0.131:554/user=atualli&password=Ope1w3r&channel=1&stream=0.sdp')
|
9 |
# or like this
|
10 |
capture = cv2.VideoCapture('rtsp://192.168.0.131:554/user=atualli&password=Ope1w3r&channel=1&stream=0.sdp')
|
11 |
|
@@ -17,6 +17,6 @@ FRAME_WINDOW =st.image([])
|
|
17 |
|
18 |
### GRAB NEW IMAGE
|
19 |
if run:
|
20 |
-
x, frame =
|
21 |
frame = cv2.cvtColor(frame, cv2.COLOR_BGR2RGB)
|
22 |
time.sleep(0.025)
|
|
|
5 |
|
6 |
### CONNECT TO CAMERA
|
7 |
# either like this using your own camera IP
|
8 |
+
#capture = cv2.VideoCapture('rtsp://192.168.0.131:554/user=atualli&password=Ope1w3r&channel=1&stream=0.sdp')
|
9 |
# or like this
|
10 |
capture = cv2.VideoCapture('rtsp://192.168.0.131:554/user=atualli&password=Ope1w3r&channel=1&stream=0.sdp')
|
11 |
|
|
|
17 |
|
18 |
### GRAB NEW IMAGE
|
19 |
if run:
|
20 |
+
x, frame = capture.read()
|
21 |
frame = cv2.cvtColor(frame, cv2.COLOR_BGR2RGB)
|
22 |
time.sleep(0.025)
|