An innovative virtual painting application that transforms your hand movements into digital art using advanced computer vision technology. Draw in the air with just your finger and watch your creations come to life on screen.
- Real-time Hand Tracking: Advanced hand detection using MediaPipe for precise finger tracking
- Gesture-based Controls: Intuitive finger gestures for seamless interaction
- Multi-color Palette: Choose between red, green, blue colors or use the eraser
- Air Drawing: Paint in the air using your index finger as a brush
- Live Canvas: See your drawings appear in real-time on a dedicated canvas
- Selection Mode: Use two fingers to switch between colors and tools
- Responsive Interface: Smooth performance with optimized camera resolution
- Raise your index finger to enter drawing mode
- Move your finger to draw on the canvas
- The drawing appears both on the camera feed and separate canvas
- Raise index and middle fingers to enter selection mode
- Touch the header area to select:
- First quarter: Red color
- Second quarter: Blue color
- Third quarter: Green color
- Fourth quarter: Eraser
- Python 3.x: Core programming language
- OpenCV: Computer vision and image processing
- MediaPipe: Google's machine learning framework for hand tracking
- NumPy: Numerical computing for image manipulation
opencv-python
mediapipe
numpy- Clone the repository
git clone https://github.com/yourusername/padron.git
cd padron- Install dependencies
pip install opencv-python mediapipe numpy- Run the application
python virtual-painter.py- Controls
- Press
qto quit the application - Ensure good lighting for optimal hand detection
- Press
padron/
│
├── virtual-painter.py # Main application file
├── HandTrackingModule.py # Hand detection module
├── Header/ # UI header images
│ ├── 1.jpg # Red color selector
│ ├── 2.jpg # Blue color selector
│ ├── 3.jpg # Green color selector
│ └── 4.jpg # Eraser selector
└── README.md # Project documentation
- Computer Vision: Real-time processing of camera feed for hand detection
- Gesture Recognition: Interpreting finger positions for different modes
- Image Processing: Combining multiple image layers for drawing effect
- Human-Computer Interaction: Natural gesture-based interface
You can easily customize:
- Brush thickness: Modify
brushThicknessvariable - Colors: Change color values in the selection logic
- Detection confidence: Adjust
detectionConfor different sensitivity - Canvas size: Automatically adapts to camera resolution
The application creates an immersive drawing experience where your hand becomes the brush and the air becomes your canvas. Perfect for digital art creation, educational demonstrations, or interactive presentations.
Feel free to contribute to this project by:
- Reporting bugs
- Suggesting new features
- Submitting pull requests
- Improving documentation
This project is open source and available under the MIT License.
- Google MediaPipe team for the hand tracking technology
- OpenCV community for computer vision tools
- Python community for the amazing ecosystem
Transform your creativity into digital art with just your hands! 🎨✨