Vision scaffold
Skill Jinchen-Yang/diansai-skill/.claude/skills/vision-scaffold
NUEDC 小车电控设计智能体 · Claude Code 驱动的「读题→选型→接线图→固件」门控流水线
npx -y skills add Jinchen-Yang/diansai-skill --skill vision-scaffoldAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 8 stars8 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
生成算法 lane 的 K230 CanMV 视觉工程骨架(巡线提取/色块/数字识别 + 用 protocol.py 发帧给主控)。当用户要"搭K230视觉/CanMV工程""视觉骨架""巡线/识别脚手架"时使用。收发帧只用 contracts/protocol.py(与主控 protocol.h 同源)。阈值=占位待现场标定。
SKILL.md
2.5 KB, as published. Nobody here has run it
vision-scaffold —— K230 视觉骨架(流水线 ⑧,算法 lane)
lane: 算法(DeepSeek/GLM 擅长代码) · 门: 语法检查 + 现场标阈值
K230 是独立板,可桌面独立开发。发帧只用 contracts/protocol.py(与主控 protocol.h 同源同签名,杜绝漂移)。
前置
design/solution.md(视觉要做什么)、contracts/protocol.py(已生成)。
生成结构(写到 vision/)
vision/
README.md # CanMV 烧录/运行(指向 env/vision.md), 镜像版本锁定提醒
main.py # 主循环: 取流 → 处理 → 用 protocol.py 发帧
line_follow.py # 巡线: 取一行/多行, 求中线偏差 error(int16)
blob_track.py # 色块/光点: find_blobs → cx,cy
digit_recog.py # 门牌数字: KPU/模板, 出 class_id+confidence
protocol.py # 从 ../contracts/ 复制(勿手改)
config.py # ★ 阈值/ROI/曝光 占位, 现场标定
步骤
main.py:CanMV 初始化(sensor/lcd),主循环里按当前任务调 line_follow/blob_track/digit_recog,把结果用protocol.line_error()/blob_xy()/target_class()经 UART 发出。硬件相关 import(sensor/image/lib)放运行时,保证主机py_compile语法可过。line_follow.py:灰度/二值化取中线,输出error(中线相对画面中心的偏差,int16)。阈值放config.py。blob_track.py:find_blobs取最大色块 cx,cy。digit_recog.py:KPU 模型或模板匹配,出class_id+confidence;连续 N 帧一致才采信(防误识,呼应 KB08 FSM)。config.py:所有阈值/ROI/曝光/串口波特(115200)集中放,标"现场标定"。- 复制
contracts/protocol.py到vision/。 - 门:
README写运行步骤 + 镜像版本须与队伍锁定一致;阈值现场标(见 test-checklist)。
与主控对接
- 帧格式由
contracts/protocol.py决定;改协议找 lead 改protocol.yaml重生成,不要在 K230 端硬编。 - 联调:K230 发 → 主控
k230_uart.c的proto_parse_byte收,串口助手可旁观AA 55 .. 0D。