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