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.
- 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
pip install -r requirements.txt
- Background subtraction isolates moving objects from the static background.
- Contour detection identifies potential objects.
- Centroid tracking assigns and maintains unique IDs for detected objects.
- Optical flow tracking visualizes the movement of feature points.