https://github.com/konynour/motion-detection-tutorial
https://github.com/konynour/motion-detection-tutorial
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/konynour/motion-detection-tutorial
- Owner: konynour
- Created: 2025-07-31T22:49:56.000Z (2 months ago)
- Default Branch: main
- Last Pushed: 2025-07-31T23:04:29.000Z (2 months ago)
- Last Synced: 2025-08-01T01:28:32.466Z (2 months ago)
- Language: Jupyter Notebook
- Size: 2.01 MB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 🎥 Motion Detection Project
> A Python project that detects motion from videos using OpenCV.
---
## 🌟 Overview
This project uses simple computer vision techniques to **detect motion in video streams**. It's ideal for:
- Beginners learning OpenCV
- Building security camera simulations
- Real-time object tracking demos---
## 📂 Project Structure
```
motion-detection/
│
├── motion_detection.py # Main Python script
├── test.mp4 # Example video input
├── static.png # Optional image output
├── README.md # Project documentation
├── .gitignore # Files to exclude from Git
```---
## 🛠️ Requirements
Install dependencies with:
```bash
pip install opencv-python imutils matplotlib numpy
```---
## 🧠 How It Works
1. Read video frame by frame
2. Convert frames to grayscale
3. Compare current and previous frames to detect movement
4. Highlight detected movement with bounding boxes---
## ▶️ Usage
Run the script with:
```bash
python motion_detection.py
```- By default, it uses the webcam.
- To use a video file, replace `cv2.VideoCapture(0)` with your file path.---
## 🔒 .gitignore
These files are ignored by Git:
```
static.png
test.mp4
test.png
```---
## 📸 Output Example
Add screenshots or output images here, like:

---
## 📘 License
**MIT License**
This project is free to use for learning and experimentation.