mirror of
https://github.com/LmeSzinc/AzurLaneAutoScript.git
synced 2025-01-09 10:37:36 +08:00
Fix: Research status parsing on low quality image
This commit is contained in:
parent
40d443433b
commit
1b918f1785
@ -119,7 +119,7 @@ class ResearchQueue(ResearchUI):
|
||||
center = button.crop((7, 7, 21, 21))
|
||||
if self.image_color_count(center, color=(255, 158, 57), threshold=180, count=20):
|
||||
return 'finished'
|
||||
if self.image_color_count(center, color=(90, 97, 132), threshold=221, count=20):
|
||||
if self.image_color_count(center, color=(90, 97, 132), threshold=221, count=10):
|
||||
return 'waiting'
|
||||
if self.image_color_count(center, color=(24, 24, 41), threshold=221, count=10):
|
||||
below = button.crop((7, 14, 21, 21))
|
||||
|
@ -94,11 +94,11 @@ class ResearchUI(UI):
|
||||
for index, status, scaling in zip(range(5), RESEARCH_STATUS, TEMPLATE_SCALING):
|
||||
info = status.crop((0, -40, 200, 0))
|
||||
piece = rgb2gray(crop(image, info.area))
|
||||
if TEMPLATE_WAITING.match(piece, scaling=scaling):
|
||||
if TEMPLATE_WAITING.match(piece, scaling=scaling, similarity=0.75):
|
||||
out.append('waiting')
|
||||
elif TEMPLATE_RUNNING.match(piece, scaling=scaling):
|
||||
elif TEMPLATE_RUNNING.match(piece, scaling=scaling, similarity=0.75):
|
||||
out.append('running')
|
||||
elif TEMPLATE_DETAIL.match(piece, scaling=scaling):
|
||||
elif TEMPLATE_DETAIL.match(piece, scaling=scaling, similarity=0.75):
|
||||
out.append('detail')
|
||||
else:
|
||||
out.append('unknown')
|
||||
|
Loading…
Reference in New Issue
Block a user