今天无语了,linux14.04系统下,使用罗技c270摄像头。发现插上没有反应,系统版本:

lenovo-myc@lenovomyc-Lenovo-Product:~/Downloads$ uname -a
Linux lenovomyc-Lenovo-Product 3.13.--generic #-Ubuntu SMP Wed Jul :: UTC x86_64 x86_64 x86_64 GNU/Linux

找了一上午UVC驱动,最后发现是测试摄像头的程序cheese刚刚有点问题

---------------------------------------------------这是分割线----------------------------------------------------

下载了luvcview, 运行,正常工作

lenovo-myc@lenovomyc-Lenovo-Product:~/Downloads$ sudo apt-get install luvcview
Reading package lists... Done
Building dependency tree
Reading state information... Done
luvcview is already the newest version.
upgraded, newly installed, to remove and not upgraded.
lenovo-myc@lenovomyc-Lenovo-Product:~/Downloads$ luvcview
luvcview 0.2. SDL information:
Video driver: x11
A window manager is available
Device information:
Device path: /dev/video0
Stream settings:
Frame format: MJPG
Frame size: 640x480
Frame rate: fps
find DRI
find DRI
find DRI
find DRI
find DRI
find DRI
find DRI
find DRI
find DRI
find DRI
find DRI
find DRI
find DRI
find DRI
find DRI
find DRI
find DRI
find DRI

---------------------------------------------------以下是上午进行的尝试---------------------------------------------------

(1)判断是否为UVC设备

http://blog.csdn.net/myarrow/article/details/8465384

  判断一个摄像头是否属于UVC规范可以使用下面方法:

  1.使用lsusb命令或其它硬件信息查看工具找出摄像头的设备号(Vendor ID)和产品号(Product ID)。如Logitech Quickcam for Notebooks Pro摄像头是046d:08cb;

  2.查找是否有视频类接口信息

  lsusb -d 046d:08cb -v | grep "14 Video"

  如果该摄像头兼容UVC,则会输出类似信息

  bFunctionClass 14 Video

  bInterfaceClass 14 Video

  bInterfaceClass 14 Video

  bInterfaceClass 14 Video

  若无以上信息,则是non-UVC设备。

(2) uvc官网  http://www.ideasonboard.org/uvc/ 有说明:

Linux 2.6.26 and newer includes the Linux UVC driver natively. You will not need to download the driver sources manually unless you want to test a newer version or help with development.

就是说:linux 2.6.26 以及高版本内核都自带UVC驱动的。还以为系统有问题

系统目录下也有 /dev/video0 文件,说明摄像头驱动正常

lsusb输出当前usb设备

罗技C270 为 046d:0825

lenovo-myc@lenovomyc-Lenovo-Product:/dev$ lsusb
Bus Device : ID 046d: Logitech, Inc. Webcam C270
Bus Device : ID : Intel Corp. Integrated Rate Matching Hub
Bus Device : ID 1d6b: Linux Foundation 2.0 root hub
Bus Device : ID 17ef: Lenovo
Bus Device : ID : Intel Corp. Integrated Rate Matching Hub
Bus Device : ID 1d6b: Linux Foundation 2.0 root hub

(3)ubuntu下使用UVC摄像头  http://blog.csdn.net/xingyu19871124/article/details/5764954

分别下载了

1、v41-dvb

网址:http://linuxtv.org/hg/v4l-dvb/  make的时候出错,版本不匹配。是针对linux 3.3.0版本编译的, 当前版本为3.13.0 报错:

UVC File not found: /lib/modules/3.3.0-61-generic/build/.config

又根据:

http://blog.sina.com.cn/s/blog_3dc687f30100kwf5.html

尝试 make config 依旧不行,放弃

重新clone了一遍源码

lenovo-myc@lenovomyc-Lenovo-Product:/dev$ git clone git://linuxtv.org/media_build.git

make (编译内核 。。。)

lenovo-myc@lenovomyc-Lenovo-Product:~/Downloads/media_build$ make
make -C /home/lenovo-myc/Downloads/media_build/v4l
make[]: Entering directory `/home/lenovo-myc/Downloads/media_build/v4l'
Updating/Creating .config
make[]: Entering directory `/home/lenovo-myc/Downloads/media_build/linux'
Applying patches for kernel 3.13.--generic
patch -s -f -N -p1 -i ../backports/api_version.patch
patch -s -f -N -p1 -i ../backports/pr_fmt.patch
patch -s -f -N -p1 -i ../backports/debug.patch
patch -s -f -N -p1 -i ../backports/drx39xxj.patch
patch -s -f -N -p1 -i ../backports/v4.1_pat_enabled.patch
patch -s -f -N -p1 -i ../backports/v4.0_dma_buf_export.patch
patch -s -f -N -p1 -i ../backports/v4.0_drop_trace.patch
patch -s -f -N -p1 -i ../backports/v3.16_netdev.patch
patch -s -f -N -p1 -i ../backports/v3.16_wait_on_bit.patch
patch -s -f -N -p1 -i ../backports/v3.16_void_gpiochip_remove.patch
Patched drivers/media/dvb-core/dvbdev.c
Patched drivers/media/v4l2-core/v4l2-dev.c
Patched drivers/media/rc/rc-main.c
make[]: Leaving directory `/home/lenovo-myc/Downloads/media_build/linux'
Preparing to compile for kernel version 3.13. ***WARNING:*** You do not have the full kernel sources installed.
This does not prevent you from building the v4l-dvb tree if you have the
kernel headers, but the full kernel source may be required in order to use
make menuconfig / xconfig / qconfig. If you are experiencing problems building the v4l-dvb tree, please try
building against a vanilla kernel before reporting a bug. Vanilla kernels are available at http://kernel.org.
On most distros, this will compile a newly downloaded kernel: cp /boot/config-`uname -r` <your kernel dir>/.config
cd <your kernel dir>
make all modules_install install Please see your distro's web site for instructions to build a new kernel. WARNING: This is the V4L/DVB backport tree, with experimental drivers
backported to run on legacy kernels from the development tree at:
http://git.linuxtv.org/media-tree.git.
It is generally safe to use it for testing a new driver or
feature, but its usage on production environments is risky.
Don't use it in production. You've been warned.
V4L2_FLASH_LED_CLASS: Requires at least kernel 4.2.
RC_ST: Requires at least kernel 3.15.
VIDEO_XILINX: Requires at least kernel 3.17.
I2C_SI4713: Requires at least kernel 3.17.
VIDEO_ADV7604: Requires at least kernel 3.17.
VIDEO_MT9P031: Requires at least kernel 3.17.
VIDEO_MT9V032: Requires at least kernel 3.19.
VIDEO_SMIAPP: Requires at least kernel 4.0.
SOC_CAMERA_OV2640: Requires at least kernel 3.17.
Created default (all yes) .config file
./scripts/make_myconfig.pl
make[]: Leaving directory `/home/lenovo-myc/Downloads/media_build/v4l'
make[]: Entering directory `/home/lenovo-myc/Downloads/media_build/v4l'
perl scripts/make_config_compat.pl /lib/modules/3.13.--generic/build ./.myconfig ./config-compat.h
creating symbolic links...
make -C firmware prep
make[]: Entering directory `/home/lenovo-myc/Downloads/media_build/v4l/firmware'
make[]: Leaving directory `/home/lenovo-myc/Downloads/media_build/v4l/firmware'
make -C firmware
make[]: Entering directory `/home/lenovo-myc/Downloads/media_build/v4l/firmware'
Generating vicam/firmware.fw
Generating ttusb-budget/dspbootcode.bin
Generating cpia2/stv0672_vp4.bin
Generating av7110/bootcode.bin
make[]: Leaving directory `/home/lenovo-myc/Downloads/media_build/v4l/firmware'
Kernel build directory is /lib/modules/3.13.--generic/build
make -C ../linux apply_patches
make[]: Entering directory `/home/lenovo-myc/Downloads/media_build/linux'
Patches for 3.13.--generic already applied.
make[]: Leaving directory `/home/lenovo-myc/Downloads/media_build/linux'
make -C /lib/modules/3.13.--generic/build SUBDIRS=/home/lenovo-myc/Downloads/media_build/v4l modules
make[]: Entering directory `/usr/src/linux-headers-3.13.--generic'
CC [M] /home/lenovo-myc/Downloads/media_build/v4l/bt87x.o
LD [M] /home/lenovo-myc/Downloads/media_build/v4l/snd-bt87x.o
Building modules, stage .
MODPOST modules
CC /home/lenovo-myc/Downloads/media_build/v4l/snd-bt87x.mod.o
LD [M] /home/lenovo-myc/Downloads/media_build/v4l/snd-bt87x.ko
make[]: Leaving directory `/usr/src/linux-headers-3.13.--generic'
./scripts/rmmod.pl check
Can't locate Proc/ProcessTable.pm in @INC (you may need to install the Proc::ProcessTable module) (@INC contains: /etc/perl /usr/local/lib/perl/5.18.2 /usr/local/share/perl/5.18.2 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.18 /usr/share/perl/5.18 /usr/local/lib/site_perl .) at ./scripts/rmmod.pl line 4.
BEGIN failed--compilation aborted at ./scripts/rmmod.pl line .
make[]: *** [default] Error
make[]: Leaving directory `/home/lenovo-myc/Downloads/media_build/v4l'
make: *** [all] Error

2、gspcav1-20071224.tar.gz

网址:http://mxhaard.free.fr/download.html

make依旧出错

后来下载了 luvciew。发现摄像头可以运行! 好吧,到此结束

---------------------------------------------------other---------------------------------------------------

1、查看摄像头ID:

[root@151 dev]# lsusb

Bus 002 Device 013: ID 0ac8:3313 Z-Star Microelectronics Corp.

0xc8:3313在UVC中支持了。

2、插入摄像头后,就可以在/dev/下查看是否有video设备文件:

[root@151 dev]# ls | grep video

video

video0

其中,video是video0的连接。如果没有再现,可能UVC没有配置到内核中,重新配置就可以了

(大致在Device DriversàMultimedia devicesàVideo capture adaptersàV4L USB devices下面)。如果内核配置了,

还是不出现,可以使用modprobe uvcvideo来加载该模块。

3、先看看摄像头的相关信息:

lshal | grep Cam

出现:

info.product = 'Vega USB 2.0 Camera.' (string)

usb_device.product = 'Vega USB 2.0 Camera.' (string)

usb.interface.description = 'Vega USB 2.0 Camera.' (string)

info.product = 'Vega USB 2.0 Camera.' (string)

input.product = 'Vega USB 2.0 Camera.' (string)

info.product = 'Vega USB 2.0 Camera.' (string)

对USB有研究的,就很熟悉这些字段。

再看一下系统能不能识别出摄像头:

[root@151 log]# dmesg | grep Cam

uvcvideo: Found UVC 1.00 device Vega USB 2.0 Camera. (0ac8:3313)

input: Vega USB 2.0 Camera. as /class/input/input6

usb 2-7: Product: Vega USB 2.0 Camera.

uvcvideo: Found UVC 1.00 device Vega USB 2.0 Camera. (0ac8:3313)

input: Vega USB 2.0 Camera. as /class/input/input7

usb 2-7: Product: Vega USB 2.0 Camera.

uvcvideo: Found UVC 1.00 device Vega USB 2.0 Camera. (0ac8:3313)

input: Vega USB 2.0 Camera. as /class/input/input8

usb 2-7: Product: Vega USB 2.0 Camera.

[root@151 ~]# dmesg | grep video

pci 0000:05:00.0: Boot video device

Linux video capture interface: v2.00

usbcore: registered new interface driver uvcvideo

uvcvideo 2-7:1.0: usb_probe_interface

uvcvideo 2-7:1.0: usb_probe_interface - got id

uvcvideo: Found UVC 1.00 device Vega USB 2.0 Camera. (0ac8:3313)

uvcvideo 2-7:1.0: usb_probe_interface

uvcvideo 2-7:1.0: usb_probe_interface - got id

uvcvideo: Found UVC 1.00 device Vega USB 2.0 Camera. (0ac8:3313)

uvcvideo 2-7:1.0: usb_probe_interface

uvcvideo 2-7:1.0: usb_probe_interface - got id

uvcvideo: Found UVC 1.00 device Vega USB 2.0 Camera. (0ac8:3313)

liunx环境,摄像头无法识别,解决方案的更多相关文章

  1. Liunx 环境下vsftpd的三种实现方法(超详细参数)

    以下文章介绍Liunx 环境下vsftpd的三种实现方法 ftp://vsftpd.beasts.org/users/cevans/vsftpd-2.0.3.tar.gz,目前已经到2.0.3版本.假 ...

  2. python之web自动化验证码识别解决方案

    验证码识别解决方案 对于web应用程序来讲,处于安全性考虑,在登录的时候,都会设置验证码,验证码的类型种类繁多,有图片中辨别数字字母的,有点击图片中指定的文字的,也有算术计算结果的,再复杂一点就是滑动 ...

  3. apollo在liunx环境实战(三)

    1. apollo在liunx环境实战(三) 1.1. 准备 下载apollo源码 https://github.com/ctripcorp/apollo 1.2. 创建数据库 在自己的liunx环境 ...

  4. 项目部署到liunx环境下访问接口返回异常

    1.访问接口返回异常 已经连续踩了两次这个坑了.所以记下来了.方便下次搜索! 项目在window下运行正常,无任何异常! 但是部署到liunx环境下的服务器上就有问题 访问静态页面毫无问题,一旦涉及到 ...

  5. Python3利用Dlib19.7实现摄像头人脸识别的方法

    0.引言 利用python开发,借助Dlib库捕获摄像头中的人脸,提取人脸特征,通过计算欧氏距离来和预存的人脸特征进行对比,达到人脸识别的目的: 可以自动从摄像头中抠取人脸图片存储到本地,然后提取构建 ...

  6. liunx环境下安装禅道

    环境: vm12.5.2 CentOS-7-x86_64 ZenTaoPMS.9.1.stable.zbox_64 SecureCRT 8.0 因为liunx环境下配置apache, php, mys ...

  7. VMware vRealize Suite 8.4 发布 - 多云环境的云计算管理解决方案

    VMware vRealize Suite 8.4.0, Release Date: 2021-04-15 概述 VMware vRealize Suite 是一种多云环境的云计算管理解决方案,为 I ...

  8. VMware vRealize Suite 8.3 发布 - 多云环境的云计算管理解决方案

    概述 VMware vRealize Suite 是一种多云环境的云计算管理解决方案,为 IT 组织提供了一个基于 DevOps 和 ML 原则的基础架构自动化.一致运维和监管的现代平台. vReal ...

  9. OpenCV摄像头人脸识别

    注: 从外设摄像装置中获取图像帧,把每帧的图片与人脸特征进行匹配,用方框框住识别出来的人脸 需要用到的函数: CvHaarClassifierCascade* cvLoadHaarClassifier ...

随机推荐

  1. JavaScript 全部介绍

     1.new 表达式  new之后写函数名的话,就会把该函数作为构造函数来进行调用.   2.字符串型的运算  由于JavaScript的字符串型是不可变类型,所以字符串值本质上是不能改变的.这个答案 ...

  2. Model compatibility cannot be checked because the database does not contain model metadata. Ensure that IncludeMetadataConvention has been added to the DbModelBuilder conventions

    Model compatibility cannot be checked because the database does not contain model metadata. Ensure t ...

  3. Windows 10 SDK 10.0.10158

    昨天微软发布了Windows 10 SDK 10158版本: http://blogs.windows.com/buildingapps/2015/06/30/windows-10-sdk-previ ...

  4. JAVA中列表,集合之间的区别

    整体来看List,Set,Map都是实现了Collection接口的接口. 重复性: List允许存在重复的元素,也就是说List中可以在不影响现有元素的值及其索引的同时插入新的重复元素. Set不允 ...

  5. nyoj 42 一笔画 欧拉通路

    http://acm.nyist.net/JudgeOnline/problem.php?pid=42 一笔画问题 时间限制:3000 ms  |  内存限制:65535 KB 难度:4 描述 zyc ...

  6. 分布式_理论_02_Base 理论

    一.前言 五.参考资料 1.分布式理论(二)——Base 理论 2.分布式理论(二) - BASE理论

  7. @angular/cli项目构建--interceptor

    JWTInterceptor import {Injectable} from '@angular/core'; import {HttpEvent, HttpHandler, HttpInterce ...

  8. KVM-克隆

    kvm虚拟机的克隆分为两种情况,本文也就通过以下两种情况进行克隆,克隆虚拟机为Centos 6.4X64. (1) KVM主机本机虚拟机直接克隆. (2) 通过复制配置文件与磁盘文件的虚拟机复制克隆( ...

  9. signal 信号具体含义解释~

    ) SIGHUP 本信号在用户终端连接(正常或非正常)结束时发出,通常是在终端的控 制进程结束时, 通知同一session内的各个作业,这时它们与控制终端不再关联. ) SIGINT 程序终止(int ...

  10. storm入门原理介绍

    转自:http://www.cnblogs.com/wuxiang/p/5629138.html 1.hadoop有master与slave,Storm与之对应的节点是什么?2.Storm控制节点上面 ...