今天无语了,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. js备忘录模式

    备忘录(Memento):在不破坏封装的前提下,捕获一个对象的内部状态,并在该对象之外保存这个状态.这样以后就可将该对象恢复到原先保存的状态. 备忘录模式比较适用于功能比较复杂的,但需要维护或记录属性 ...

  2. 字典:dict.c/dict.h

    Redis 源码分析(1):字典和哈希表(dict.c 和 dict.h)http://huangz.iteye.com/blog/1455808两个点:字典结构的运作流程哈希表的渐进式 rehash ...

  3. MySQL 基础理论面试题整理

    前言: 之前整理公司面试题的时候,看了一篇大神些 SQL 优化之六脉神剑 文章,写的真好! 博主有一些 MySQL 的面试题,简单抽了一个备注一下,补充一下自己不熟悉的地方.   一.在MySQL中, ...

  4. websphere6.1升级

    1.到IBM websphere官方网站下载相应版本的更新包,如6.1.0-WS-WASSDK-WinX32-FP0000021.pak和6.1.0-WS-WAS-WinX32-FP0000021.p ...

  5. BEC translation exercise 2

    Forest fires are a regular feature of Chile's hot, arid summers.智利夏天炙热.干燥,常发生森林火灾.A nearly decade-lo ...

  6. 场景中GameObject无法用代码隐藏问题(setActive为false)

    GameObject不受代码控制隐藏问题:代码中若对某个gameobject.setActive(false),发现会不起作用,总结下来发现是和object所在模型组的Animator组件的anima ...

  7. STL空间配置器解析和实现

    STL空间配置器的强大和借鉴作用不言而喻,查阅资料,发现了Dawn_sf已经对其有了极其深入和详细的描述,所以决定偷下懒借用其内容,只提供自己实现STL空间配置器的源码,具体解析内容参考:(一)STL ...

  8. Oracle中查询前10条记录

    在Oracle怎样查询表中的top10条记录呢? select * from test where rownum <=10     ----说明:rownum只能用于<或<=运算,如 ...

  9. HIVE-执行hive的几种方式,和把HIVE保存到本地的几种方式

    网上相关教程很多,这里我主要是简单总结下几种常用的方法,方便日后查询. 第一种,在bash中直接通过hive -e命令,并用 > 输出流把执行结果输出到制定文件 hive -e "se ...

  10. Excel合并计算

    office版本为2013,数据来源:我要自学网,曾贤志老师 计算之前,光标定在空白位置,不要定在数据源. 将汇总的类型居于首列(不可以跨区域选择,可以把不需要汇总的移动到其他列). 要有删除原来数据 ...