https://github.com/gotz1480/py-security-camera
A simple security camera written in Python which starts recording when a face is detected and warns the user by e-mail.
https://github.com/gotz1480/py-security-camera
opencv opencv-python opencv2 opencv2-python security-cam security-camera security-camera-python
Last synced: 6 months ago
JSON representation
A simple security camera written in Python which starts recording when a face is detected and warns the user by e-mail.
- Host: GitHub
- URL: https://github.com/gotz1480/py-security-camera
- Owner: gotz1480
- License: gpl-3.0
- Created: 2021-10-19T17:11:54.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2021-10-19T17:42:52.000Z (almost 4 years ago)
- Last Synced: 2025-04-04T13:13:21.415Z (6 months ago)
- Topics: opencv, opencv-python, opencv2, opencv2-python, security-cam, security-camera, security-camera-python
- Language: Python
- Homepage:
- Size: 22.5 KB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# py-security-camera
A simple security camera written in Python which starts recording when a face is detected and warns the user by e-mail using the Python library OpenCV.## Installation and settings
Install requirements:
- ```pip install -r requirements.txt``` (Windows)
- ```pip3 install -r requirements.txt``` (Linux/macOS)Configure settings:
- Set ```EMAIL_USER``` and ```EMAIL_PASSWORD``` as system variables
- Substitute ```sender@email.com```, ```recipient@email.com``` and ```smtp.email.com``` in the ```py-security-camera.py``` file with your sender and destinatary e-mails and your e-mail provider. Make sure to use SMTPS (secured SMTP).## Usage
Run the program with:
- ```python py-security-camera.py``` (Windows)
- ```python3 py-security-camera.py``` (Linux/macOS)When the program is running, the webcam is turned on and cannot be used by other applications. It starts recording whenever a face is detected by the camera and sends an e-mail warning to the preconfigured e-mail setting.
It stops recording 5 seconds after no face is being detected on screen. This 5 seconds setting can be modified by altering the variable ```SECONDS_TO_RECORD_AFTER_DETECTION```.
The application can be exited by pressing ```q```.