Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ivangael/object_detection_with_background_substractor
Object Detection and Tracking with OpenCV background subtractors
https://github.com/ivangael/object_detection_with_background_substractor
background-substraction-algorithm background-subtraction lucas-kanade numpy object-detection object-tracking opencv optical-flow python scipy
Last synced: about 1 month ago
JSON representation
Object Detection and Tracking with OpenCV background subtractors
- Host: GitHub
- URL: https://github.com/ivangael/object_detection_with_background_substractor
- Owner: IvanGael
- Created: 2024-07-08T21:10:40.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2024-07-08T21:16:51.000Z (4 months ago)
- Last Synced: 2024-10-15T17:29:19.904Z (about 1 month ago)
- Topics: background-substraction-algorithm, background-subtraction, lucas-kanade, numpy, object-detection, object-tracking, opencv, optical-flow, python, scipy
- Language: Python
- Homepage:
- Size: 63.5 MB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Object Detection and Tracking with OpenCV
This project implements an object detection and tracking system using OpenCV in Python. It combines background subtraction, centroid-based tracking, and optical flow to detect and track moving objects in a video stream.
![Demo](demo.png)
## Features
- Background subtraction using MOG2(Mixture of Gaussians) or KNN(K-Nearest Neighbors) methods
- Centroid-based object tracking with unique ID assignment
- Optical flow tracking for visualizing object movement
- Foreground mask overlay for visual feedback## Requirements
````
pip install -r requirements.txt
````## How it works
1. Background subtraction isolates moving objects from the static background.
2. Contour detection identifies potential objects.
3. Centroid tracking assigns and maintains unique IDs for detected objects.
4. Optical flow tracking visualizes the movement of feature points.