0
votes

I just want to know if its possible to write a program in c++ on Windows which can grab frames of video from a web cam by making use of a USB library like libusb.

I have looked at http://www.dreamincode.net/forums/topic/148707-introduction-to-using-libusb-10/ . They define a basic sequence of the steps one must follow while using libusb to work with usb devices. To summarize:

1) Find and connect to the USB device

2) Send and receive data

3) Release the USB device

libusb handles part 1) and 3). So, the question comes down to part 2). I wonder if it is possible/feasible to send commands to the camera and receive data via USB by adhering to some type of standard (UVC 1.5 for example). I'm thinking that not knowing some proprietary, device specific information might be a problem though.

If this is possible but super hard, I would appreciate any insights into what the biggest challenge would be.

The hardware I have in mind are low-end logitech USB cameras.

Also, I am fully aware that OpenCV, Video for Windows (VFW), DirectShow, and FFMPEG can do web-cam video capture. I am interested in this project as a learning experience.

Thanks in advance!

1

1 Answers

3
votes

Since you're obviously a bit inexperienced, I'll give an answer in high-level terms.

To talk to someone, or something, you need to speak a common language, or have a translator. Now, there are many different USB devices, and they speak many different languages, but OpenCV can act as a translator for many of those. If you don't want to use that, you will need to find another translator, or possibly learn to speak the camera's native language.

The first option (another translator) is no option for you, because you don't want a translator.

The second option is something we can't help you with, because we don't know which camera you have.