mirror of
https://github.com/LmeSzinc/StarRailCopilot.git
synced 2024-11-25 10:01:10 +00:00
Fix: Add min distance to is_selected to nearing peaks
This commit is contained in:
parent
2478d14955
commit
c6c5536920
@ -52,6 +52,8 @@ class InventoryItem:
|
|||||||
image = color_similarity_2d(image, (255, 255, 255))
|
image = color_similarity_2d(image, (255, 255, 255))
|
||||||
param = {
|
param = {
|
||||||
'height': 160,
|
'height': 160,
|
||||||
|
# [ 10 110 114]
|
||||||
|
'distance': 10,
|
||||||
}
|
}
|
||||||
hori = cv2.reduce(image, 1, cv2.REDUCE_AVG).flatten()
|
hori = cv2.reduce(image, 1, cv2.REDUCE_AVG).flatten()
|
||||||
peaks, _ = signal.find_peaks(hori, **param)
|
peaks, _ = signal.find_peaks(hori, **param)
|
||||||
|
Loading…
Reference in New Issue
Block a user