I have two cameras (using OpenNI, I have two streams per camera, handled by the same instance of the driver API) and would like to have two threads, each capturing data from
Try moving cv2.namedWindow('RGB' + str(cam)) inside your thread target capture_and_save
cv2.namedWindow('RGB' + str(cam))
capture_and_save