mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-23 08:38:00 +08:00
Fix: Research status parsing on low quality image
This commit is contained in:
@@ -119,7 +119,7 @@ class ResearchQueue(ResearchUI):
|
|||||||
center = button.crop((7, 7, 21, 21))
|
center = button.crop((7, 7, 21, 21))
|
||||||
if self.image_color_count(center, color=(255, 158, 57), threshold=180, count=20):
|
if self.image_color_count(center, color=(255, 158, 57), threshold=180, count=20):
|
||||||
return 'finished'
|
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'
|
return 'waiting'
|
||||||
if self.image_color_count(center, color=(24, 24, 41), threshold=221, count=10):
|
if self.image_color_count(center, color=(24, 24, 41), threshold=221, count=10):
|
||||||
below = button.crop((7, 14, 21, 21))
|
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):
|
for index, status, scaling in zip(range(5), RESEARCH_STATUS, TEMPLATE_SCALING):
|
||||||
info = status.crop((0, -40, 200, 0))
|
info = status.crop((0, -40, 200, 0))
|
||||||
piece = rgb2gray(crop(image, info.area))
|
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')
|
out.append('waiting')
|
||||||
elif TEMPLATE_RUNNING.match(piece, scaling=scaling):
|
elif TEMPLATE_RUNNING.match(piece, scaling=scaling, similarity=0.75):
|
||||||
out.append('running')
|
out.append('running')
|
||||||
elif TEMPLATE_DETAIL.match(piece, scaling=scaling):
|
elif TEMPLATE_DETAIL.match(piece, scaling=scaling, similarity=0.75):
|
||||||
out.append('detail')
|
out.append('detail')
|
||||||
else:
|
else:
|
||||||
out.append('unknown')
|
out.append('unknown')
|
||||||
|
|||||||
Reference in New Issue
Block a user