Fix: Add min distance to is_selected to nearing peaks

This commit is contained in:
LmeSzinc 2024-08-20 00:44:18 +08:00
parent 2478d14955
commit c6c5536920

View File

@ -52,6 +52,8 @@ class InventoryItem:
image = color_similarity_2d(image, (255, 255, 255))
param = {
'height': 160,
# [ 10 110 114]
'distance': 10,
}
hori = cv2.reduce(image, 1, cv2.REDUCE_AVG).flatten()
peaks, _ = signal.find_peaks(hori, **param)