add RTSP example
This commit is contained in:
parent
a71798d5c6
commit
f8b9ae2443
|
@ -2,8 +2,10 @@
|
||||||
|
|
||||||
import cv2
|
import cv2
|
||||||
|
|
||||||
cam_port = 2
|
RTSP_ADDR = 'rtsp://localhost:8554/cam'
|
||||||
cam = cv2.VideoCapture(cam_port)
|
DEVICE_ADDR = 2
|
||||||
|
|
||||||
|
cam = cv2.VideoCapture(DEVICE_ADDR)
|
||||||
|
|
||||||
while True:
|
while True:
|
||||||
result, image = cam.read()
|
result, image = cam.read()
|
||||||
|
@ -17,5 +19,6 @@ while True:
|
||||||
break
|
break
|
||||||
|
|
||||||
cam.release()
|
cam.release()
|
||||||
|
|
||||||
cv2.destroyWindow('Camera')
|
cv2.destroyWindow('Camera')
|
||||||
cv2.destroyAllWindows()
|
cv2.destroyAllWindows()
|
|
@ -0,0 +1,4 @@
|
||||||
|
[tool.black]
|
||||||
|
skip-string-normalization = true
|
||||||
|
pycodestyle = true
|
||||||
|
line-length = 100
|
Loading…
Reference in New Issue