AI Virtual Painter

A computer vision application that turns any webcam into an interactive drawing canvas — paint without touching a thing.

Python OpenCV MediaPipe Real-Time Hand Tracking
View on GitHub

Overview

AI Virtual Painter converts a standard webcam into an interactive drawing canvas. Using MediaPipe's real-time hand tracking, the system detects 21 hand landmarks and translates finger movements into brush strokes without any physical input device — a beginner-friendly demonstration of computer vision and gesture-based interfaces.

Purpose — Why This Project Exists

This project exists to show, in the most approachable way possible, how computer vision can replace physical input hardware for creative and accessible interfaces — no stylus, no tablet, no special sensor, just a standard webcam and a hand. It's also a compact, single-file reference for anyone learning real-time hand tracking and gesture recognition from scratch.

Animated Pipeline

1
Webcam Feed
Live HD video captured frame by frame.
2
Hand Detection
MediaPipe locates the hand in each frame.
3
Landmark Tracking
21-point skeleton tracked in real time.
4
Gesture Recognition
Finger positions mapped to draw / select gestures.
5
Brush/Tool Mapping
Gesture resolved to color, eraser or brush size.
6
Canvas Rendering
Strokes blended onto the live canvas in real time.

Key Features

Freehand Drawing — controlled by index-finger position.
Two-Finger Gestures — activate color and tool selection.
Five-Color Palette — plus eraser and canvas-clear.
Export Artwork — timestamped PNG snapshots.
21-Point Hand Skeleton — real-time tracking at HD resolution.
Configurable Controls — brush thickness, eraser size, keyboard shortcuts.

Benefits

No Extra Hardware

Works with any standard webcam — no stylus or sensor needed.

Learn by Example

Compact, single-file reference for real-time hand-tracking CV.

Fully Offline

Runs entirely on-device — no cloud calls, no data leaves the machine.

Technology Stack

Python 3.9–3.11 OpenCV MediaPipe NumPy