Ask Your Question

Revision history [back]

cv2.VideoCapture() can't got multi-camera video in same time through usb-hub under win10

ENV: win10pro 64, python(x,y) 2.7.10 (includr: OpenCV 2.4.11-7,PyQt 4.11.3-5,NumPy 1.9.2-8,...)

hardware: Surface Pro 4;tinkpad x230i(win7); usb2.0 hub; two webcam(uva driver, 1280x720px 10fps+680x420px 15pfs)

problem: through usb-hub, two web cam plugin to surface;

base code:

cv2.VideoCapture(id)

can not touch all webcam,only can visit the first webcam;

if cancel usb-hub, one by one plugin to thinkpad; cv2 can read two webcam's video in same time, AND with different Qt windows;

if base Qt layout, try to show two wecam video in same windows; always lost the last touch webcam;

BUT: same code can working good under macOS, even to through usb-hub, also can show two video in same Qt windows;

so what happened? How can i fixed this case by python+opencv?

thanks for ay suggest.