libuvc is a library that supports enumeration, control and streaming for USB Video Class (UVC) devices, such as consumer webcams.
The
source code can be found at https://github.com/ktossell/libuvc. To build the library, install libusb 1.0+ and run:
In this example, libuvc is used to acquire images in a 30 fps, 640x480 YUV stream from a UVC device such as a standard webcam.