linux 使用 uvc 摄像头

第一种方法:
检测是否找到设备:
lsusb
检查端口:
ls  /dev/video*

安装适合的工具guvcview

  • sudo add-apt-repository ppa:pj-assis/ppa
  • sudo apt-get update
  • sudo apt-get install guvcview

测试摄像头
guvcview -d /dev/video1/

参考:https://www.ncnynl.com/archives/201706/1772.html


/////////////////////////////////////////////////////////////////

第二种方法:
下载luvcview的完整包:
https://launchpad.net/ubuntu/+source/luvcview/1:0.2.6-4

安装依赖库具体命令如下:
sudo apt-get install debhelper
sudo apt-get install libsdl1.2-dev
sudo apt-get install libv4l-dev
sudo apt-get install pkg-config

tar -xvf luvcview_0.2.6.orig.tar.gz
cd luvcview-0.2.6

make

提示

uvcvideo.h:5:10: fatal error: linux/videodev.h: No such file or directory
 #include <linux/videodev.h>

解决方法:

sudo ln -s /usr/include/linux/videodev2.h /usr/include/linux/videodev.h

再进行 make

测试:

luvcview -d /dev/video0 -L


./luvcview -d /dev/video0 -f yuv -s 640x480

 ./luvcview -d /dev/video1 -f jpg -s 640x480

参考:

https://blog.csdn.net/qq_44596345/article/details/88390562

http://dev.t-firefly.com/thread-957-1-1.html

\https://blog.csdn.net/u014795817/article/details/75652496

https://www.jianshu.com/p/20d4b81f8d14

https://blog.csdn.net/morixinguan/article/details/51001713

posted @ 2020-08-24 14:51  玥茹苟  阅读(3568)  评论(0编辑  收藏  举报