Automated drawing assistant powered by computer vision and automation
A Python-based application that automates the drawing process by capturing canvas coordinates and reproducing images programmatically.
✨ Core Capabilities
- 🎯 Canvas calibration via manual click-based setup
- 🖼️ Automatic image loading and processing
- 🎨 Brush thickness adjustment
- ⏸️ Pause/resume functionality during drawing
- 🖱️ Keyboard shortcuts for quick control
✨ Technical Highlights
- Computer vision-based UI element detection
- Real-time mouse and keyboard input handling
- Configurable drawing parameters
- Console output monitoring
- Python 3.7+
- Windows OS (primary support)
- BlueStack (for mobile app drawing automation)
Option 1: One-Click Launch (Recommended)
run.batDouble-click run.bat and the app will:
- Install all dependencies automatically
- Launch the application
Option 2: Manual Setup
pip install -r requirements.txt
python main.pyOption 3: Python Runner
python run.py- Click "1. Calibrate Canvas"
- Click the top-left corner of your drawing area
- Click the bottom-right corner of your drawing area
- The app will save your canvas boundaries
- Click "Select Image"
- Choose an image file to draw
- The path will be displayed in the selection box
- Click "2. Start Drawing"
- The app will automatically reproduce the image
- Press SPACE to pause/resume
- Press Q to stop and exit
Edit config.json to customize behavior:
{
"default_image_path": "images/test_image2.png",
"drawing_speed": 0.0,
"stop_key": "q",
"pause_key": "space",
"ui_confidence": 0.8,
"draw_button_y_offset": 75,
"thickness_adjust_y_offset": 20,
"scale_margin": 0.9
}| Parameter | Description |
|---|---|
drawing_speed |
Delay between strokes (seconds) |
stop_key |
Key to stop drawing |
pause_key |
Key to pause/resume |
ui_confidence |
Confidence threshold for UI detection (0.0-1.0) |
flash.draw/
├── main.py # Main application
├── image_processor.py # Image processing module
├── config.json # Configuration file
├── requirements.txt # Python dependencies
├── run.bat # One-click launcher (Windows)
├── run.py # Python launcher
├── icon.ico # Application icon
├── plus_icon.png # UI element
├── thickness_slider_handle.png # UI element
├── thickness_slider_handle_alt.png # UI element
└── images/ # Sample images directory
- keyboard
- mouse
- numpy
- opencv-python
- PyAutoGUI
- colorama
- ttkbootstrap
All installed automatically via requirements.txt
| Key | Action |
|---|---|
| Q | Stop drawing and exit |
| SPACE | Pause/Resume drawing |
BlueStack Integration
- Download and install BlueStack for Android app emulation
- This app can automate drawing on any application running in BlueStack
- Ensure BlueStack window is active before starting the drawing process
- Calibrate canvas coordinates within the BlueStack window
Icons not found?
- Ensure all
.pngfiles are in the same directory asmain.py - Check that paths in
config.jsonare correct
UI detection failing?
- Adjust
ui_confidenceinconfig.json(lower = more lenient) - Ensure the application UI is visible and unobstructed
Drawing inaccurate?
- Recalibrate the canvas
- Check image resolution matches canvas size
- Adjust
drawing_speedfor stability
Made with ❤ by flash
For issues and questions, please check the configuration and ensure all dependencies are properly installed.
Ready to draw? Double-click run.bat and get started! 🎨