We can see that a mobile image monitoring system built using motion on a blog is very powerful, but most of them lack remote monitoring capabilities, mostly limited to local area networks. OK, I have a 30 W pixel USB camera on hand, so I will also use the yeelink service for DIY, haha.
Author's DIY series references:
I. PurposeDIY remote mobile image monitoring system can automatically capture mobile images and upload them to the server. It also has the timed capture function, enabling you to view or receive alarms through web/android/ios. Effect: provide a link, welcome to audience: http://www.yeelink.net/devices/7376
Ii. software and hardware environmentHardware: tiny6410 + USB camera + wired network or USB wifi software: linux + QT/motion/curl/crontab/shell/YeeLink Service
Iii. Implementation of mobile Image Monitoring1. Working principle the so-called mobile image monitoring is simply to use a USB camera to monitor a certain area at a fixed point. The camera does not take pictures at ordinary times. Only when a moving object passes through, the camera automatically captures images (the size of the objects to be monitored and the camera speed is adjustable) and stores the captured images in a specified directory or network server for unattended monitoring. Motion is a free and open-source mobile Image Monitoring Program. 2、motion (download A motion-3.2.12.tar.gz file in ubuntu, copy it to ubuntu through samba, and then follow the steps below tar zxvf motion-3.2.12.tar.gzcd motion-3.2.12. /configure -- prefix = // _ install/-- host = arm-linux makemake installmkdir-p/Development Board root file system directory/var/run/motioncp/motion installation directory/bin motion/ development Board root file system directory/usr/sbin/cp/motion installation directory/etc/motion-dist.conf/Development Board root file system directory/etc/motion. conf 3. Configure motion. for the basic configuration in conf, see section 1. For details, see the downloaded package in Section 7. Detailed operation procedure summary. . Important configurations: snapshot_interval 600 // set the target_dir/dev/shm/motion_pic at a scheduled time for seconds. // set the path for storing the captured image to snapshot_filename snapshot. // set the name of the object to pai_filename % v-% Y % m. % d % H % M % S-% q_motion // sets the file name format of the mobile captured image, facilitate subsequent shell File Analysis and Processing
2. Upload data according to yeelink api. Use shell scripts on tiny6410 linux. 2.1 upload the mobile image capture data script post_motion.sh#! /Bin/YL_ApiKey = YL_URL = http: # search/dev/shm/PIC =$ (/dev/shm/motion_pic-name |-rt |-n $ PIC>/dev/shm/-q/dev/shm/ motion_name & status = yes | status = [$ status = upcmd = $ PIC $ upcmd |
2.2 upload the timed capture data script post_timelapse.sh #!/bin/ YL_ApiKey= YL_URL=http: PIC=/dev/shm/motion_pic/ upcmd=$PIC $upcmd|
6. added the scheduled operation service.Add the following red line to the crontab service to run the script once every minute. Save and exit. [Root @ FriendlyARM crontabs] # crontab-e [root @ FriendlyARM crontabs] # crond & // enable crondThe following provides the cross-compiled executable files (the cross tool chain is: FriendlyARM/toolschain/4.5.1/bin/arm-linux-gcc) http://download.csdn.net/detail/v_hyx/6907379usage instructions and operation steps:Copy the dynamic library required for motion to/lib // sdcard/motion_lib *****/dev/shm/post_timelapse of the tiny6410 development board system. */*****/dev/shm/post_motion. [root @ FriendlyARM crontabs] # copy the configuration file to // sdcard/motion. conf/etc/motion-c/etc/motion. conf &
Yeelink's web page moves the captured finger Image1. Linux porting motion to 6410 Development Board (mobile Image Monitoring System) Swap http://blog.yeelink.net /? Open-source mobile Image Monitoring Program under linux-motion compilation and configuration http://www.cnblogs.com/qinyg/p/3355707.html