Skip to content

Commit

Permalink
feat:streaming
Browse files Browse the repository at this point in the history
  • Loading branch information
Ziad-Muhammed committed Sep 20, 2022
1 parent 6f20aab commit bd615b6
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions testing/webcam.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import cv2 as cv

path = '../outputs/'


def stream():
link = "http://192.168.1.103:8080/video"
# link of streaming
capture = cv.VideoCapture(link)
while True:

_, frame = capture.read()
img = cv.resize(frame, (500, 500))
cv.imshow('livestream', img)

# take photo from streaming
if cv.waitKey(1) == ord("q"):
cv.imwrite(f'{path}1.png', frame)
continue

# exit streaming
if cv.waitKey(1) == ord('z'):
break

# destroy streaming
capture.release()
cv.destroyAllWindows()
#ds

# stream()

0 comments on commit bd615b6

Please sign in to comment.