This commit is contained in:
2023-09-29 21:51:53 +03:00
parent f8b9ae2443
commit cde52c4596
13 changed files with 137 additions and 0 deletions

View File

@ -0,0 +1,21 @@
import cv2
RTSP_ADDR = "rtsp://localhost:8554/cam"
cam = cv2.VideoCapture(RTSP_ADDR)
while True:
result, image = cam.read()
cv2.imshow("Camera", image)
if cv2.waitKey(1) & 0xFF == ord("s"):
cv2.imwrite("capture.png", image)
if cv2.waitKey(1) & 0xFF == ord("q"):
break
cam.release()
cv2.destroyWindow("Camera")
cv2.destroyAllWindows()