This repository contains a Jupyter notebook that exemplifies the detection of motion in videos featuring dynamic foreground elements. Utilizing OpenCV, the project applies advanced image processing techniques such as background subtraction and erosion to isolate and refine the detection of moving objects.
Mini goldendoodle puppy detected strolling through a house
Motion detection stands as a cornerstone in the field of computer vision, with significant implications across various sectors including security, surveillance, and traffic management. By enhancing the accuracy and efficiency of motion detection, this project contributes to the development of smarter, more responsive systems that can adapt to dynamic environments.
- Background Subtraction: This technique distinguishes moving foreground objects from static backgrounds, essential for initial motion detection.
- Erosion: Helps in reducing noise and improving the accuracy of the motion detection process by eroding away the boundaries of foreground objects.
To get started with this motion detection notebook:
- Clone this repository to your local machine using
git clone https://github.com/Brandi-Kinard/opencv-motion-detection.git
- Ensure you have Jupyter Notebook installed, or use Google Colab to open the notebook.
- Install necessary libraries (listed in the Prerequisites section below).
- Run the notebook cells sequentially to observe motion detection in action.
Ensure you have the following installed:
- Python 3.6+
- OpenCV (opencv-python)
- Matplotlib
- IPython (for Jupyter functionality)
- Moviepy
- Imageio
- Numpy
Install these packages using pip:
pip install opencv-python matplotlib ipython moviepy numpy imageio
If you want to add more, Please don't hesitate to open a pull request.