Motion detection
2016-08-23
0 0 0
no vote
Other
Earn points
Hi guys, as a first camera board project I've created a simple and efficient motion detection script in Python using PIL.
While watching for motion it pipes a thumbnail image from raspistill at around 1fps to analyse (it keeps everything in memory to avoid wearing out the SD card). Once motion is detected it calls raspistill again to write a high-res jpeg to disk.
It also checks free disk space and if under a set limit it starts to delete the oldest images to make sure there is always enough free space for new images.
While running on my rev1 B it consumes around 12% CPU / 4% ram and manages to capture a full size image once ever 2-3 secs.
If you need to install PIL run "sudo aptitude install python-imaging-tk"
While watching for motion it pipes a thumbnail image from raspistill at around 1fps to analyse (it keeps everything in memory to avoid wearing out the SD card). Once motion is detected it calls raspistill again to write a high-res jpeg to disk.
It also checks free disk space and if under a set limit it starts to delete the oldest images to make sure there is always enough free space for new images.
While running on my rev1 B it consumes around 12% CPU / 4% ram and manages to capture a full size image once ever 2-3 secs.
If you need to install PIL run "sudo aptitude install python-imaging-tk"
python
检测
运动
Related Source Codes
Word memorization software
0
0
no vote
CWT Python example
0
0
no vote
STFT example
0
0
no vote
Chinese Speech Recognition
0
0
no vote
python-ela
0
0
no vote
No comment