pill-counter

使用 OpenCV 混合检测(霍夫圆+轮廓分析)精确计数药片。 支持13种形状识别,解决叠加药片漏检问题。 输出统计表格(文本/CSV/JSON)和标注图片。 支持:圆形(小/中/大)、椭圆形、胶囊形、三角形、四方形、菱形、 五边形、六边形、八边形、多边形等。

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "pill-counter" with this command: npx skills add johnsonxuan/pill-counter-skill

💊 药片精确计数 Skill v3

混合检测方案:霍夫圆检测(找圆形药片)+ 轮廓分析(找非圆形药片),有效识别叠加药片。

核心改进

版本方法检测数叠加处理
v1轮廓80❌ 漏检
v4轮廓+分水岭238⚠️ 一般
v6霍夫圆+轮廓333✅ 有效

支持的形状(13种)

圆形(小/中/大)、椭圆形、胶囊形、三角形、四方形、菱形、五边形、六边形、八边形、多边形、其他

使用方法

# 基本用法
python3 scripts/pill_counter.py 图片.jpg

# 指定输出
python3 scripts/pill_counter.py 图片.jpg --save 结果.jpg --export-csv 统计.csv

# JSON 输出
python3 scripts/pill_counter.py 图片.jpg --output json

输出

  • 📊 文本统计表(类型/数量/占比)
  • 📄 CSV 表格(可用 Excel 打开)
  • 🖼️ 标注图片(圆形用圆圈标注,其他用方框,右上角图例)
  • 📋 JSON 结构化数据

依赖

  • Python 3.6+
  • opencv-python-headless
  • numpy

注意事项

  • 白色药片在深色背景上效果最佳
  • 霍夫圆对圆形药片效果极好,叠加也能识别
  • 非圆形药片(胶囊、三角形等)用轮廓检测
  • 碎片可能被误识别为小药片

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

Skill Manager All In One | 一站式技能管理器

Manage OpenClaw skills end-to-end. 一站式管理 OpenClaw 技能的创建、修改、发布、更新、升版与审计。

Registry SourceRecently Updated
General

Linear Native Node

Direct Linear workspace helper using Linear's GraphQL API from native Node.js. Use when creating, listing, updating, commenting on, summarizing, or looking u...

Registry SourceRecently Updated
General

Hui-Yi

Trigger for cold-memory recall and archive work under memory/cold/. Use for older low-frequency context, historical continuity, resurfacing, cooling, rebuild...

Registry SourceRecently Updated
General

The English Tutor

英语口语陪练助手。触发词:「练习英语」「我要说英语」「英语陪练」。功能:上传生词表 → 每日定时情景对话 → 语音输入即时纠错 → 飞书语音推送 → 自动艾宾浩斯复习。

Registry SourceRecently Updated