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


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM