1
0
mirror of https://gitee.com/sui-feng-cb/AzurLaneAutoScript1 synced 2026-03-11 22:08:20 +08:00

Opt: scan emotion status to adjust emotion value

This commit is contained in:
sui-feng-cb
2025-09-15 19:21:05 +08:00
parent 4fbeb4ef7a
commit 98be496932
4 changed files with 83 additions and 17 deletions

View File

@@ -351,10 +351,7 @@ class ModuleBase:
image = button
else:
image = self.image_crop(button, copy=False)
mask = color_similarity_2d(image, color=color)
cv2.inRange(mask, threshold, 255, dst=mask)
sum_ = cv2.countNonZero(mask)
return sum_ > count
return image_color_count(image, color, threshold, count)
def image_color_button(self, area, color, color_threshold=250, encourage=5, name='COLOR_BUTTON'):
"""