树莓派 B+ Yeelink实现图像监控
2014-09-06 12:46
288 查看
root@raspberrypi:/workplace# ls -l /dev/video0
crw-rw---T+ 1 root video 81, 0 Sep 6 03:37 /dev/video0
安装摄像头抓图软件
sudo apt-get install fswebcam
在 python下测试 import cv 看能否成功
树莓派+Yeelink实现图像监控 :http://stayrunning.blog.163.com/blog/static/1967580022013222105948256/
红外感应模块+蜂鸣器实现简易报警 : http://shumeipai.nxez.com/2014/08/31/infrared-sensor-module-and-buzzer-alarm-achieve.html
Ubuntu下Opencv与Python的协作 :http://pinkyjie.com/2010/10/19/ubuntu-opencv-python/
树莓派 B+ Yeelink实现图像监控
数值传感器请参考 : http://blog.csdn.net/xiabodan/article/details/390848771 安装摄像头
首先需要一个网络摄像头,免驱,插上我们可以在查看是否有/dev/video0 ,root@raspberrypi:/workplace# ls -l /dev/video0
crw-rw---T+ 1 root video 81, 0 Sep 6 03:37 /dev/video0
安装摄像头抓图软件
sudo apt-get install fswebcam
2 安装opencv
apt-get update apt-get install libopencv-dev python-opencv
在 python下测试 import cv 看能否成功
3 向YEELINK POST 单幅图片
http_post.pydef http_picture(url_api_key, pic): """ POST a message to yeelink example: url_api=("http://api.yeelink.net/v1.0/device/13985/sensor/23188/datapoints","d288d8257ffa56286cbd251610958aab") pic = http_post(url_api,pic """ apiurl = url_api_key[0] apiheaders = {'U-ApiKey': url_api_key[1], 'content-type': 'application/json'} try: r = requests.post(apiurl, headers=apiheaders, data=pic) except: pass return None
4 captrue image -- 基于opencv(不是python测试用)
int main( int argc, char** argv ) { printf("I am start \n"); VideoCapture cap(0); // open the default camera if(!cap.isOpened()) // check if we succeeded return -1; printf("11111%f, %f\n",cap.get(CV_CAP_PROP_FRAME_WIDTH),cap.get(CV_CAP_PROP_FRAME_HEIGHT)); cap.set(CV_CAP_PROP_FRAME_WIDTH, 640); cap.set(CV_CAP_PROP_FRAME_HEIGHT, 480); cap.set(CV_CAP_PROP_FPS, 15); printf("22222%f, %f\n",cap.get(CV_CAP_PROP_FRAME_WIDTH),cap.get(CV_CAP_PROP_FRAME_HEIGHT)); Mat src_gray; // cvNamedWindow( "video", CV_WINDOW_AUTOSIZE ); // while(1) { Mat frame; cvWaitKey(50); cap >> frame; printf("begin save pic\n"); imwrite("原图.jpg", frame); printf("Save Image Successful\n"); //imshow("video", frame); } return 0; }
5 python下抓取图片POST到YEELINK
参考
树莓派玩家5分钟内将树莓派-USB摄像头与Yeelink连接–最好玩的网页监控器 : http://blog.yeelink.net/?p=468树莓派+Yeelink实现图像监控 :http://stayrunning.blog.163.com/blog/static/1967580022013222105948256/
红外感应模块+蜂鸣器实现简易报警 : http://shumeipai.nxez.com/2014/08/31/infrared-sensor-module-and-buzzer-alarm-achieve.html
Ubuntu下Opencv与Python的协作 :http://pinkyjie.com/2010/10/19/ubuntu-opencv-python/
相关文章推荐
- 树莓派 B+ Yeelink实现图像监控
- OneAPM大讲堂 | 基于图像质量分析的摄像头监控系统的实现
- 树莓派 usb摄像头 视频图像监控服务的玩法
- 使用python和树莓派实现远程监控
- 树莓派--python实现实时监控
- 树莓派 motion安装摄像头实现远程监控
- 树莓派实现远程监控
- 树莓派使用mjpg-steamer实现网络监控
- 树莓派+罗技270摄像头+mjpg_streamer实现网路监控
- 树莓派使用MJPG-Streamer实现网络监控
- 树莓派使用USB摄像头和motion实现监控
- 树莓派新版系统上使用mjpg实现摄像头监控
- 树莓派USB摄像头和motion实现网络监控
- 树莓派学习笔记(4):利用yeelink实现在线硬件状态监控
- 树莓派与arduino结合控制舵机实现灵活监控
- OneAPM大讲堂 | 基于图像质量分析的摄像头监控系统的实现
- 基于树莓派实现的可转动的监控摄像头系统
- 树莓派远程监控的实现
- VB实现USB摄像头视频图像的监控、截图、录像
- 在树莓派上实现usb摄像头监控的几种方案