Skip to content

Webcam Motion Detection with OpenCV This Python script, powered by OpenCV, swiftly detects motion in webcam video feeds. It marks moving objects with bounding rectangles, making it an ideal foundation for motion detection projects. To use it, simply clone the repository and run the script, pressing 'ESC' to exit when done.

Notifications You must be signed in to change notification settings

Ananshia/Moving-Object-Detection-using-OpenCV

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

Moving-Object-Detection-using-OpenCV

This Python script utilizes OpenCV to perform real-time motion detection using a webcam feed. It captures video frames, compares them to the initial frame, and highlights moving objects with bounding rectangles. This is a straightforward tool for motion detection, making it a great starting point for various projects.

Features

  • Real-time motion detection using your webcam.
  • Moving objects are marked with bounding rectangles.
  • Easy to use and customizable.

Prerequisites

You'll need to have the following installed to run this code:

  • Python
  • OpenCV
  • imutils

You can install the required packages using pip:

pip install opencv-python imutils

Usage

  1. Clone this repository to your local machine.
  2. Run the Python script.
  3. To exit the application, press 'ESC'.

You can customize the code by adjusting the area variable to change the minimum object size needed to classify it as moving. Feel free to modify and expand upon this code to suit your specific project requirements.

Acknowledgments

This script was inspired by the need for a simple motion detection tool using OpenCV.

Feel free to use, modify, and improve this code as needed for your own projects. If you have any questions or suggestions, please don't hesitate to reach out.

About

Webcam Motion Detection with OpenCV This Python script, powered by OpenCV, swiftly detects motion in webcam video feeds. It marks moving objects with bounding rectangles, making it an ideal foundation for motion detection projects. To use it, simply clone the repository and run the script, pressing 'ESC' to exit when done.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages