fix some pickit issues, lower item thresholds
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 5.4 KiB After Width: | Height: | Size: 3.2 KiB |
@@ -28,7 +28,7 @@ For changelog run: `git log <PREVIOUS_TAG>..HEAD --oneline --decorate`
|
||||
|
||||
## Folder Structure
|
||||
**/**</br>
|
||||
In the root is docu, param files and development specific stuff such as .gitignore</br>
|
||||
The root contains docu, param files and development specific stuff such as .gitignore</br>
|
||||
|
||||
**assets**</br>
|
||||
Contains all data for the project that is not source code</br>
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user