This project is a Python-based motion detection system that captures video from a webcam and detects motion in real-time. It uses OpenCV library for computer vision tasks and provides a simple interface to visualize detected motion.
- Real-time Motion Detection: Captures video from a webcam and detects motion in real-time.
- Motion Highlighting: Highlights moving objects within the webcam stream with bounding boxes.
- Adjustable Parameters: Parameters like threshold value and contour area threshold are adjustable to fine-tune motion detection sensitivity.
- Simple Interface: Provides a straightforward interface for displaying the webcam stream with motion detection overlays.
-
Clone the repository:
git clone https://github.com/anesu398/webcam-motion-detector.git
-
Navigate to the project directory:
cd webcam-motion-detector
-
Install dependencies:
pip install opencv-python numpy
-
Run the script:
python motion_detector.py
-
Adjust parameters (optional):
- Modify threshold value and contour area threshold in the script to fine-tune motion detection sensitivity.
-
View webcam stream with motion detection overlays.
-
Press 'q' to exit the application.
- Threshold Value: Adjust the threshold value to control the sensitivity of motion detection.
- Contour Area Threshold: Adjust the contour area threshold to filter out small movements.
Here's a sample output of the motion detector:
Contributions are welcome! If you have any suggestions, feature requests, or find any issues, please open an issue or submit a pull request.
This project is licensed under the MIT License - see the LICENSE file for details.