mirror of
https://github.com/NohamR/Stage-2023.git
synced 2025-05-24 14:21:58 +00:00
26 lines
593 B
Python
26 lines
593 B
Python
# import the opencv library
|
|
import cv2
|
|
|
|
|
|
# define a video capture object
|
|
vid = cv2.VideoCapture('rtsp://SF2023:SF2023@129.175.55.62:88/videoMain')
|
|
|
|
while(True):
|
|
|
|
# Capture the video frame
|
|
# by frame
|
|
ret, frame = vid.read()
|
|
|
|
# Display the resulting frame
|
|
cv2.imshow('frame', frame)
|
|
|
|
# the 'q' button is set as the
|
|
# quitting button you may use any
|
|
# desired button of your choice
|
|
if cv2.waitKey(1) & 0xFF == ord('q'):
|
|
break
|
|
|
|
# After the loop release the cap object
|
|
vid.release()
|
|
# Destroy all the windows
|
|
cv2.destroyAllWindows() |