Skip to content

This real-time gesture-based drawing app is powered by MediaPipe and OpenCV using hand landmarks and finger detection.

Notifications You must be signed in to change notification settings

KunalMehra075/Drawing-Board-OpenCV

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🎨 Virtual Drawing Board — OpenCV + MediaPipe Project

Draw anything on the screen with your index finger — no stylus, no touchscreen, just your webcam and your hand! ✍️🖐️
This real-time gesture-based drawing app is powered by MediaPipe and OpenCV using hand landmarks and finger detection.

🖼 Demo

Demo

🧠 How It Works

🖐️ This project uses your webcam to detect hand gestures and switches between drawing and selection modes based on finger positions:

  • ☝️ Only Index Finger Up → Drawing Mode
  • ✌️ Index + Middle Finger Up → Selection Mode (choose color or eraser)
  • All 5 Fingers Up → Clear the entire drawing board

You can toggle between different colors and an eraser by moving your fingers to the top toolbar area.


🚀 Features

✅ Real-time hand tracking with MediaPipe
✅ Draw using your index finger
✅ Select colors & eraser using gestures
✅ Clear canvas with a five-finger gesture
✅ Smooth and responsive drawing experience
✅ Works offline with just a webcam


🧠 What You'll Learn

  • How to detect fingers using MediaPipe hand landmarks
  • Creating interactive tools using OpenCV (color palette, buttons)
  • Switching modes using finger gesture logic
  • Drawing with custom brush sizes and color handling
  • Simple UI creation with OpenCV overlays

🔧 Getting Started

How to run:

  1. Install the required dependencies, globlally or by creating a virtual environment:

    pip install -r requirements.txt
  2. Run the application:

    python drawingBoard.py

Dependencies

  • OpenCV
  • MediaPipe
  • Numpy

Buy me a coffee 🥹:

Buy Me A Coffee

Contributions are welcome! 🙏 If you have any ideas for improvements, feel free to submit a pull request.
Follow me for more exciting projects like this! 🤩

About

This real-time gesture-based drawing app is powered by MediaPipe and OpenCV using hand landmarks and finger detection.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages