A real-time hand tracking drawing app using MediaPipe and OpenCV.
Control a virtual brush using your fingers through your webcam.
- Draw in air using your index finger
- Smooth strokes (no jitter)
- Adjustable brush thickness
- Color selection using on-screen bar
- Eraser mode
- Full hand tracking overlay (for visualization)
- Python
- OpenCV
- MediaPipe (Tasks API)
| Gesture | Action |
|---|---|
| Index finger up | Draw |
| Index + Middle | Select color (top bar) |
| Thumb + Index | Adjust brush thickness |
| Fist | Clear canvas |
git clone https://github.com/sudeepmukul/Virtual-Painter-.git
cd Virtual-Painter-python -m venv venv
venv\Scripts\activatepip install opencv-python mediapipe numpyDownload this file and place it in the project folder:
python Virtual_Painter.py- Works best with good lighting
- Keep hand fully visible for stable tracking
- If tracking feels shaky, move slower
- Save drawings
- Undo/redo gestures
- Better UI (floating palette)
- Multi-hand support
Made by Sudeep <3