1
0
mirror of https://github.com/TheFunny/ArisuAutoSweeper synced 2025-12-16 19:55:12 +00:00

refactor(cafe): adjust crop template button

This commit is contained in:
YoursFunny 2023-11-11 17:08:30 +08:00
parent 1b83b7077f
commit 7bc3630083
Signed by: YoursFunny
GPG Key ID: 207EDC3CD5B40F9C
2 changed files with 1 additions and 2 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 3.9 KiB

View File

@ -63,8 +63,7 @@ class Cafe(UI):
def _match_clickable_points(self, image, threshold=0.8):
image = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
template = self.btn.matched_button.image
template = cv2.cvtColor(template, cv2.COLOR_BGR2GRAY)
template = cv2.cvtColor(self.image_crop(self.btn), cv2.COLOR_BGR2GRAY)
res = cv2.matchTemplate(image, template, cv2.TM_CCOEFF_NORMED)
loc = np.where(res >= threshold)