mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-16 06:57:21 +08:00
Fix: Noise in research S2 detection
This commit is contained in:
@@ -59,7 +59,7 @@ def get_research_series(image):
|
|||||||
|
|
||||||
for button in RESEARCH_SERIES:
|
for button in RESEARCH_SERIES:
|
||||||
im = color_similarity_2d(image.crop(button.area).resize((46, 25)), color=(255, 255, 255))
|
im = color_similarity_2d(image.crop(button.area).resize((46, 25)), color=(255, 255, 255))
|
||||||
peaks = [len(signal.find_peaks(row, **parameters)[0]) for row in im[2:-2]]
|
peaks = [len(signal.find_peaks(row, **parameters)[0]) for row in im[5:-5]]
|
||||||
upper, lower = max(peaks), min(peaks)
|
upper, lower = max(peaks), min(peaks)
|
||||||
# print(upper, lower)
|
# print(upper, lower)
|
||||||
if upper == lower and 1 <= upper <= 3:
|
if upper == lower and 1 <= upper <= 3:
|
||||||
|
|||||||
Reference in New Issue
Block a user