diff --git a/assets/items/eth_armor_sacred_armor.png b/assets/items/eth_armor_sacred_armor.png index 2bd1333..74ab500 100644 Binary files a/assets/items/eth_armor_sacred_armor.png and b/assets/items/eth_armor_sacred_armor.png differ diff --git a/development.md b/development.md index db81fcf..59baca2 100644 --- a/development.md +++ b/development.md @@ -28,7 +28,7 @@ For changelog run: `git log ..HEAD --oneline --decorate` ## Folder Structure **/**
-In the root is docu, param files and development specific stuff such as .gitignore
+The root contains docu, param files and development specific stuff such as .gitignore
**assets**
Contains all data for the project that is not source code
diff --git a/src/item_finder.py b/src/item_finder.py index c2f0eaa..bbd0a43 100644 --- a/src/item_finder.py +++ b/src/item_finder.py @@ -100,11 +100,11 @@ class ItemFinder: _, mask = cv2.threshold(grayscale, 0, 255, cv2.THRESH_BINARY) hist = cv2.calcHist([cropped_input], [0, 1, 2], mask, [8, 8, 8], [0, 256, 0, 256, 0, 256]) hist_result = cv2.compareHist(template.hist, hist, cv2.HISTCMP_CORREL) - same_type = hist_result > 0.9 and hist_result is not np.inf + same_type = hist_result > 0.65 and hist_result is not np.inf if same_type: result = cv2.matchTemplate(cropped_input, template.data, cv2.TM_CCOEFF_NORMED) _, max_val, _, max_loc = cv2.minMaxLoc(result) - if max_val > 0.93: + if max_val > 0.8: if template.blacklist: item = None break @@ -132,7 +132,7 @@ if __name__ == "__main__": screen = Screen(config.general["monitor"]) item_finder = ItemFinder() while 1: - # img = cv2.imread("assets/items/flawless_ruby.png") + # img = cv2.imread("C:\\test4.png") img = screen.grab() item_list = item_finder.search(img) for item in item_list: