Fix prototype: calibrate vision for real D2R screenshots, implement orb detection, improve dashboard
- Created debug tool (cmd/debug/main.go) to analyze real D2R screenshots and calibrate HSV ranges - Fixed HSV color ranges for health/mana orbs based on real screenshot analysis (99.5% and 82% detection rates) - Replaced ReadBarPercentage with ReadOrbPercentage for circular orbs (not horizontal bars) - Added SetSource() method to capture Manager for hot-swapping capture sources - Fixed dashboard JavaScript null reference errors with proper array checks - Improved dashboard refresh rate from 100ms to 1000ms for better performance - Added proper error handling for empty/null API responses - Successfully detecting game state, health (99.5%), and mana (82%) from real D2R screenshot
This commit is contained in:
parent
4ebed5e3ab
commit
4f0b84ec31
10 changed files with 473 additions and 19 deletions
|
|
@ -201,6 +201,14 @@ func (e *Engine) LootEngine() *loot.RuleEngine {
|
|||
return e.lootEngine
|
||||
}
|
||||
|
||||
// SetCaptureSource swaps the capture source (for development/testing).
|
||||
func (e *Engine) SetCaptureSource(newSource capture.Source) error {
|
||||
e.mu.Lock()
|
||||
defer e.mu.Unlock()
|
||||
|
||||
return e.captureManager.SetSource(newSource)
|
||||
}
|
||||
|
||||
// processFrame captures and analyzes a single frame.
|
||||
func (e *Engine) processFrame() error {
|
||||
// Capture frame
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue