Loading repository data…
Loading repository data…
Alok-2002 / repository
This repository contains a Python program for motion detection using the OpenCV library. The program allows you to detect motion in a video stream or a webcam feed and highlight the areas where motion is detected. It also provides the option to save the output video with the motion highlights.
A transparent discovery signal based on current public GitHub metadata.
This score does not audit code, security, maintainers, documentation quality, or suitability. Verify the repository and its current documentation before adoption.
This repository contains a Python program for motion detection using the OpenCV library. The program allows you to detect motion in a video stream or a webcam feed and highlight the areas where motion is detected. It also provides the option to save the output video with the motion highlights.
Clone the repository to your local machine using the following command:
git clone https://github.com/alok-2002/Motion_Detection_Using_Python.git
Navigate to the project directory:
cd Motion_Detection_Using_Python
Install the required dependencies:
pip install -r requirements.txt
To run the motion detection program using Python, use the following command:
python motion_detection.py
The program will open the webcam and start detecting motion. The areas where motion is detected will be highlighted in real-time. If you want to save the output video, press the 's' key.
Press the 'q' key to quit the program and stop the motion detection.
If you prefer not to run the program with Python, you can use the provided executable file. Simply double-click the file to start the motion detection program. The functionality and usage remain the same as running with Python.
motion_detection.exePlease note that the executable file is platform-specific, so make sure to use the appropriate file for your operating system.
You can modify the program's behavior by adjusting the configuration settings in the config.json file. The available configuration options are:
MIN_AREA: The minimum contour area (in pixels) to be considered as motion. You can increase or decrease this value based on your needs.THRESHOLD_SENSITIVITY: The sensitivity of the motion detection algorithm. Higher values will detect smaller motion, while lower values may require larger motion to be detected.BLUR_SIZE: The size of the Gaussian blur kernel applied to the frames. Increasing this value can help reduce noise but may result in less precise motion detection.Contributions to this repository are always welcome. If you find any issues or have suggestions for improvements, please create an issue or submit a pull request.
This project is licensed under the MIT License.
This program is built using the OpenCV library. Special thanks to the developers of OpenCV for providing a powerful computer vision library that made this motion detection implementation possible.