Linux内核中已经带有很完善的USB摄像头驱动,支持几乎所有的USB摄像头,我们只需要配置内核,选择上相应的Sensor型号即可。
配置内核,支持USB摄像头:
- Device Drivers --->
- <*> Multimedia support --->
- <*> Video For Linux
- [*] Enable Video For Linux API 1 (DEPRECATED)
- [*] Video capture adapters --->
- [*] V4L USB devices --->
- <*> USB Video Class (UVC)
- [*] UVC input events device support
- [*] GSPCA based webcams --->
到这里,我们就可以选择所需要的USB摄像头驱动,当然也可以选择所有的USB摄像头驱动支持(这样编译出的内核会比较大)
GSPCA是一个万能摄像头驱动程序,进入GSPCA based webcams进行选择。
插入USB摄像头(我使用的UVC摄像头),会提示:
usb 1-1.1: new full speed USB device using s3c2410-ohci and address 3
usb 1-1.1: New USB device found, idVendor=0ac8, idProduct=3450
usb 1-1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
usb 1-1.1: Product: Deasy USB2.0 Camera
usb 1-1.1: Manufacturer: Vimicro Corp.
uvcvideo: Found UVC 1.00 device Deasy USB2.0 Camera (0ac8:3450)
input: Deasy USB2.0 Camera as
/devices/platform/s3c2410-ohci/usb1/1-1/1-1.1/1-1.1:1.0/input/input3
它的设备名称是:/dev/video0
USB摄像头一般都是基于V4L2架构的,需要编写V4L2架构的程序来操作摄像头
阅读(440) | 评论(0) | 转发(0) |