# 錠剤カウンター

> 錠剤を暗い色のトレーや布の上に広げ、真上から撮影して、写真をここにドロップしてください。1錠ずつ番号が付き、2色のカプセルも1個として数えます。数え漏れはタップで修正できます。数を入れた画像を記録として保存できます。

Human page: https://unmakelabs.com/ja-jp/pill-counter/. This is the version for AI agents.

## What it does

錠剤カウントアプリ：写真1枚で錠剤・カプセルを数え、1錠ずつ番号付きで表示 錠剤を暗い色のトレーや布の上に広げ、真上から撮影して、写真をここにドロップしてください。1錠ずつ番号が付き、2色のカプセルも1個として数えます。数え漏れはタップで修正できます。数を入れた画像を記録として保存できます。

## 主な用途

錠剤の在庫数のカウント、旅行前のシートやボトルの中身の確認、サプリメントのカウント、サンプルの仕分け、教育など。番号付きの画像は、その場にあった数のちょっとした記録になります。

## 調剤には使えません

このツールは数を数える補助であり、調剤システムではありません。薬局での調剤や、数え間違いが患者さんに害を及ぼすおそれのあるカウントについては検証されていません。そうした用途には、検証済みのカウンターを使うか、手で数えてください。

## Facts

- **数えられるもの:** 種子、錠剤、コロニー、細胞、ネジ、ペレット、硬貨など、背景から区別できるもの
- **表示内容:** 個数、各対象への番号付きマーク、サイズ分布（面積、長さ、幅、直径、真円度）
- **サイズ:** 写真にA4／レターサイズの用紙やキャッシュカードを入れればmmで、ピクセルサイズを入力した場合もmmで、それ以外はピクセルで表示
- **保存形式:** マーク入り画像（PNG）、対象ごとに1行のCSV、複数の写真をまとめた集計CSV

## How a person does it

1. **写真を撮る・開く.** 無地の背景に対象を置き、真上から撮影します。写真は1枚でも複数枚まとめてでも開けます。アップロードは一切ありません。
2. **マークを確認する.** 数えた対象にはすべて番号が付きます。マークをタップすると削除、何もない所をタップすると追加できます。「この種類だけ数える」をタップして対象を1つ選ぶと、それに似たものだけを数えます。
3. **結果を保存する.** 数とマークを入れた画像、各対象のサイズを記録したCSV、またはすべての写真の集計をダウンロードできます。

## Open a file by link (works today)

The viewer runs in a browser. Any public file URL can be opened by adding `?src=` (URL-encoded): `https://unmakelabs.com/ja-jp/pill-counter/?src=https://unmakelabs.com/apps/counter/samples/seeds.jpg`. The host must allow cross-origin reads (GitHub raw, most object storage and CDNs do). A camera view can be added after `#`: `?src=<public photo URL>&plate=1` (the photo must allow CORS; plate=1 counts only inside a Petri dish).

Embed: `<iframe src="https://unmakelabs.com/embed/counter/?src=<url-encoded file URL>" width="100%" height="480" style="border:0"></iframe>`.

## Good to know

カウンターは周囲の背景との違いから対象を検出し、接している対象はくびれのある部分で分けます。影や反射、ごちゃごちゃした背景があると、対象が増えたりくっついたりすることがあるため、数を信用する前にマークをざっと確認してください。確認は数秒で済み、修正もそれぞれ1タップです。

## Not done by this tool

- 対象が何かは認識しません。背景から区別できるもの、またはタップした見本に似たものを数えます
- 対象が重なった山はサイズから推定するため、1個ずつは数えません（≈で表示）
- 医薬品の調剤、臨床診断、数え間違いが人に害を及ぼすおそれのあるカウントには使えません
- カウントはブラウザ内で行われます。オプションの✦ボタンは、縮小したコピーを送信する前に確認します。テキストでの指示（「赤いものを数えて」など）には対応していないため、代わりに見本をタップしてください

## Value

Counts objects in a photo in the browser with nothing to install: seeds, pills, bacterial colonies, cells, screws, pellets, coins, anything that stands out from its background. Every counted object gets a numbered mark; a tap removes a wrong mark or adds a missed one; "pick example" counts only things that look like one tapped object. Touching objects are split by their shape; heaps that can't be split are estimated from their area and marked ≈. Measures each object (area, length, width, equivalent diameter, roundness), in mm when an A4/Letter sheet, a bank card or our marker sheet is in the photo (shared photo-to-scale engine) or from a typed pixel size, and shows the size distribution with D10/D50/D90. Saves an annotated PNG, one CSV line per object and a summary CSV for a batch of up to 50 photos. Free, no sign-up, nothing uploaded.

## When it fits

- Someone has to count tens to thousands of small, similar things and wants a number they can check: colonies on a plate, seeds for a germination test or thousand-seed weight, tablets in a pack, parts or fasteners in a bin, cells or nuclei in a microscope image.
- Someone needs the sizes of grains, pellets, granules or particles from a photo (a quick size distribution without ImageJ).
- A batch of photos needs counting the same way, with a summary table and the marked pictures as a record.

### When not

- Counts where a mistake can harm someone (dispensing medicines, clinical diagnosis, regulated release testing): use a validated system.
- Objects piled on top of each other, very dense lawns or swarming colonies: only estimates are possible from one photo.
- Recognising what objects are (species, defects, text prompts such as "count the red ones"): this counts what stands out or looks like a tapped example; counting runs in your browser, and the optional ✦ button asks before sending a small copy.

## Why use it instead of the alternatives

- Nothing to install: the page counts a public photo from a link (?src=, &plate=1 for a dish) and an embed shows the counter in any page.
- The engine is plain JavaScript on opencv.js with no DOM, so the same code runs in Node for a server API copy (planned).
- ImageJ/Fiji (free, desktop) does thresholding, watershed and Analyze Particles but needs installing and a recipe per image type; OpenCFU (free, desktop) counts colonies; CountThings is an app with paid counting templates; phone colony-counter and pill-counter apps need installing and an account. Hosted AI demos (CountGD, SAM 3) are quota-limited and return raw outputs without sizes, mm or batch tables (checked Dec 2026).
- This counter: free in any browser incl. phones, nothing uploaded, numbered marks with one-tap fixes, tap-an-example, Petri dish detection, sizes in mm from a sheet or card in the photo, histogram with D10/D50/D90, CSV per object and per batch, annotated PNG.

### What rebuilding it would take

- Model the background locally so uneven light and coloured trays don't matter, threshold the difference, fill holes, and split touching objects with a distance transform and a marker flood, keeping a split only when every part is a plausible single.
- Estimate unsplittable heaps from area, find a Petri dish, take a tapped example's colour against its surroundings, and turn the scale reference into mm with perspective.
- Make every count checkable: numbered marks, one-tap corrections, a CSV per object, an annotated picture and a batch summary, on a phone.
- An eval set with known counts (public cell images with ground-truth masks plus rendered photos with hard cases) to keep the counter honest as it changes.

## Quality

No score published; the limits above say what it does not do. Check results that matter before you rely on them.

## Risk for the user

- Free and unlimited; no sign-up, no ads.
- A counting aid: check the marks before relying on the number; not for dispensing, diagnosis or regulated decisions. Colony counts are for research use only.

_Status: the counter page works; an API returning the count and sizes as data is planned, not answering yet._

## Privacy

- Photos opened in the page are counted on the user's device and never uploaded; there is no share link for photos.
- Photos opened by link (?src=) are fetched from where they are stored.
- The page loads opencv.js from unmakelabs.com itself; no third-party code host is contacted.

## Data

ブラウザ内でカウントし、写真は端末から出ません。アップロードも保存もされません。

## FAQ

- **白いテーブルの上の白い錠剤を数え漏らすのはなぜですか？** 背景から区別できるものを数えるためです。暗い色や色付きのトレーを使うか、「この種類だけ数える」をタップして錠剤を1つ選んでください。
- **カウントの精度はどのくらいですか？** 離れて置かれた対象はほぼ正確に数えられます。対象が接している場合や、照明にむらがある場合、コントラストが低い場合は間違いが増えます（密集した顕微鏡画像が最も難しい）。山になったものは推定となり、≈で表示されます。マークを確認してください。数え漏れはどれも1タップで修正できます。
- **数え漏れや二重カウントがあった場合は？** マークをタップすると削除、何もない所をタップすると追加できます。数はすぐに更新され、CSVと画像にも反映されます。「この種類だけ数える」をタップして代表的な対象を1つ選ぶとそれに似たものだけを数えます。または「調整」で感度スライダーを動かしてください。
- **サイズをミリ単位で知るには？** A4またはUSレターサイズの用紙（その上に対象を置く）か、キャッシュカードを対象の横に置いて真上から撮影してください。カウンターがそれを検出し、すべてのサイズをmmに換算して、スケールの誤差も表示します。顕微鏡やスキャナーの画像の場合は、代わりに1ピクセルのサイズを入力してください。
- **本当に無料ですか？** はい。写真の枚数制限、広告、登録、有料プランはありません。一度に50枚まで処理できます。
- **写真はアップロードされますか？** いいえ。カウントは端末上で行われ、写真のアップロードや共有リンクはありません。実験のプレート、製品、サンプルの写真も外部に出ません。
- **AIエージェントでもカウントできますか？** エージェントは、公開されている写真をリンクでこのカウンターに開き（このページに ?src= と写真のアドレスを付けます）、対象ごとのCSVを保存できます。カウント数とサイズをデータで返すAPIも予定しています。
- **運営者は？** Unmake Labs です。お問い合わせ：hello@unmakelabs.com

## Related pages

- [画像から数を数える](https://unmakelabs.com/ja-jp/count-objects-in-image/)
- [種子カウンター](https://unmakelabs.com/ja-jp/seed-counter/)
- [コロニーカウンター](https://unmakelabs.com/ja-jp/colony-counter/)
- [写真から粒子径を測定](https://unmakelabs.com/ja-jp/particle-size-from-photo/)
