Files
Hermes 20b79b0445
Build and Deploy / build (push) Failing after 3m22s
Build and Deploy / deploy (push) Skipped
fix(opencv): 阴影滑块按上游列扫描重写,修 findContours 三通道崩溃
上一版只加了尺寸校验,同尺寸输入暴露出第二个 bug:
  threshold 之后仍是 CV_8UC3 就交给 findContours →
  "FindContours supports only CV_8UC1 images"

现在按上游 AntiCAP solve_slider_comparison 的算法重写:
  · absdiff 逐通道,任一道 > 80 记为差异像素(对齐 image.point(lambda x: 255 if x > 80 else 0))
  · 三通道掩码用 cv::compare + bitwise_or 合成单通道 CV_8UC1
  · 逐列扫描:差异像素 >= 5 的列 → start_x = 列号+2,start_y = 首次达标行号-5(与上游一致)
  · 列扫描找不到时退回最大差异区域外接矩形(保留旧路径作为兜底)
  · 尺寸不一致返回 -2,Go 侧映射成 400
2026-12-03 08:43:24 +08:00
..