A comprehensive suite of interactive, real-time Computer Vision applications leveraging OpenCV and Google's MediaPipe framework for spatial analysis, gesture recognition, and interactive gaming.
This repository houses three core projects that demonstrate pixel manipulation, skeletal landmark tracking, and application control via live camera feeds.
OPENCV/
│
├── hand_tracking.py # Core pipeline framework for spatial coordinate tracking
├── virtual_canvas.py # Air Canvas application utilizing color/gesture-based writing
└── game.py # Gesture-controlled Flappy Bird interactive physics game
To execute any application within this suite, ensure you have Python 3.8+ installed along with the required matrix computation and computer vision libraries:
pip install opencv-python mediapipe numpyThe baseline foundational pipeline for spatial tracking solutions. It maps raw frames from the webcam into structured multi-dimensional numerical coordinate arrays.
- Core Mechanisms: High-fidelity localization mapping 21 individual 3D structural nodes across a human hand.
- Key Features: Real-time frames-per-second (FPS) profiling, bounding boxes, and node connection lines overlay.
- Use Case: Serves as the standalone importable utility script for creating custom gesture-driven utilities.
A virtual touchless writing application allowing users to paint or sketch interface graphics in mid-air by simply tracking spatial positioning.
- Core Mechanisms: Tracks colored pointer caps or specific fingertip coordinates by converting video feeds to the HSV (Hue, Saturation, Value) color plane or overlaying landmark matrices.
- Key Features:
- In-canvas configuration options (dynamic color brushes, eraser adjustments, canvas wipe controls).
- Smooth drawing vectors calculated using NumPy history arrays to avoid brush jitter.
- Use Case: A showcase of matrix filtering, frame differencing, and canvas layer drawing interfaces.
An interactive, full-motion game loop where a real-time pixel proximity calculator replaces traditional keyboard controls.
- Core Mechanisms: Continuously tracks the Euclidean distance between the thumb tip (Landmark 4) and index fingertip (Landmark 8).
- Key Features:
- Pinch Mechanics: Snapping fingers together within a 30-pixel threshold applies upward force vector changes, fighting gravity.
- Dynamic Objects: Procedural obstacle generation loop with bounding-box collision parameters mapped around the bird orb.
- Interactive UX: Visual tracking lines overlay, real-time score indicators, and a terminal state restart dashboard triggered via keyboard commands.
Run any module directly from your project directory terminal shell using standard Python invokers:
# Run the Core Hand Tracking utility
python hand_tracking.py
# Launch the Air Canvas utility
python virtual_canvas.py
# Launch the Flappy Bird interactive game
python game.pyQ— Quits the running camera process and closes all OpenCV interface windows cleanly.R— Resets score arrays and obstacle vectors inside the Flappy Bird game loop when a game-over threshold is reached.