Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

I found a workaround which is to open and immediately close a cam then reopen it!

so instead of

cam = cv2.VideoCapture(0)

do

cam = cv2.VideoCapture(0)
cam.release()
cam = cv2.VideoCapture(0)

Hope it works for you as well!

I found a workaround which is to open and immediately close a cam then reopen it!

so instead of

cam = cv2.VideoCapture(0)

do

cam = cv2.VideoCapture(0)
cam.release()
cam = cv2.VideoCapture(0)

Hope it works for you as well!

Edit May 10th: I've noted that actually you need to run the Open/Close/Open sequence once with the USB Cam NOT plugged to your rpi

I found a workaround which is to open and immediately close a cam then reopen it!

so instead of

cam = cv2.VideoCapture(0)

do

cam = cv2.VideoCapture(0)
cam.release()
cam = cv2.VideoCapture(0)

Hope it works for you as well!

Edit May 10th: 10th:

I've noted that actually you need to run the Open/Close/Open sequence once with the USB Cam NOT plugged to your rpirpi. Then you plug it back and run Open/Close/Open then the script you want