root@raspberrypi:~# apt-get update
root@raspberrypi:~# apt-get upgrade
插入QuickCam 至Pi的USB Port ,即偵測到WebCam
root@raspberrypi:~# lsusbBus 001 Device 008: ID 046d:0994 Logitech, Inc. QuickCam Orbit/Sphere AF
Bus 001 Device 006: ID 7392:7811 Edimax Technology Co., Ltd EW-7811Un 802.11n Wireless Adapter [Realtek RTL8188CUS]
Bus 001 Device 005: ID 040b:2000 Weltrend Semiconductor
Bus 001 Device 004: ID 046d:c016 Logitech, Inc. Optical Wheel Mouse
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. SMSC9512/9514 Fast Ethernet Adapter
Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
root@raspberrypi:~#
root@raspberrypi:~# ls -al /dev/video*
crw-rw----+ 1 root video 81, 0 Jan 26 15:16 /dev/video0
root@raspberrypi:~#
安裝fswebcam
root@raspberrypi:/# apt-get install fswebcam
測試拍一張
root@raspberrypi:/tmp# fswebcam -d /dev/video0 test.jpg
--- Opening /dev/video0...
Trying source module v4l2...
/dev/video0 opened.
No input was specified, using the first.
Adjusting resolution from 384x288 to 352x288.
--- Capturing frame...
Captured frame in 0.00 seconds.
--- Processing captured image...
Writing JPEG image to 'test.jpg'.
可以順利拍照
============================================================
安裝motion
root@raspberrypi:~# apt-get install motion
root@raspberrypi:~# mkdir /tmp/motion
root@raspberrypi:~# chown -R 777 /tmp/motion
root@raspberrypi:~# chown -R 777 /etc/motion/motion.conf
root@raspberrypi:~# vi /etc/default/motion
start_motion_daemon=yes
stream_localhost off
root@raspberrypi:~# vi /etc/motion/motion.conf
webcontrol_localhost off
root@raspberrypi:~# service motion restart
打開瀏覽器 http://IP :8081 就可以看到即時影像
Ref:.
http://sourceforge.net/projects/motion/
https://www.raspberrypi.org/documentation/usage/webcams/
http://tekibrain.blogspot.tw/2013/05/raspberry-pi-webcam-motion-webcam-server.html
http://pimylifeup.com/raspberry-pi-webcam-server/
http://gsyan888.blogspot.tw/2013/04/raspberry-pi-webcam-server.html
沒有留言:
張貼留言