I’ve always wanted to be an online educator — someone who can explain ideas visually, not just with words. While teaching (and learning) online, I noticed a gap: drawing naturally in the air, the way teachers do on a physical board, is still awkward with a mouse or stylus.
So I built this AI- Powered Air Canvas.
This project lets you draw on a virtual canvas using just your hand, tracked in real time by state of the art AI models through a webcam. No touchscreen. No stylus. Just intuitive hand gestures.
The goal wasn’t just to build a cool computer vision demo — it was to create a teaching-friendly, interactive tool that makes explanations more natural, visual, and engaging.
Air Canvas is a real-time computer vision application that allows you to:
- ✋ Track your hand using a webcam
- ✍️ Draw in the air with your index finger
- 🎨 Switch colors using hand gestures
- 🧠 Use gesture logic (fingers up/down) to control drawing
- 🖥️ See everything live on a virtual canvas
It’s inspired by the idea of turning human gestures into digital interaction — especially for education, presentations, and creative expression.
- Python 3.11
- OpenCV — webcam input, drawing, UI
- MediaPipe (0.10.29) — real-time hand landmark detection
- NumPy — array & image operations
Air-Canvas/
│
├── HandTrackingModule.py # Reusable hand detection + gesture logic
├── VirtualPainter.py # Main Air Canvas application
├── Header # Project image headers
└── README.md # Project documentation
-
Webcam captures frames
-
MediaPipe detects 21 hand landmarks
-
Finger states are inferred using landmark positions
-
Gesture logic determines:
- When to draw
- When to switch colors
- When to clear canvas
-
OpenCV overlays drawings in real time
This modular approach makes the system easy to extend for:
- Gesture-based controls
- Teaching tools
- Interactive whiteboards
git clone https://github.com/AaronTide/AI_Virtual_Painter_With_ComputerVision.git
cd AI_Virtual_Painter_With_ComputerVisionpython -m venv .venvActivate it:
Windows
.venv\Scripts\activatemacOS / Linux
source .venv/bin/activateInstall compatible versions:
pip install numpy==1.26.4
pip install opencv-python
pip install mediapipe==0.10.29python VirtualPainter.pyMake sure your webcam is connected and not in use by another app.
| Gesture | Action |
|---|---|
| Index finger up | Draw |
| Two fingers up | Select mode |
| All fingers down | Idle |
| Use Eraser from header | Erase |
(Gesture logic can be customized in HandTrackingModule.py)
- Online teaching & tutoring
- Explaining math, physics, or diagrams
- Interactive presentations
- Gesture-based UI experiments
- Computer vision learning projects
- Save drawings as images
- Integrate with screen recording tools
- Convert to a web-based or tablet-friendly version
This project sits at the intersection of:
- Education
- Human–Computer Interaction
- Computer Vision
Air Canvas is not just about drawing — it’s about making digital teaching more human.
Built with curiosity and purpose by Arifa Rahman Aspiring educator • Computer Vision enthusiast • Software Builder
Stars are my fuel, pls leave a star if you think this was cool <3