Semester: Fall 2024
Role: Embedded Systems Developer
Technologies: Raspberry Pi, C++, Python, OpenCV, SMTP, Linux Cron Jobs, Shell Scripting
Project Summary
Designed and built a motion detection security system using a Raspberry Pi and camera module. This project aimed to simulate a low-cost, smart surveillance system capable of detecting movement, recording short video clips, and emailing alerts in real-time.
System Architecture
- Raspberry Pi 4 as the core device
- USB Webcam connected via USB interface
- Motion Detection using OpenCV's background subtraction and frame differencing
- Video Capture in short .mp4 format clips
- Email Notifications using Python’s
smtplib
with Gmail’s SMTP server
Implementation Details
Motion Detection Logic (Python & OpenCV)
- Captured live video frames and compared consecutive frames using grayscale delta detection
- If frame delta exceeded a sensitivity threshold, motion was detected
- Upon detection:
- Timestamped a log entry
- Recorded a 10-second video
Video Recording (Python)
- Recorded a
.mp4
video using OpenCV’s VideoWriter
module
- Saved video files to a local
/recordings
directory with timestamped filenames