Skip to content

A Jupyter notebook demonstrating motion detection in videos using OpenCV techniques such as background subtraction and erosion, tailored for real-world applications.

Notifications You must be signed in to change notification settings

Brandi-Kinard/opencv-motion-detection

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 

Repository files navigation

OpenCV Motion Detection

Open In Colab

Overview

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.

giphy (13)
Mini goldendoodle puppy detected strolling through a house

Why This Project Matters

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.

Project Features

  • 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.

How to Use This Project

To get started with this motion detection notebook:

  1. Clone this repository to your local machine using git clone https://github.com/Brandi-Kinard/opencv-motion-detection.git
  2. Ensure you have Jupyter Notebook installed, or use Google Colab to open the notebook.
  3. Install necessary libraries (listed in the Prerequisites section below).
  4. Run the notebook cells sequentially to observe motion detection in action.

Prerequisites

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

For the Future

If you want to add more, Please don't hesitate to open a pull request.

👋 Get in Touch

text