
CodexandClaude Opus 4.7
07cdd662c2
refactor(finder): 抽 numpy 加速扫描段到 finder_numpy_scan (937 → 811)
check_have_fudai_with_ready_screenshot L271-397 是"numpy 加速水平带扫描"
逻辑(126 行):ROI 裁剪 → RGB 颜色掩码 → 列聚合 → 从最优起始列向两侧
交替搜索第一个匹配列 → 写回 last_fudai_x。
抽到 douyin/detection/detection_pkg/finder_numpy_scan.py:
- scan_with_numpy(analyser, pic_new, rx, ry, y_pianyi_val, optimal_x_scaled)
→ (detected, detected_x)
- numpy ImportError / 异常时返回 (False, None),让 caller 走逐像素兜底
主 finder.py 替换为 7 行委托。
新增 8 个单元测试(用真实 PIL.Image + numpy 构造小图):
- 空图返回 False
- 整图目标色命中 + last_fudai_x 写回
- 仅在某段列有目标色,命中位置在该段
- y_pianyi_val 偏移正确传递到扫描带
- ROI 越界返回 False
- optimal_x_scaled 在命中区时优先返回该位置
1321 passed (+8)。
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-23 02:15:43 +08:00
..
2026-05-21 14:09:02 +08:00
2026-05-21 15:02:08 +08:00
2026-05-21 22:21:03 +08:00
2026-05-21 14:45:49 +08:00
2026-05-21 22:15:34 +08:00
2026-05-23 01:30:35 +08:00
2026-05-23 00:47:02 +08:00
2026-05-23 01:47:36 +08:00
2026-05-21 22:03:35 +08:00
2026-05-21 14:09:02 +08:00
2026-05-21 14:09:02 +08:00
2026-05-23 02:05:38 +08:00
2026-05-21 14:09:02 +08:00
2026-05-23 02:15:43 +08:00
2026-05-21 22:42:58 +08:00
2026-05-21 20:54:35 +08:00
2026-05-21 21:53:47 +08:00
2026-05-21 21:01:15 +08:00
2026-05-21 20:54:35 +08:00
2026-05-21 22:38:43 +08:00
2026-05-21 22:07:15 +08:00
2026-05-21 22:00:02 +08:00
2026-05-21 20:54:35 +08:00
2026-05-21 14:15:14 +08:00
2026-05-22 22:18:33 +08:00
2026-05-21 21:25:50 +08:00
2026-05-21 20:54:35 +08:00
2026-05-21 21:50:02 +08:00
2026-05-23 01:39:24 +08:00
2026-05-21 14:09:02 +08:00
2026-05-21 22:24:15 +08:00
2026-05-21 14:09:02 +08:00
2026-05-22 20:16:37 +08:00
2026-05-22 19:08:09 +08:00
2026-05-21 14:45:49 +08:00
2026-05-21 14:09:02 +08:00
2026-05-21 21:56:43 +08:00
2026-05-21 21:01:15 +08:00
2026-05-21 14:09:02 +08:00
2026-05-23 01:58:13 +08:00
2026-05-21 21:42:39 +08:00
2026-05-21 22:12:54 +08:00
2026-05-21 15:11:54 +08:00
2026-05-21 14:09:02 +08:00
2026-05-21 14:56:56 +08:00
2026-05-22 20:46:23 +08:00
2026-05-21 20:54:35 +08:00
2026-05-22 19:20:29 +08:00
2026-05-21 21:04:14 +08:00
2026-05-21 14:25:35 +08:00
2026-05-21 20:54:35 +08:00
2026-05-22 01:22:56 +08:00
2026-05-21 22:09:35 +08:00
2026-05-22 22:45:51 +08:00
2026-05-23 01:21:27 +08:00
2026-05-21 20:54:35 +08:00
2026-05-21 22:28:26 +08:00
2026-05-21 22:17:54 +08:00
2026-05-21 14:09:02 +08:00
2026-05-21 21:37:19 +08:00
2026-05-21 20:54:35 +08:00
2026-05-21 22:45:46 +08:00
2026-05-21 14:09:02 +08:00
2026-05-21 15:17:56 +08:00
2026-05-21 20:54:35 +08:00
2026-05-21 14:09:02 +08:00
2026-05-23 01:02:48 +08:00
2026-05-22 19:32:04 +08:00
2026-05-21 22:48:38 +08:00
2026-05-21 20:54:35 +08:00