Skip to content Skip to sidebar Skip to footer

Python Flask Webservice With Opencv And Webcam

I Have a Raspberry Pi with a Flask Server that uses OpenCV to stream my USB webcam to the flask Website. One User can connect to the flask server and the video stream, but 2 User c

Solution 1:

You can use function isOpened() to check if camera is open or not, and handle if is open, or you can open multiple cameras like this

ex:

cap0 = cv2.VideoCapture(0)
cap0.set(3,160)
cap0.set(4,120)
cap1 = cv2.VideoCapture(1)
cap1.set(3,160)
cap1.set(4,120)

Hope this is helpful.

Post a Comment for "Python Flask Webservice With Opencv And Webcam"