Integration plan for the improved calibration and button detection system into the main clickbot application.
-
Calibration Section
- Calibrate button
- Debug Matches button (runs analyze_hover_results.py)
- Last calibration timestamp
- Status indicators per button type
-
Monitoring Section
- Start/Stop button
- Live status display
- Match confidence display
- Current click rate
- Active monitor indicator
-
Debug Section
- View Latest Matches button
- Match history log
- Error rate tracking
- Button match statistics
-
Button Group Detection
- X-axis position grouping (±20px)
- Confidence + Y-axis position prioritization
- Match history tracking
-
Enhanced Calibration
- Pre/post click image capture
- Calibration coordinate storage
- Match validation against calibration data
-
Debug Visualization
- Real-time match visualization
- Color-coded button states (Green/Yellow/Red)
- Confidence score overlay
cursor-auto-accept/
├── src/
│ ├── ui/
│ │ ├── main_window.py # Main UI
│ │ ├── calibration_tab.py # Calibration UI
│ │ └── debug_tab.py # Debug UI
│ ├── core/
│ │ ├── button_detector.py # New detection logic
│ │ ├── calibrator.py # New calibration logic
│ │ └── visualizer.py # Debug visualization
│ └── utils/
│ ├── config.py # Configuration
│ └── logging.py # Enhanced logging
├── assets/
│ └── monitor_0/ # Calibration data
├── debug/ # Debug output
└── logs/ # Application logs
class ClickBotConfig:
# Detection Settings
MATCH_CONFIDENCE_THRESHOLD = 0.9
X_AXIS_GROUP_THRESHOLD = 20
MIN_Y_POSITION_DELTA = 5
# Visualization Settings
BUTTON_COLORS = {
'accept': (0, 255, 0), # Green
'suggest': (0, 255, 255), # Yellow
'cancel': (0, 0, 255) # Red
}
# Debug Settings
SAVE_DEBUG_IMAGES = True
MAX_DEBUG_HISTORY = 100
VISUALIZATION_UPDATE_RATE = 1.0 # seconds
- Port improved button detection algorithm
- Implement match grouping logic
- Add match validation system
- Set up configuration system
- Create new calibration workflow
- Add debug visualization panel
- Implement match statistics display
- Add real-time status updates
- Unit tests for new components
- Integration tests for full workflow
- Visualization system tests
- Performance benchmarking
- Update README with new features
- Add debug visualization guide
- Document configuration options
- Create user guide for new features
- Successful button detection rate > 95%
- False positive rate < 1%
- Match confidence threshold ≥ 0.9
- Response time < 200ms
- Stable operation across multiple monitors
- Phase 1: 1 week
- Phase 2: 1 week
- Phase 3: 3 days
- Phase 4: 2 days
Total estimated time: 2.5 weeks