Opencv webcam with libusb driver python

I'm working with python and using wx for my GUI. I'm using OpenCv to capture frames from my webcam and this works fine when using the webcams default driver. However, I'm also trying to use pyUSB with a libusb backend to detect which USB devices are plugged in at any given moment. In order to use pyUSB to determine which devices are plugged in, I need to use libusb to generate a driver for the webcam. The driver generated from libusb is automatically installed and then I can use pyUSB's find usb.core.find method to enumerate the USB devices connected.

My problem is that now OpenCv is unable to capture frames. I believe my code actually gets a camera capture object and it gets the frames, but the frames are black. I can immediately check that the driver is causing the problem by uninstalling the libusb driver and reinstalling the default webcam driver. Do I need to instruct OpenCv to use this new libusb driver? If so, how? Google didn't turn up anything obvious.

Edit: In case it's important, I'm on Windows 7 64 bit using python 2.7.3

链接地址: http://www.djcxy.com/p/80978.html

上一篇: 如何从C#中的网络摄像头抓取位图图像的恒定流

下一篇: OpenCV摄像头与libusb驱动程序python