上周在玩树莓派的时候,搞那个USB2.0的免驱摄像头,因为还没学opencv嘛,所以按照网上的方法弄了fswebcam和motion两种工具来测试摄像头,可能是操作失误吧,就搞出了下面这个错误
`pi@raspberrypi:~ $ fswebcam --no-banner -r 640x480 p1.jpg
--- Opening /dev/video0...
Trying source module v4l2...
/dev/video0 opened.
No input was specified, using the first.
Error selecting input 0
VIDIOC_S_INPUT: Device or resource busy
查了其他博主的方法,很多都是让你在opencv里加一个release()语句来解决。后来,我在一个英文网站上找到了解决方案并且成功解决了我的问题。
卸掉motion:
sudo apt-get remove motion
原文链接:https://stackoverflow.com/questions/17293573/motion-and-fswebcam-running