1
0
mirror of https://gitee.com/sui-feng-cb/AzurLaneAutoScript1 synced 2026-05-22 05:27:52 +08:00

Fix: story option detection pre_process (#5669)

This commit is contained in:
guoh064
2026-05-20 22:45:04 +08:00
committed by GitHub
parent ffded5b82b
commit 47d2779bcb

View File

@@ -345,6 +345,7 @@ class InfoHandler(ModuleBase):
story_option_color = (247, 247, 247)
image = color_similarity_2d(self.image_crop(story_detect_area, copy=False), color=story_option_color)
cv2.morphologyEx(image, cv2.MORPH_CLOSE, kernel=np.ones((5, 5), dtype=np.uint8), dst=image)
line = cv2.reduce(image, 1, cv2.REDUCE_AVG).flatten()
line[line < 200] = 0
line[line >= 200] = 255