Back to Projects
Computer Vision
Completed

Virtual Painter using Hand Gestures

A computer vision application that enables users to draw on a virtual canvas using real-time hand gestures detected through a webcam.

May 2026• Team: Personal Project• Role: Computer Vision Developer
Virtual Painter using Hand Gestures

About this Project

Virtual Painter is a real-time computer vision application that transforms hand gestures into digital drawing commands using MediaPipe Hand Tracking and OpenCV. The system detects hand landmarks from a webcam feed, allowing users to draw, erase, adjust brush thickness, create geometric shapes, and save artwork without touching any physical input device. Designed with an intuitive gesture-based interface, the project demonstrates real-time image processing, gesture recognition, and human-computer interaction techniques.

Tech Stack

Python
OpenCV
MediaPipe
NumPy
Computer Vision

Tools Used

VS Code
Python 3.10
Git
Webcam

Key Features

Core Features

  • ▸Gesture-Based Drawing: Draw naturally on a virtual canvas using index finger movements captured through a webcam.
  • ▸Interactive Canvas: Supports multiple brush colors, eraser mode, canvas clearing, and saving artwork as PNG images.
  • ▸Real-Time Processing: Performs live hand landmark detection and drawing with minimal latency using MediaPipe and OpenCV.

Advanced Functionality

  • ▸Dynamic Brush Control: Automatically adjusts brush thickness based on the distance between the index and middle fingers.
  • ▸Gesture Recognition: Supports selection mode, fist gesture detection, undo functionality, fullscreen mode, and keyboard shortcuts.
  • ▸Shape Drawing Tools: Allows users to create rectangles and circles through intuitive gesture-based interactions.

Learning Outcomes

  • ▸Computer Vision: Developed practical experience in real-time image processing and hand landmark detection.
  • ▸Human-Computer Interaction: Built an intuitive touchless drawing interface using gesture recognition.
  • ▸OpenCV & MediaPipe: Strengthened skills in integrating computer vision frameworks for interactive desktop applications.

Highlights

Real-Time Hand Tracking
Gesture Recognition
Computer Vision
Interactive Canvas

Installation

Clone the Repository

git clone <YOUR_GITHUB_REPOSITORY>
cd virtual-painter

Create Virtual Environment

py -3.10 -m venv mp_env
mp_env\Scripts\activate

Install Dependencies

pip install -r requirements.txt

Run the Application

python main.py

Challenges & Solutions

Challenge

Achieving stable and accurate hand tracking in real time.

Solution

Integrated MediaPipe Hands with OpenCV to accurately detect and track hand landmarks across video frames while maintaining smooth performance.

Challenge

Differentiating between drawing and interface interactions.

Solution

Designed gesture-based controls using finger combinations, enabling seamless switching between drawing, color selection, erasing, and shape creation.

Challenge

Providing a natural drawing experience without physical input devices.

Solution

Implemented dynamic brush thickness, gesture recognition, fullscreen support, and undo functionality to create an intuitive and responsive user experience.

Challenge

Maintaining correct display proportions across different screen sizes.

Solution

Optimized fullscreen rendering to preserve the webcam's aspect ratio, preventing image stretching and ensuring accurate gesture detection.

LinkedIn
GitHub