This is my first question here and I hope it won't be a straightforward one.
A bit of info on what I'm trying to do. I have several cameras connected to my PC and I want to receive and display frames from them. To achieve this, I'm using OpenCV's imshow function and a RepeatingTimer, which calls it's callback every N milliseconds. In timer callbacks I do the following:
for camera in list_cameras:
frame = camera.get_frame()
cv2.imshow(camera.camera_id, frame)
cv2.waitKey(20)
When doing so, the app correctly opens the windows and displays frames. But, the next time the callback is called, the script gets stuck on the cv2.imshow line and the frame doesn't update. I have also tried playing with waitKey delays and doing something like this:
cv2.startWindowThread()
for camera in list_cameras:
cv2.namedWindow(camera.camera_id)
to prepare windows. This, as you probably already know, didn't help at all. What can cause this kind of problem? Could it be something related to Python's threads? Thanks in advance!