Skip to content

ArunR1408/AirCanvas-Gesture-Drawing

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

AirCanvas

Real-Time Gesture-Based Drawing Interface using Computer Vision.

AirCanvas transforms hand movement into a responsive drawing interface using real-time hand tracking. Designed with accuracy and smoothness in mind, it implements stroke confirmation and interpolation techniques to ensure fluid, stable rendering without gesture complexity.


Overview

AirCanvas captures real-time hand landmarks and enables drawing when exactly one finger (index) is raised. The system emphasizes accuracy and stability over gimmicks, using stroke confirmation logic, jitter filtering, and linear interpolation to produce smooth and reliable results.

The drawing appears as a floating overlay above the live camera feed, creating a clean and intuitive touchless interaction experience.


Key Features

  • Real-time hand tracking using MediaPipe
  • Single-finger drawing logic (index only)
  • Stroke confirmation frames to prevent accidental marks
  • Linear interpolation for smooth, gap-free strokes
  • Light jitter suppression for stability
  • Hover-based color selection with delay confirmation
  • Adjustable brush thickness (+ / - keys)
  • Transparent overlay compositing
  • Timestamp-based PNG export
  • Minimal and clean UI design

Controls

  • '+' Increase brush size
  • '-' Decrease brush size
  • 'C' Clear canvas
  • 'S' Save drawing as PNG
  • 'ESC' Exit application
  • Click 'H' Toggle help panel

Technical Highlights

AirCanvas is structured around four logical components:

  1. Hand Tracking Layer
    Detects and tracks hand landmarks in real time.

  2. Gesture Interpretation Layer
    Confirms exactly one finger raised before initiating drawing.

  3. Drawing Engine
    Implements:

    • Frame-based stroke confirmation
    • Linear interpolation between points
    • Jitter filtering
    • Alpha compositing for overlay rendering
  4. UI Overlay System
    Includes color selection boxes and a semi-transparent help panel.

The system adapts dynamically to frame size changes and avoids hardcoded resolution assumptions, making it compatible with standard webcams and phone-based webcam setups.


Installation

Clone the repository and install dependencies:

pip install -r requirements.txt

Run the application:

python aircanvas.py


Requirements

  • Python 3.8+
  • OpenCV
  • MediaPipe
  • NumPy

License

This project is released under the MIT License.

About

Gesture-controlled drawing interface using computer vision.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages