Note: This is an older project. While we’ve added basic macOS compatibility and refreshed dependencies, some features may not work perfectly on modern systems (e.g., screen capture permissions, camera initialization, or voice components). See Troubleshooting for common fixes.
A hand gesture-powered drawing application that allows you to draw using your webcam and hand movements. The app supports three different drawing modes and includes voice commands for hands-free operation.
-
Three Drawing Modes:
- New Canvas: Draw on a blank canvas
- On Screen: Draw over a live screenshot of your screen
- Existing File: Draw over a user-selected image
-
Hand Gesture Controls:
- Two fingers up: Selection mode (choose colors, tools)
- One finger up: Drawing mode
- Gesture-based toolbar with color selection, eraser, clear, save, and send options
-
Voice Commands:
- Color selection: "red", "blue", "green", "eraser"
- Actions: "save", "send", "clear"
- Brush/eraser thickness: "brush thickness 20", "eraser thickness 50"
-
Export Options:
- Save drawings as images
- Send drawings to Word documents with timestamps
- Clone or download this repository
- Install the required dependencies:
pip install -r requirements.txtNote for macOS users: You may need to install pyaudio separately if you encounter issues:
brew install portaudio
pip install pyaudio- Run the main application:
python MainScreen.py-
Choose your drawing mode:
- New Canvas: Start with a blank canvas
- On Screen: Draw over your current screen
- Existing File: Select an image file to draw over
-
Drawing Controls:
- Hold up two fingers to enter selection mode and choose tools/colors from the top toolbar
- Hold up one finger to draw
- Use voice commands by selecting the voice assistant option in the toolbar
-
Keyboard Shortcuts:
- Press
sto save the current drawing - Press
qto quit the drawing mode
- Press
- Python 3.7+
- Webcam
- Microphone (for voice commands)
- macOS, Windows, or Linux
MainScreen.py- Main GUI launcherVirtualPainterNew.py- New canvas drawing modeVirtualPainterScreen.py- Screen overlay drawing modeVirtualPainterFile.py- File overlay drawing modeHandTrackingModule1.py- Hand tracking functionalityassistant.py- Voice command processingDocSave.py- Word document export functionalityguiimages/- UI button imagesimages3/- Toolbar overlay imagesSavedImages/- Exported drawingsSavedDocuments/- Generated Word documentstempimgs/- Temporary images for document export
- If voice commands don't work, ensure microphone permissions are granted
- If you get audio errors, try installing
pyaudiovia Homebrew first
- IMPORTANT: Grant camera permissions in System Preferences > Security & Privacy > Camera
- Ensure your webcam is not being used by another application
- The app expects a 1280x720 resolution; lower resolutions may cause issues
- If you see "OpenCV: not authorized to capture video", you need to grant camera permissions
- Speak clearly and ensure a quiet environment
- Check that your microphone is working and permissions are granted
- This app works with Python 3.12 (Anaconda recommended)
- Mediapipe 0.10.21 is used for compatibility with Python 3.12
- If you encounter numpy version conflicts, they shouldn't affect core functionality
See requirements.txt for the complete list of required Python packages.
This project is open source. Feel free to modify and distribute as needed.