Skip to content

Repository files navigation

Contactless Hand Tracking Control System

A touchless computer interaction platform that enables hands-free drawing, presentation control, and system navigation using real-time computer vision and hand landmark tracking.

Overview

This project transforms your webcam and hands into an intuitive input device. It consists of four integrated modules powered by OpenCV, MediaPipe, and cvzone for real-time hand landmark detection, along with PyAutoGUI for system-level control.

Features

  • Virtual Drawing Board — Freehand drawing and shape creation using index finger gestures
  • Presentation Controller — Navigate slides and control media using finger-count gestures
  • System Controller — Move the mouse, scroll, click, and swipe using hand gestures
  • PPT Viewer — Navigate presentation slides and annotate them live with gestures

Modules

1. Virtual Drawing Board (air_canvas.py)

Draw on a virtual canvas without touching a screen.

Tool Function
Free Draw Sketch continuously with the index finger
Line Draw straight lines (two-finger selection)
Rectangle Draw rectangles (two-finger selection)
Circle Draw circles (two-finger selection)
Eraser Remove drawing with a thicker brush
Undo Revert the last action from the stack
Color Selector Choose blue, green, red, or black

Operating principle:

  • Two fingers up → Selection mode (move cursor to top toolbar)
  • One finger up → Drawing mode
  • Raise all 10 fingers → Quit program

2. Presentation Controller (aircanvas.py)

Control presentation playback using finger counts.

Gesture Action
1 finger Next slide (Right arrow)
2 fingers Previous slide (Left arrow)
3 fingers Scroll up (Up arrow)
4 fingers Scroll down (Down arrow)
5 fingers Play/Pause (Space)
Esc key Exit program

3. System Controller (system_controller.py)

Control your computer cursor and window interactions.

Gesture Action
Index + middle join Left click
Vertical finger movement Scroll up/down
Horizontal wrist movement Arrow key swipes
Index finger position Mouse cursor mapping
5+ fingers across both hands Exit program

4. PPT Viewer with Annotations (ppt_viewer.py)

A dedicated presentation assistant with slide navigation and live annotation.

Gesture Action
Index + middle Show pointer
Index only Draw annotation
Left gesture (1 finger) Previous slide
Right gesture (pinky) Next slide
Three-middle gesture Remove last annotation
All 5 fingers Exit program

Technology Stack

  • Python 3
  • OpenCV — Image capture and rendering
  • MediaPipe / cvzone — Real-time hand landmark detection
  • NumPy — Canvas manipulation and image processing
  • PyAutoGUI — Keyboard and mouse automation
  • Flask — Web dashboard for launching modules

Installation

git clone https://github.com/<your-username>/Contactless-Hand-Tracking-Control-System.git
cd Contactless-Hand-Tracking-Control-System
pip install -r requirements.txt

Dependencies

opencv-python
mediapipe
cvzone
numpy
pyautogui
flask

Usage

Launch the web dashboard

python app.py

Open http://localhost:5000 in your browser and choose a module to launch.

Run a module directly

python air_canvas.py
python aircanvas.py
python system_controller.py
python ppt_viewer.py

Controls

  • Press q or Esc to quit any module (where applicable)
  • Move your hand into the camera frame to begin tracking
  • Calibrate hand height and distance for best accuracy

Demo Screenshots

Virtual Drawing Board

Virtual Drawing Board

System Controller

System Controller

Requirements

  • Webcam (720p recommended)
  • Python 3.8+
  • Windows / macOS / Linux

Contributing

Contributions are welcome. Please open an issue or submit a pull request.

License

MIT License

About

A touchless interaction platform that turns your webcam into an input device for drawing, presentation control, and system navigation using MediaPipe, OpenCV, and PyAutoGUI.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages