cv_locate
Locate simple targets by color segmentation or template matching (0-4px accuracy). Good for solid UI elements and fixed templates; complex objects require VLM-based tools.
Instructions
传统 CV 精定位(备选方案):颜色分割 + 连通域质心(像素级,零依赖,实测 0-4px)或模板匹配。适用简单目标(纯色 UI 元素、几何图形、固定模板);泛化有限,通用目标请用 locate_object / som_locate。
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| color | No | 颜色名(red/green/blue/yellow/orange/purple/cyan/white/black/gray) 或 [r,g,b] 或 [r1,g1,b1,r2,g2,b2],与 template 至少其一 | |
| image | Yes | ||
| coords | No | 返回坐标单位:pixel(默认)或 norm(0-1000 归一化) | |
| target | Yes | 目标描述 | |
| min_area | No | 最小色块面积过滤,默认 0 | |
| template | No | 模板图路径(模板匹配模式),与 color 至少其一;建议在 VLM 粗定位后的局部图上使用 |