2019阿里云双12.12最低价产品入口(新老用户均可),
地址:https://www.aliyun.com/minisite/goods
推荐:树莓派新版系统上使用mjpg-streamer获取USB摄像头和树莓派专用摄像头RaspiCamera图像
[网上有很多关于mjpg-stream移植到树莓派的文章,大部分还是使用的sourceforge.net上的mjpg-streamer-r63.tar.gz,该工程版本比较老,在新版系统中编译需要把源码文件中所
折腾了2个晚上,搞定了基于树莓派的可转动的监控摄像头系统 ,功能包括基于mjpeg的视频监控,基于舵机的左右转动云台,基于php网页的远程监控视频查看和云台控制功能。
视频监控部分使用motion实现,需要无驱摄像头,其实一般的摄像头都行的。
云台使用辉盛9g舵机,驱动程序使用的是ServoBlaster,然后自己用php和jquery写了个控制网页,然后放到已经配置好的nginx+ php5-fpm服务器上。
网页功能包括舵机控制和mjpeg图片流的显示,这个有个缺陷,chrome以外的浏览器对mjpeg格式支持不好,后面视频监控这块需要用ffserver或live555之类的流媒体技术解决,但暂时没有搞定,以后有空再折腾,现在基本够用了。
[(一)树莓派使用USB摄像头说明最好是linux下能支持的uvc摄像头,我用的uvc301的摄像头,linux下一般免驱。1.首先更新firmware:rpi-update是老外开发的一个更新树莓派fir
代码下载: git clone https://github.com/offbye/rpiservocamra.git
安装说明,我在github上用英文写的,就不写中文的了。
To use the program you need to have a php web server, such as Apache+ php or nginx+php.
1 Install usb camra and motion on Raspberry PI
$ lsusb
$ sudo apt-get install motion
$ motion&
Browse in Chrome Browser: http://yourserver:8081, you will see the camra mjpeg image.
2 Install 9g servo
1) Connent the servo to raspberry pi , there are 3 pins, connect the signal line to GPIO17, the other 2 pin is power, connent to 5v and GND, or use a extra 5V/500mA power supply(recommend).
2) install ServoBlaster
Please read ServoBlaster/README.txt for more information
$: cd ServoBlaster/
$: ls
$: make servod
$: sudo ./servod
$: echo 1=160 > /dev/servoblaster
if the servo connected correctly, it will change position.
3 install Web Control
Copy web to your php web server. then you can browser it in Chorome browser
http://yourserver/web/cam.html
[原文:http://blog.csdn.net/huhumama0/article/details/9164873近来风闻住宿地不太安全,正好手边有个树莓派,花了些时间用树莓派实现了远程监控,下面和大家分享一下,希