运行时依赖
无特殊依赖
安装命令
点击复制官方npx clawhub@latest install mario-coin-counting-object-counter
镜像加速npx clawhub@latest install mario-coin-counting-object-counter --registry https://cn.longxiaskill.com镜像同步中
技能文档
使用计算机视觉算法对图像中的目标进行计数。
功能特性
- 图像目标检测与计数
- 支持多种目标类型
- 高精度计数结果
使用方法
from object_counter import count_objects
# 计算图像中目标数量 result = count_objects(image_path, target_type='coin') print(f"检测到目标数量: {result}")
参数说明
| 参数 | 类型 | 说明 |
|---|---|---|
| image_path | str | 图像文件路径 |
| target_type | str | 目标类型 |
注意事项
- 输入图像格式支持:JPG、PNG、BMP
- 建议使用清晰的图像以获得准确结果