Skip to content

About

A computer vision–based virtual air writing system that allows users to write in the air using finger tracking, converting gestures into real-time digital text with interactive controls.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

Repository files navigation

🖐️ Virtual Air Writing System

A touchless human-computer interaction system that lets you write and draw in the air using only your finger and a webcam — no mouse, no stylus, no touch required.


🚀 Quick Start

1. Install dependencies

cd VirtualAir
pip install -r requirements.txt

2. Run the application

python virtual_air_writer.py

🖐️ Gesture Guide

Gesture Fingers Up Action
☝️ Index finger Index only Draw on canvas
✌️ Peace sign Index + Middle Select color (move to palette)
🖐️ Three fingers Index + Middle + Ring Erase (partial)
✋ Open hand All 5 fingers Clear entire canvas
👍 Thumbs up Thumb only Save drawing

Keyboard shortcuts

Key Action
S Save drawing
C Clear canvas
Q Quit

🎨 Color Palette

6 built-in colors — hover your ✌️ (Index + Middle) fingers over the swatches in the header to select:

Color Hex
Sky Blue #34B4EB
Neon Green #32E650
Hot Pink #F532C8
Gold #FFD21E
White #FFFFFF
Cyan #32DCFF

🏗️ Architecture

virtual_air_writer.py
├── HandDetector        → MediaPipe wrapper (21 landmarks)
├── GestureRecognizer   → Maps finger states → gesture names
├── Canvas              → NumPy drawing layer + save/erase
└── UIRenderer          → HUD overlay (header, toasts, labels)

💾 Saved Drawings

Saved files are stored in ./saved_drawings/ with timestamped filenames:

saved_drawings/
└── drawing_20260413_214132.png

⚙️ Requirements

  • Python 3.9+
  • Webcam (USB or built-in)
  • opencv-python, mediapipe, numpy

🔧 Tuning Parameters

Edit at the top of virtual_air_writer.py:

BRUSH_THICKNESS  = 8    # Stroke width
ERASER_THICKNESS = 60   # Eraser radius
SMOOTHING_BUFFER = 6    # Larger = smoother but more lag
MIN_DIST         = 5    # Min px to register new point

About

A computer vision–based virtual air writing system that allows users to write in the air using finger tracking, converting gestures into real-time digital text with interactive controls.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages