Skip to content

Real-time gesture-based drawing using MediaPipe and OpenCV

Notifications You must be signed in to change notification settings

Kevinbui16/HandDraw-AI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 

Repository files navigation

🎨 HandDraw: Real-Time Gesture-Based Drawing with AI 🖐️

📝 Project Description

HandDraw is a Python-based project that uses MediaPipe for hand landmarks detection and OpenCV for real-time drawing. The software captures hand gestures and visualizes them as drawings on the screen, offering an interactive and creative user experience. This project demonstrates the power of combining AI with real-time image processing to build innovative applications.

🎥 Demo

Check out the demo of HandDraw in action below!

HandDraw Demo

Watch the video

The demo could also be found at: https://www.youtube.com/watch?v=Pw8q8O9CqHE

In the demo, you can see a real-time drawing of "I ❤️ U" using hand gestures.

✨ Features

  • ⚡ Real-time hand landmarks detection
  • ✍️ Gesture-based drawing visualization
  • 🖥️ Easy to use interface
  • 🎯 High accuracy with MediaPipe
  • 🎨 Customizable drawing colors and shapes

⚙️ Installation

Follow the steps below to set up and run this project on your local machine.

📦 Prerequisites

Ensure you have Python installed on your system. Then install the necessary libraries.

pip install opencv-python mediapipe

🛠️ Cloning the Repository

Clone the repository to your local machine:

git clone https://github.com/your-username/HandDraw.git
cd HandDraw

▶️ Running the Project

Once installed, you can run the project by executing the Python script.

python hand_love.py

You will see a window pop up, and the camera will start capturing hand gestures in real-time, turning them into drawings.

🚀 Usage

  1. 📸 Make sure your camera is enabled and pointing toward your hand.
  2. 🖍️ Use your index finger to choose a color on the screen.
  3. 🖌️ Use your index finger and thumb to draw on the screen.
  4. 🎉 Explore different gestures to create fun shapes and designs!

🧠 How it Works

  • 📷 MediaPipe detects hand landmarks in real-time from the camera input.
  • 🖼️ OpenCV processes these landmarks and converts them into drawing strokes on the screen.
  • ✋ The program allows users to draw by moving their hands, simulating pen-like behavior in the air.

🔮 Future Improvements

  • 🧩 Adding more gesture types for different actions (e.g., undo, change color).
  • 🤚 Extending the project to recognize multiple hands and gestures simultaneously.
  • 🖥️ Enhancing the UI for a more interactive experience.

About

Real-time gesture-based drawing using MediaPipe and OpenCV

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages