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

Fix: item_statistics load multiple template folder

This commit is contained in:
LmeSzinc
2020-08-09 22:16:06 +08:00
parent 20bfc4f8fc
commit 0df5131d73
3 changed files with 5 additions and 3 deletions

View File

@@ -103,11 +103,13 @@ class ItemGrid:
folder (str): Template folder.
"""
data = load_folder(folder)
self.next_template_index += len(data)
for name, image in data.items():
if name in self.templates:
continue
image = load_image(image)
self.templates[name] = crop(np.array(image), area=self.template_area)
self.templates_hit[name] = 0
self.next_template_index += 1
def match_template(self, image):
"""