I purchased a Raspberry Pi 3B & a NOIR Camera last year and I decided to make a home security camera. I installed Raspbian for the Raspberry Pi and OpenCV Library. OpenCV can be used for motion detection & face detection.
My idea is like this: when my Pi detects movement with camera, it captures an image and records the start time of movement. Then it do face detection with the captured image, the image will be saved to the SD card if faces were found. The system will generate a report at the end of the day that summarizes the active period of my room and email it to me together with a few selected photos.
After a week of preparation and testing, I finally made my system working.
1. Motion Detection. Calculate the absolute difference between previous & current frame for each pixel.
2. Save motion detection data.
3. Detect face & save photo.
4. Generate Report a the end of the day and send it to me by email.
5. Delete old log & photos to free up space for SD card.
Update 2017/09/13
This system has been running for almost 2 months since mid July without error, and the SD card’s free space remains the same as before. 🙂
Update 2017/11/12
Added code to auto generate activity-time chart and send it to me by email at the end of the day. I used matplotlib to generate the chart and save it as PNG image (see example below). This makes the room activity data more user friendly.
Thanks for reading 🙂
Cool!!
LikeLike
Thanks😎
LikeLiked by 1 person
Nice~
LikeLike
Thanks😼
LikeLike