Skip to content

✨ AirCanvas: Virtual Hand Gesture Drawing Transform your webcam space into a digital canvas! Draw in the air using just your finger - where technology meets creativity.

License

Notifications You must be signed in to change notification settings

Vinandra-Adam-Saputra/AirCanvas-VirtualDrawing

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

✨ AirCanvas: Virtual Hand Gesture Drawing

🎨 Description

AirCanvas lets you paint virtually using hand gestures. No physical tools needed - just your hand and creativity!

⚡ Quick Features

  • 🖌️ Draw in mid-air using hand gestures
  • 🎨 Multiple color options (Blue, Green, Red, Yellow)
  • 📏 Adjustable brush sizes
  • 💫 Real-time hand tracking
  • 🔄 Canvas clearing option
  • 🖼️ Smooth drawing experience
  • 📸 Live webcam integration

🛠️ Technical Requirements

Hardware

  • Webcam (Optional)
  • Computer with Python support

Software Dependencies

pip install opencv-python
pip install mediapipe
pip install numpy

🚀 Installation & Setup

  1. Clone the repository
git clone https://github.com/Vinandra-Adam-Saputra/AirCanvas-VirtualDrawing.git
cd AirCanvas-VirtualDrawing
  1. Install dependencies

  2. Run the application

python virtual_paint.py

🎮 Controls & Usage

Hand Gestures

  • ☝️ Index Finger Up + Middle Finger Down: Activate drawing mode
  • Other Positions: Pause drawing

Keyboard Controls

  • q - Quit application
  • c - Clear canvas
  • b - Switch to blue color
  • g - Switch to green color
  • r - Switch to red color
  • y - Switch to yellow color
  • + - Increase brush size
  • - - Decrease brush size

💡 How It Works

Hand Detection

  • Uses MediaPipe Hands for accurate hand landmark detection
  • Tracks 21 different points on your hand
  • Focuses on index finger tip for drawing

Drawing Logic

  1. Initialization

    • Sets up video capture
    • Creates empty canvas
    • Initializes color options and brush settings
  2. Hand Tracking

    • Detects hand in frame
    • Identifies finger positions
    • Determines drawing mode based on gesture
  3. Drawing Process

    • Tracks index finger movement
    • Creates continuous lines when drawing
    • Maintains smooth line quality

🛠️ Customization

Adjusting Detection Sensitivity

self.hands = self.mp_hands.Hands(
    max_num_hands=1,
    min_detection_confidence=0.7,
    min_tracking_confidence=0.7
)

Adding New Colors

self.colors = {
    'blue': (255, 0, 0),
    'green': (0, 255, 0),
    'red': (0, 0, 255),
    'yellow': (0, 255, 255)
    # Add your custom colors here
}

📷 Screenshoots

WhatsApp Image 2025-02-02 at 19 17 37 WhatsApp Image 2025-02-02 at 19 17 37 (1) WhatsApp Image 2025-02-02 at 19 17 38

🤝 Contributing

  1. Fork the repository
  2. Create feature branch
git checkout -b feature/amazingfeature
  1. Commit changes
git commit -m 'Add amazing feature'
  1. Push to branch
git push origin feature/amazingfeature
  1. Open a Pull Request

📜 License

This project is licensed under the MIT License

🙏 Acknowledgments

  • MediaPipe team for hand detection
  • OpenCV community
  • All contributors and testers

About

✨ AirCanvas: Virtual Hand Gesture Drawing Transform your webcam space into a digital canvas! Draw in the air using just your finger - where technology meets creativity.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages