I have some python-opencv (cv2) code that opens the video capture device (camera):
self.capture = cv2.VideoCapture(device)
If I call this code from the python main thread, the VideoCapture starts OK; however, if I call this setup code from a non-main thread, the camera never opens. The VideoCapture() call never returns. I'm creating a background thread by simply doing:
run_thread = threading.Thread(target=self.run)
Is this simply a bug in OpenCV/cv2 or am I overlooking a limitation of python threads?